A FaaS for Kubernetes
| Pipelines | Component Builds | Invoker Builds | |||
|---|---|---|---|---|---|
You can install the system using a Helm chart or by manually building and deploying the components.
You need:
-
A running 1.7+ Kubernetes cluster. These instructions assume minikube for now.
TipWe recommend using Minikube v0.23.0 or v0.24.1 and avoiding v0.24.0 due to some DNS issues minikube start
-
Git installed.
-
A Java 8 environment.
-
A working Go environment, with clones of the function-sidecar, function-controller, topic-controller and http-gateway repositories.
cd $(go env GOPATH) #defaults to ~/go git clone -o upstream https://github.com/projectriff/function-sidecar src/github.com/projectriff/function-sidecar/ git clone -o upstream https://github.com/projectriff/function-controller src/github.com/projectriff/function-controller/ 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, java-function-invoker, node-function-invoker, shell-function-invoker and python2-function-invoker repos.
NoteThese 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/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 riffeval $(minikube docker-env)This builds the Function Sidecar, HTTP Gateway, Topic Controller, and Function Controller:
./build-function-sidecar
./build-http-gateway
./build-topic-controller
./build-function-controllerThis builds the java-function-invoker, node-function-invoker, shell-function-invoker, and python2-function-invoker:
./build-function-invokersThis creates the Function and Topic CRDs (Custom Resource Definitions):
kubectl apply -f config/typesThis deploys the HTTP Gateway, Topic Controller, and Function Controller:
kubectl apply -f configIf your cluster has RBAC enabled, then you also need to create a Role and a RoleBinding:
kubectl apply -f config/rbacWith riff running try some of the samples.