A CNAB bundle for installing riff
A CNAB runtime is required to install this cnab bundle. Currently, duffle is the only supported runtime.
The high level steps to install riff are:
- Start a kubernetes cluster
- Install duffle which is a CNAB runtime
- Download and install the riff CNAB bundle into the cluster
There are two parameters that can be provided for this bundle
node_port
: set this parameter to true if your kubernetes cluster does not have a LoadBalancer configured. This will ensure that kubernetes services can be accessed via NodePort rather than LoadBalancer.- default value:
false
- default value:
log_level
: set the log level to one ofpanic|fatal|error|warn|info|debug|trace
- default value:
info
- default value:
Once you have a running kubernetes cluster follow the steps below
-
Install duffle by download the latest duffle release for your operating system from duffle's release page, put it somewhere on your path, and make it executable, for example,
chmod +x /usr/local/bin/duffle
. -
Set environment variables required by duffle k8s driver and create the service account
export SERVICE_ACCOUNT=duffle-runtime export KUBE_NAMESPACE=duffle kubectl create namespace $KUBE_NAMESPACE kubectl create serviceaccount "${SERVICE_ACCOUNT}" -n "${KUBE_NAMESPACE}" kubectl create clusterrolebinding "${SERVICE_ACCOUNT}-cluster-admin" --clusterrole cluster-admin --serviceaccount "${KUBE_NAMESPACE}:${SERVICE_ACCOUNT}"
-
install riff
Append
-s node_port=true
as shown below for clusters that do not support LoadBalancer services, like Minikube.duffle install myriff https://storage.googleapis.com/projectriff/riff-cnab/snapshots/riff-bundle-latest.json --bundle-is-file -s node_port=true -d k8s
where
-d k8s
uses the duffle kubernetes driver to run the installer image in kubernetes cluster -
You should now be able to see riff components installed on your kubernetes cluster:
kubectl get pods --all-namespaces
To uninstall, set the SERVICE_ACCOUNT and KUBE_NAMESPACE environment variables as above and use the command:
duffle uninstall myriff -d k8s
- Modify the
cnab/app/kab/manifest.yaml
file to update riff components. - To build the bundle run
duffle build .
- To pin the images used in
duffle.json
andmanifest.yaml
files runmake bundle
.