A FaaS for Kubernetes
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 with at least 4GB of memory. 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 --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.
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/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-model upstream riff
eval $(minikube docker-env)
./build-function-sidecar upstream master
./build-http-gateway upstream master
./build-topic-controller upstream master
Create Function and Topic Custom Resource Definitions:
kubectl apply -f config/types
Build the java-function-invoker, node-function-invoker, shell-function-invoker and python2-function-invoker
./build-function-invokers upstream master
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
With riff running try some of the samples.