Skip to content
This repository has been archived by the owner on Jul 19, 2022. It is now read-only.

Overview of Pivotal's opinion about Function-as-a-Service (FaaS). Sample functions included

License

Notifications You must be signed in to change notification settings

vmware-archive/riff-in-a-nutshell-demo

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

36 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riff is for functions

As announced during Wednesday’s SpringOne keynote, riff provides developers with a service for executing Functions in response to Events.

riff demo’s key takeaways

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 using minikube. To get riff 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

Getting started

Clone this Github repo

git clone https://github.com/Pivotal-Field-Engineering/riff-in-a-nutshell-demo.git

Run Minikube

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
Ensure you are pointing to Minikube’s cluster
kubectl config use-context minikube

Initialize Helm

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.

Install riff’s Helm Chart

This helm chart deploys riff and its required services to a Kubernetes Cluster.

Add the riff repository to your helm environment

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

To start from scratch, tear it all down, in case there is an existing installation

helm delete demo --purge

Monitor the installation

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

Install riff on MiniKube

For NodePort service types (e.g. running on Minikube) configure the httpGateway to use NodePort:

helm install riffrepo/riff --name demo --set httpGateway.service.type=NodePort

Before proceeding with the Labs

Wait for all riff’s pods to change to RUNNING status as described below:

riff

Labs

Once you get riff running, you can try one or more of the following functions:

About

Overview of Pivotal's opinion about Function-as-a-Service (FaaS). Sample functions included

Resources

License

Security policy

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published