Skip to content
This repository has been archived by the owner on Mar 13, 2021. It is now read-only.

Commit

Permalink
Prepare for 0.0.4 release
Browse files Browse the repository at this point in the history
- add riff CLI instructions
  • Loading branch information
trisberg committed Feb 20, 2018
1 parent 2fbd6af commit 029cfaf
Show file tree
Hide file tree
Showing 3 changed files with 103 additions and 34 deletions.
13 changes: 6 additions & 7 deletions Development-Helm-install.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@ Install the development version of the riff chart in the default namespace. When
helm install --name control riffrepo/riff --devel --set rbac.create=false --set httpGateway.service.type=NodePort
----


[TIP]
====
Alternatively, install riff in the `riff-system` namespace:
Expand Down Expand Up @@ -103,29 +102,29 @@ NOTE: The same commands work for all of the riff components: `functionController

* Overriding the version of a riff component:
+
To set the version tag for the `functionController` to `0.0.4-build.1` use something like the following:
To set the version tag for the `functionController` to `0.0.5-build.1` use something like the following:
+
[source, bash]
----
helm install riffrepo/riff --name control --set functionController.image.tag=0.0.4-build.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
helm install riffrepo/riff --name control --set functionController.image.tag=0.0.5-build.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
----

* Overriding the image repository and version tag of a riff component with a custom built component image:
+
To set the image repository to `mycustom/function-controller` and the version tag to `0.0.4-test.1` for the `functionController`, use something like the following:
To set the image repository to `mycustom/function-controller` and the version tag to `0.0.5-test.1` for the `functionController`, use something like the following:
+
[source, bash]
----
helm install riffrepo/riff --name control --set functionController.image.repository=mycustom/function-controller --set functionController.image.tag=0.0.4-test.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
helm install riffrepo/riff --name control --set functionController.image.repository=mycustom/function-controller --set functionController.image.tag=0.0.5-test.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
----

* Overriding the version of the `sidecar` component:
+
The `sidecar` component is only used by the `functionController`, so to set the version for the `sidecar` to `0.0.4-build.1` use something like the following:
The `sidecar` component is only used by the `functionController`, so to set the version for the `sidecar` to `0.0.5-build.1` use something like the following:
+
[source, bash]
----
helm install riffrepo/riff --name control --set functionController.sidecar.image.tag=0.0.4-build.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
helm install riffrepo/riff --name control --set functionController.sidecar.image.tag=0.0.5-build.1 --devel --set rbac.create=false --set httpGateway.service.type=NodePort
----

==== Installing locally built snapshot components with Minikube
Expand Down
118 changes: 94 additions & 24 deletions Getting-Started.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,9 @@ For a cluster that does not have RBAC enabled use:
helm init
----

For a cluster that has RBAC enabled use:
[NOTE]
====
For a cluster that has RBAC enabled use (must connect with cluster admin rights):
[source, bash]
----
Expand All @@ -33,7 +35,9 @@ kubectl create clusterrolebinding tiller --clusterrole cluster-admin --serviceac
helm init --service-account=tiller
----
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.
====

TIP: 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.

== Add the riff repository to your helm configuration

Expand All @@ -57,61 +61,75 @@ helm search riff -l

== [[current]]Install the current riff release

=== Install riff using a Kubernetes cluster supporting LoadBalancer
Starting with the 0.0.4 version we have separated the Kafka installation from the riff chart. This requires an extra step of installing Kafka in order to use riff. You can use the single-node Kafka chart provided by riff or the three-node kafka/zookeeper service provided by Kubeapps.

Install the riff helm chart as follows:
=== Install Kafka chart

For an install with default configuration and no RBAC enabled use:
We provide a lightweight single node Kafka installation in the `riffrepo/kafka` chart. This works well for development purposes.

Create the `riff-system` namespace:

[source, bash]
----
helm install riffrepo/riff --version 0.0.3 --name demo
kubectl create namespace riff-system
----

[NOTE]
====
For a cluster that has RBAC enabled add `--set create.rbac=true`:
Install the kafka/zookeeper service provided by riff using:

[source, bash]
----
helm install riffrepo/riff --name demo --set create.rbac=true
helm install --name transport --namespace riff-system riffrepo/kafka
----
====

[WARNING]
[TIP]
====
The 0.0.3 version of riff needs a fix to the RBAC configuration that is provided in version `0.0.3-rbac` of the chart. Use the following command to install riff `0.0.3` with RBAC enabled:
Alternatively, install the three-node kafka/zookeeper service provided by the Kubeapps `incubator/kafka` chart using:
[source, bash]
----
helm install riffrepo/riff --version 0.0.3-rbac --name demo
helm install --name transport --namespace riff-system incubator/kafka
----
Just be aware that this chart requires significantly more resources to run.
====

=== Install riff using a Kubernetes cluster not supporting LoadBalancer (e.g. minikube)
=== Install riff using a Kubernetes cluster supporting LoadBalancer

For `NodePort` service types (e.g. running on Minikube) configure the httpGateway to use `NodePort`:
Install the riff helm chart as follows:

For an install with default configuration and no RBAC enabled use:

[source, bash]
----
helm install riffrepo/riff --version 0.0.3 --name demo --set httpGateway.service.type=NodePort
helm install riffrepo/riff --version 0.0.4 --name demo --set create.rbac=false
----

[NOTE]
====
For a cluster that has RBAC enabled add `--set create.rbac=true`:
For a cluster that has RBAC enabled use (`create.rbac` is `true` by default):
[source, bash]
----
helm install riffrepo/riff --name demo --set create.rbac=true --set httpGateway.service.type=NodePort
helm install riffrepo/riff --version 0.0.4 --name demo
----
====

[WARNING]
=== Install riff using a Kubernetes cluster not supporting LoadBalancer (e.g. minikube)

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

[source, bash]
----
helm install riffrepo/riff --version 0.0.4 --name demo --set create.rbac=false --set httpGateway.service.type=NodePort
----

[NOTE]
====
The 0.0.3 version of riff needs a fix to the RBAC configuration that is provided in version `0.0.3-rbac` of the chart. Use the following command to install riff `0.0.3` with RBAC enabled:
For a cluster that has RBAC enabled use (`create.rbac` is `true` by default):
[source, bash]
----
helm install riffrepo/riff --version 0.0.3-rbac --name demo --set httpGateway.service.type=NodePort
helm install riffrepo/riff --version 0.0.4 --name demo --set httpGateway.service.type=NodePort
----
====

Expand All @@ -128,8 +146,6 @@ kubectl get svc,deployments,pods,functions,topics

The provided Helm chart installs the following components:

* Kafka and Zookeeper - the message broker used by the riff components

* Topic Controller - the controller that watches the Topic resources and creates new topics in Kafka

* Function Controller - the controller that watches the Function resources and deploys function images together with the sidecar image
Expand All @@ -142,3 +158,57 @@ The provided Helm chart installs the following components:
----
helm delete --purge demo
----

== [[CLI]]Install the current riff CLI tool

Starting with the 0.0.4 version we provide a CLI tool written in Go that makes it easy to create and deploy functions.
Install the CLI by following the instructions on the https://github.com/projectriff/riff/releases[riff release page].

=== [[cli-config]]riff CLI configuration

The riff CLI can be configured either using environment variables or using a config file.
The config file to be used can be set using `--config` option and it defaults to `$HOME/.riff.yaml`.

Environmant variables are prefixed with `RIFF_` and the variables from the following example are supported:

```
RIFF_VERSION=0.0.5-snapshot
RIFF_USERACCOUNT=myaccount
RIFF_NAMESPACE=test
RIFF_PUBLISH_NAMESPACE=riff-system
```

For the config file, you can create a `~/.riff.yaml` file with something like the following content:

```
riffVersion: 0.0.5-snapshot
useraccount: myaccount
namespace: test
publishNamespace: riff-system
```

TIP: the `publishNamespace`/`RIFF_PUBLISH_NAMESPACE` setting is useful when running the http-gateway in the `riff-system` namespace
and the functions in `default` or a `test` namespace

=== [[cli-completion]]riff CLI bash completion

The riff CLI command supports generating a bash completion file in the same way as the `kubectl` command does.

==== [[cli-completion-macos]]riff CLI bash completion on macOS

If you use https://brew.sh/[Homebrew] on a Mac you can install the completion file using:

```
brew install bash-completion
riff completion bash > $(brew --prefix)/etc/bash_completion.d/riff
```

==== [[cli-completion-linux]]riff CLI bash completion on Linux

If you use Linux you can installl the completion file using:

```
. <(riff completion bash)
```

TIP: You can edit your `.bashrc` file to have this automatically loaded on future shell runs.
6 changes: 3 additions & 3 deletions README.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -6,10 +6,10 @@ A FaaS for Kubernetes

== Installation of latest release

You can install the latest (0.0.3) release using link:Getting-Started.adoc[a Helm chart].
You can install the latest (0.0.4) release using link:Getting-Started.adoc[a Helm chart].

The https://github.com/projectriff/riff/tree/v0.0.3/samples[0.0.3 samples] will work together
with the https://github.com/projectriff/riff/releases[0.0.3 CLI].
The https://github.com/projectriff/riff/tree/v0.0.4/samples[0.0.4 samples] will work together
with the https://github.com/projectriff/riff/releases[0.0.4 CLI].

Samples on the git master branch of this repo have been updated to work with recently modified
invokers and can be deployed using the new go CLI. See below for build instructions.
Expand Down

0 comments on commit 029cfaf

Please sign in to comment.