As announced during Wednesday’s SpringOne keynote, riff
provides developers with a service for executing Functions in response to Events.
After completing this lab, you will be familiar with the following riff’s
features:
-
Portability & Kubernetes-native support: How to get
riff
up and running locally usingminikube
. To getriff
running on any Kubernetes cluster either on-premise or in the cloud, please visit:riff’s
Github repo -
Polyglot: How to deploy functions written in Java, NodeJS, Python and Shell. Said functions can support HTTP, gRPC or stdio
-
Event streaming: How to pubish messages to
riff’s
Kafka broker from the outside world -
Scalability: Scale from 0 to 1, from 1 to N and, eventually, back to 0
Required: Minikube v0.23.0, VirtualBox 5.2.2, Docker community edition v17.09.x and Helm v2.7.2
Optional: watch
command line utility
git clone https://github.com/Pivotal-Field-Engineering/riff-in-a-nutshell-demo.git
Check whether Minikube is running or not:
minikube status
If Minikube is not running, execute the following command to run it. We recommend at least 4GB of memory:
Caution
|
There have been some DNS issues reported for Minikube v0.24, we suggest using v0.23 until this has been resolved |
minikube start --memory=4096
Helm is comprised of 2 components: one is the client (helm) the other is the server component (tiller). The helm client runs on your local machine and can be installed using the instructions found here
Once you have the helm client installed you can install the server component.
helm init
Note
|
To verify that the tiller pod has started execute the following command: kubectl get pod --namespace kube-system -l app=helm and you should see the tiller pod running.
|
This helm chart deploys riff
and its required services to a Kubernetes Cluster.
Run the following commands to add the repository:
helm repo add riffrepo https://riff-charts.storage.googleapis.com
helm repo update
Run the following command to see that the riff
chart is available:
helm search riff
helm delete demo --purge
Open a new shell window to monitor the riff
resources that will get created in your cluster. You can see them all using:
watch kubectl get svc,deployments,pods,functions,topics
Once you get riff
running, you can try one or more of the following functions: