In this tutorial, we will install the ioFog Kubernetes Control Plane using Helm.
The Helm Chart installs a set of Custom Resources and an Operator onto the cluster. It then creates a Custom Resource Definition which describes an ioFog Control Plane to be deployed on the cluster. The Operator consumes this CRD and creates deployments for the Controller, Port Manager, and Router, as well as associated services.
First, we need a working Kubernetes cluster. We can simply set up a cluster on the Google Kubernetes Engine (GKE) by following the Creating a cluster tutorial. Using any other managed cluster providers works as well, so do custom installations of Kubernetes, e.g. Minikube.
IoFog also provides tools for infrastructure setup to setup a Kubernetes cluster in case we don't have one available. Please see Platform Tools for more details.
The tutorial requires installation of Helm v3+
and kubectl
executing the deployment.
From now on, we assume we have a running Kubernetes cluster.
Add the ioFog Helm repository to our local index:
helm repo add iofog https://eclipse-iofog.github.io/helm
To list all available version of ioFog Helm chart, including development versions, run:
helm search repo -l --devel iofog/iofog
Install the Chart while specifying user credentials and a target namespace. If we are not using the default namespace, we can use --create-namespace
from Helm v3.2 onwards. Otherwise the namespace must already exist on the cluster. Note that not specifying the version default to latest stable version of ioFog chart, therefore for ioFog releases that have not officially released a stable chart yet, so we need to specify the --version
here manually. To install version 2.0.0
for example, use the following:
helm install my-ecn \
--namespace my-ns --create-namespace \
--version 2.0.0 \
--set user.email=user@domain.com \
--set user.password=any123password345 \
iofog/iofog
The my-ecn
refers to the Helm release name as shown below.
To list all Helm releases, we can simply run helm list
. The result should look like this:
NAME REVISION UPDATED STATUS CHART APP VERSION NAMESPACE
my-ecn 1 Tue Oct 1 21:34:42 2019 DEPLOYED iofog-2.0.0 2.0.0 my-ns
The following is a complete list of all user configurable properties for the ioFog Helm chart. All of the properties are optional and have defaults. Use --set property.name=value
in helm install
to parametrize Helm release. We recommend not changing the image variables, as these are predefined for each ioFog version, and mixing these across versions is not supported.
Property | Default value | Description |
---|---|---|
user.firstName | First | First name of initial user in Controller |
user.surname | Second | Surname of initial user in Controller |
user.email | user@domain.com | Email (login) of initial user in Controller |
user.password | H23fkidf9hoibf2nlk | Password of initial user in Controller |
images.controller | iofog/controller: |
Controller Docker image |
images.operator | iofog/iofog-operator: |
Operator Docker image |
images.portManager | iofog/port-manager: |
Port Manager Docker image |
images.proxy | iofog/proxy: |
Proxy Docker image |
replicas.operator | 1 | Number of replicas of Operator pods |
replicas.controller | 1 | Number of replicas of Controller pods |
Once the installation is complete, you will be able to connect to the ioFog Controller on K8s using iofogctl. Make sure the --namespace
here matches the one used during helm install
step, so iofogctl
can find the correct ECN using your kubeconfig file.
iofogctl --namespace my-ns connect --kube ~/.kube/config --email user@domain.com --pass H23fkidf9hoibf2nlk
To uninstall ioFog stack, simply delete the Helm release.
helm --namespace my-ns delete my-ecn