Skip to content

BrianMMcClain/riff-demos

master
Switch branches/tags

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?
Code

Latest commit

 

Git stats

Files

Permalink
Failed to load latest commit information.
Type
Name
Latest commit message
Commit time
 
 
 
 

NOTE: riff has gone through some major changes since these demos have been written, and as such this repo will be updated. Until then however, check out the Getting Started with Riff on Minikube blog on the Project riff website!

TODO:

  • Rewrite Install Script
  • Rewrite Clean Script
  • Port demos
  • Update README

Riff Demos

A collection of demo functions and helper scripts to get up and running with Riff, an OSS solution that provides Functions-as-a-Service for Kubernetes.

install-riff.sh

This script will handle installing and configuring minikube, helm and riff on OSX, however it is up to the user to install VirtualBox and Docker ahead of time

  1. Install VirtualBox
  2. Install Docker
  3. Run the install-riff.sh script
  4. Setup your shell environment by running the commands displayed once the script finishes executing:
eval $(minikube docker-env)
export GATEWAY=`minikube service --url demo-riff-http-gateway`
export HEADER="Content-Type: text/plain"

If you'd like to keep an eye on what pods, topics and functions are configured, you can watch the status of minikube with the following:

watch -n 3 kubectl get functions,topics,pods,services,deploy

NOTE: This may give an error until you configure your first function, this is expected.

clean-riff.sh

This script will iterate over all the existing applied functions, deleting them, their topics and any existing running pods. It will then delete and purge the existing Riff install and then finally reinstall it.

Functions

The functions directory contains a series of demos to show off various features of Riff. A great place to start is in the echo example, which contains examples of the same functionality in multiple supported languages. Every demo will include a README on how to setup and run them.

Stopping and Starting Minikube

Should you need to stop the VM, it's recommended that do so via the Minikube CLI, such as:

minikube stop

This will gracefully shut down Kubernetes and the VM it's running on. Then, to restore it, you can simply run:

minikube start

Which will bring everything back up to how it was previously running. Once the command returns, it will take some time for the pods to be back up and running, so be sure to monitor their progress with:

watch -n 3 kubectl get functions,topics,pods,services,deploy

Tearing It Down

If you need to tear down the whole environment (Riff, Minikube, etc.) the easiest and quickest way is to simply delete the Minikube instance. To do so gracefully and easily, the recommended way is via:

minikube delete

About

A collection of demo functions and helper scripts to get up and running with Riff

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published