Skip to content

Installation

Follow the steps below to install the IoT Kafka Data Platform in your Kubernetes cluster.

Prerequisites

Please ensure that you have a Kubernetes cluster set up and running before proceeding with the installlation. Further, you will need to have Helm and kubectl installed on your machine.

Getting the Helm Chart

The project is distributed as a helm chart. To get the helm chart, you will first need to log in to the GitHub Container registry:

helm registry login ghcr.io
GitHub Personal Access Token

To log in, you will need to provide your GitHub username and a personal access token. You can create a new token by following the instructions in the GitHub documentation. The token should have the read:packages scope.

Next, download the helm chart from the GitHub Container registry:

helm pull oci://ghcr.io/aureliusenterprise/iot-kafka-data-platform --version v1.8.11

This downloads the helm chart as an archive to your local machine. Extract the archive to a directory of your choice:

tar -xvf iot-kafka-data-platform-v1.8.11.tgz
Where can I find other versions of the helm chart?

You can find the available versions of the helm chart on the GitHub Container page

Automated Installation

The helm chart includes a bash script that automates the rest of the installation process. Navigate to the directory where you extracted the helm chart and run the following command:

bash setup.sh

This installs the IoT Kafka Data Platform in your Kubernetes cluster.

Installation Process

During the installation, the script prompts you to provide the following information:

  1. Confirmation to create the required resources
  2. The GitHub personal access token for pulling the required Docker images
Use your existing token

You can use the same token you created earlier to log in to the GitHub Container registry.

Once the installation is complete, the script will print the URLs to access the services.

Options

The available options for the script are:

Option Description
-n, --namespace Kubernetes namespace to create and use (default: iot-kafka-data-platform)
-p, --path Path to the Helm chart directory (default: script's directory)
-t, --token GitHub personal access token (prompted if not provided)
-u, --username GitHub username (default: derived from git config)
-y, --yes Auto-confirm creation of resources (default: false)
-h, --help Display help message

Security Warning

Do not provide the GitHub personal access token as a plain-text argument to avoid exposing it in the shell history. Instead, pass the token as an environment variable or provide it when prompted.

Manual Installation

If you prefer to install the IoT Kafka Data Platform manually, follow the steps below.

Create a Kubernetes Namespace

Create a Kubernetes namespace where you want to install the IoT Kafka Data Platform:

kubectl create namespace <NAMESPACE>

Replace <NAMESPACE> with the name of the namespace you want to create.

Set Up the GitHub Container Registry Secret

Now you can set up the secret required to pull the images for the helm chart.

Navigate to the directory where you extracted the helm chart and create a file called dockerconfigjson.yml with the following content:

kind: Secret
type: kubernetes.io/dockerconfigjson
apiVersion: v1
metadata:
  name: dockerconfigjson-github-com
stringData:
  .dockerconfigjson: '{ "auths": { "ghcr.io": { "auth":"$AUTH" } } }'

Replace <AUTH> with a base64-encoded string of your GitHub username and personal access token. You can generate the base64-encoded string by running the following command:

echo -n <YOUR_GITHUB_USERNAME>:<TOKEN> | base64

Replace <YOUR_GITHUB_USERNAME> with your GitHub username and <TOKEN> with your personal access token.

Use your existing token

You can use the same token you created earlier to log in to the GitHub Container registry.

Once you have set up the dockerconfigjson.yml file, apply the secret to the Kubernetes namespace you created earlier:

kubectl apply -f dockerconfigjson.yml -n <NAMESPACE>
rm dockerconfigjson.yml

Security Warning

Delete the dockerconfigjson.yml file after applying the secret to avoid exposing your personal access token.

Install the Ingress Controller

Next, install the ingress controller for the Kubernetes cluster:

helm repo add ingress-nginx https://kubernetes.github.io/ingress-nginx
helm install ingress-nginx ingress-nginx/ingress-nginx \ 
    --set controller.allowSnippetAnnotations=true

Install the IoT Kafka Data Platform

Finally, install the IoT Kafka Data Platform helm chart:

helm install iot-kafka-data-platform ./iot-kafka-data-platform -n <NAMESPACE>

Replace <NAMESPACE> with the name of the Kubernetes namespace you created earlier.

Post-Installation

Once installation is complete, you can access the platform through the ingress controller. To get the IP address of the ingress controller, run the following command:

kubectl get svc | grep -E "ingress-nginx-controller\s" | awk "{print $4}"

The services are available at the following URLs:

Service Name URL
Grafana http://<INGRESS_IP>/grafana
Kafka UI http://<INGRESS_IP>/kafka
Node-RED http://<INGRESS_IP>/node-red
Set up a DNS record

Ask your network administrator to set up a DNS record for the ingress controller IP address to make it easier to access the services.