Installation Guide

Welcome! This guide will get you up and running with Fission on a Kubernetes cluster.

Cluster preliminaries

If you don’t have a Kubernetes cluster, here’s a quick guide to set one up.

Let’s ensure you have the Kubernetes CLI and Helm installed and ready. If you already have helm, skip ahead to the fission install.

Kubernetes CLI

Ensure you have the Kubernetes CLI.

You can get the Kubernetes CLI for OSX like this:

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/darwin/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin

Or, for Linux:

$ curl -LO https://storage.googleapis.com/kubernetes-release/release/$(curl -s https://storage.googleapis.com/kubernetes-release/release/stable.txt)/bin/linux/amd64/kubectl && chmod +x kubectl && sudo mv kubectl /usr/local/bin

Ensure you have access to a cluster; use kubectl to check your Kubernetes version:

$ kubectl version

We need at least Kubernetes 1.6 (older versions may work, but we don’t test them).

Helm

Helm is an installer for Kubernetes. If you already use helm, skip to the next section.

First, you’ll need the helm CLI:

On OS X:

$ curl -LO https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-darwin-amd64.tar.gz

$ tar xzf helm-v2.7.0-darwin-amd64.tar.gz

$ mv darwin-amd64/helm /usr/local/bin

On Linux:

$ curl -LO https://storage.googleapis.com/kubernetes-helm/helm-v2.7.0-linux-amd64.tar.gz

$ tar xzf helm-v2.7.0-linux-amd64.tar.gz

$ mv linux-amd64/helm /usr/local/bin

Next, install the Helm server on your Kubernetes cluster:

On Google Kubernetes Engine (GKE):

To avoid RBAC related issues on GKE use the following steps to install helm using a dedicated service account.

$ kubectl create serviceaccount --namespace kube-system tiller

$ kubectl create clusterrolebinding tiller-cluster-rule --clusterrole=cluster-admin --serviceaccount=kube-system:tiller

$ helm init --service-account tiller --upgrade

On Other Kubernetes installations:

$ helm init

Install Fission

Minikube

Since minikube 0.26.0 the default bootstrapper is kubeadm which enables RBAC by default. For those who work on versions before 0.26.0, please follow the steps below to enable RBAC.

# For minikube before version 0.26.0
$ minikube start --extra-config=apiserver.Authorization.Mode=RBAC

Then, you should see the cluster role cluster-admin.

$ kubectl get clusterroles cluster-admin
NAME            AGE
cluster-admin   44d

Install fission with helm

$ helm install --namespace fission --set serviceType=NodePort,routerServiceType=NodePort https://github.com/fission/fission/releases/download/0.9.2/fission-all-0.9.2.tgz

The serviceType variable allows configuring the type of Kubernetes service outside the cluster. You can use ClusterIP if you don’t want to expose anything outside the cluster.

Cloud hosted clusters (GKE, AWS, Azure etc.)

$ helm install --namespace fission https://github.com/fission/fission/releases/download/0.9.2/fission-all-0.9.2.tgz

Minimal version

The fission-all helm chart installs a full set of services including the NATS message queue, influxDB for logs, etc. If you want a more minimal setup, you can install the fission-core chart instead:

$ helm install --namespace fission https://github.com/fission/fission/releases/download/0.9.2/fission-core-0.9.2.tgz

Install the Fission CLI

OS X

Get the CLI binary for Mac:

$ curl -Lo fission https://github.com/fission/fission/releases/download/0.9.2/fission-cli-osx && chmod +x fission && sudo mv fission /usr/local/bin/

Linux

$ curl -Lo fission https://github.com/fission/fission/releases/download/0.9.2/fission-cli-linux && chmod +x fission && sudo mv fission /usr/local/bin/

Windows

For Windows, you can use the linux binary on WSL. Or you can download this windows executable: fission.exe

Run an example

Finally, you’re ready to use Fission!

$ fission env create --name nodejs --image fission/node-env:0.9.2

$ curl -LO https://raw.githubusercontent.com/fission/fission/master/examples/nodejs/hello.js

$ fission function create --name hello --env nodejs --code hello.js

$ fission function test --name hello
Hello, world!

For a compiled language like Go:

$ fission env create --name go --image fission/go-env:0.9.2 --builder fission/go-builder:0.9.2

$ curl -LO https://raw.githubusercontent.com/fission/fission/master/examples/go/hello.go

$ fission function create --name gohello --env go --src hello.go --entrypoint Handler

$ fission function test --name gohello
Hello, world!

What’s next?

If something went wrong, we’d love to help – please drop by the slack channel and ask for help.

Check out the examples for some example functions.