Code Monkey home page Code Monkey logo

riff's Introduction

riff is for functions

A FaaS for Kubernetes

Installation

You can install the system using a Helm chart or by manually building and deploying the components.

Manual install of riff

Prerequisites

You need:

  • A running 1.7+ Kubernetes cluster with at least 4GB of memory. These instructions assume minikube for now.

    Tip
    We recommend using Minikube v0.23.0 or v0.24.1 and avoiding v0.24.0 due to some DNS issues
    minikube start --memory=4096
  • Git installed.

  • A Java 8 environment.

  • A working Go environment, with clones of the customized fabric8io/kubernetes-model, the function-sidecar repository, the topic-controller repository and the http-gateway repository.

    cd $(go env GOPATH)   #defaults to ~/go
    git clone -o upstream https://github.com/projectriff/kubernetes-model src/github.com/fabric8io/kubernetes-model/
    git clone -o upstream https://github.com/projectriff/function-sidecar src/github.com/projectriff/function-sidecar/
    git clone -o upstream https://github.com/projectriff/topic-controller src/github.com/projectriff/topic-controller/
    git clone -o upstream https://github.com/projectriff/http-gateway src/github.com/projectriff/http-gateway/
  • A clone of the riff, function-controller, java-function-invoker, node-function-invoker, shell-function-invoker and python2-function-invoker repos.

    Note
    These repos should be cloned under a unique root directory since we will be using relative paths during the build.
    #cd <some_root_dir>
    git clone -o upstream https://github.com/projectriff/riff.git
    git clone -o upstream https://github.com/projectriff/function-controller.git
    git clone -o upstream https://github.com/projectriff/java-function-invoker.git
    git clone -o upstream https://github.com/projectriff/node-function-invoker.git
    git clone -o upstream https://github.com/projectriff/shell-function-invoker.git
    git clone -o upstream https://github.com/projectriff/python2-function-invoker.git

From now on, this README assumes you’re running commands from the riff repository clone:

cd riff

Build the kubernetes-model jar Enhanced with the Types for the CustomResources

./build-model upstream riff

Point your local Docker environment to the Docker environment running in minikube:

eval $(minikube docker-env)

Build the Function Sidecar, HTTP Gateway and Topic Controller

./build-function-sidecar upstream master
./build-http-gateway upstream master
./build-topic-controller upstream master

Setup the Kubernetes environment

Create Function and Topic Custom Resource Definitions:

kubectl apply -f config/types

Build the Function Controller

./build-function-controller upstream master

Build the java-function-invoker, node-function-invoker, shell-function-invoker and python2-function-invoker

./build-function-invokers upstream master

Deploy Kafka/Zookeeper

kubectl apply -f config/kafka

Deploy RIFF

kubectl apply -f config

If your cluster has RBAC enabled, then you also need to create a Role and a RoleBinding:

kubectl apply -f config/rbac

Deploy Tracing (Zipkin) Dashboard

kubectl apply -f config/zipkin

See how to use the dashboards.

To tear it all down

Once you’re done playing with riff (see samples below), you can destroy everything created above by running

./teardown

Try Some Samples

With riff running try some of the samples.

riff's People

Contributors

trisberg avatar markfisher avatar ericbottard avatar jldec avatar

Watchers

James Cloos avatar  avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.