Skip to content

MehmedMazlum/riff

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

riff is for functions

Installation

You can install the system using a Helm chart or by manually building and deploying the components.

Manual install of riff

Prerequisites

You need:

  • A running 1.7+ Kubernetes cluster. These instructions assume minikube for now.

    Tip
    We 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.

    Note
    These 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 riff

Point your local Docker environment to the Docker environment running in minikube

eval $(minikube docker-env)

Build the core riff components

This builds the Function Sidecar, HTTP Gateway, Topic Controller, and Function Controller:

./build-function-sidecar
./build-http-gateway
./build-topic-controller
./build-function-controller

Build the function invokers

This builds the java-function-invoker, node-function-invoker, shell-function-invoker, and python2-function-invoker:

./build-function-invokers

Deploy Kafka/Zookeeper

kubectl apply -f config/kafka

Deploy the riff custom resources

This creates the Function and Topic CRDs (Custom Resource Definitions):

kubectl apply -f config/types

Deploy the riff core components

This deploys the HTTP Gateway, Topic Controller, and Function Controller:

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

To tear it all down

Once you’re done playing with riff (see samples below), you can destroy everything created above by running

./teardown

Try Some Samples

With riff running try some of the samples.

About

riff is for functions

Resources

License

Contributing

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Shell 51.5%
  • Batchfile 48.5%