Skip to content

Installing dependencies manually

Requirement Details
Linux OS Any linux based operating system ( LTS ). For eg. Ubuntu ( v20.04 ). Recommended 12GB RAM and 4(v)CPUs.
Curl curl (short for "Client URL") is a command line tool that enables data transfer over various network protocols
Docker An open source platform that enables developers to build, deploy, run, update and manage containers
Golang Golang version 1.19.5 for linux, to install kind
Kind Kind cluster to run kubernetes cluster locally
Kubectl A command-line tool, allows you to run commands against Kubernetes clusters. Kubernetes cluster 1.21 or higher is required
Helm To define, install, and upgrade Kubernetes applications
IECTL Download latest IECTL binary from IEHUB to create IEM and IED

Installing tools

Follow the steps to install the tools required to setup an IEM and IED.

Installing curl


sudo apt-get install curl


Installing Docker


Get the dependencies

curl -fsSL https://get.docker.com -o get-docker.sh

Execute the script

 sudo sh ./get-docker.sh

Manage Docker as a non-root user

 sudo groupadd docker || true
 sudo usermod -aG docker "$USER" || true
 newgrp docker

NOTICE

Restart the VM if the following error occurs. Got permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get http://%2Fvar%2Frun%2Fdocker.sock/v1.40/containers/json: dial unix /var/run/docker.sock: connect: permission denied

 restart vm


Installing Docker-Compose

Run the below command

  sudo apt install docker-compose


Installing Golang


Get the dependencies

curl -LO https://go.dev/dl/go1.19.5.linux-amd64.tar.gz

Remove any previous Go installation, then extract the archive you just downloaded into /usr/local

 rm -rf /usr/local/go && tar -C /usr/local -xzf go1.19.5.linux-amd64.tar.gz

NOTICE

For any permission related issues, try running the below command

sudo chown -R $(whoami) /usr/local

Add /usr/local/go/bin to the PATH environment variable

 export PATH=$PATH:/usr/local/go/bin

Verify go installation

 go version


Installing Kind


go install sigs.k8s.io/kind@v0.14.0

Update the location

mv $(go env GOPATH)/bin/kind /usr/local/bin/kind

For more informtaion on kind installation and setting up cluster please click here

Installing Helm


Get the dependencies

 curl -fsSL -o get_helm.sh https://raw.githubusercontent.com/helm/helm/main/scripts/get-helm-3

Update the permissions

chmod 700 get_helm.sh

Execute the script

bash +x ./get_helm.sh --version v3.9.2


Installing Kubectl


Get the dependencies

 curl -LO https://dl.k8s.io/release/v1.26.0/bin/linux/amd64/kubectl

Install

sudo install -o root -g root -m 0755 kubectl /usr/local/bin/kubectl

Download IECTL

The IECTL needs to be downloaded manually from IEHUB. Click here to learn more.

Setting up the kind cluster

kind is a tool for running local Kubernetes clusters using Docker container “nodes”. kind was primarily designed for testing Kubernetes itself, but may be used for local development or CI.

Kind cluster creation config template

Retrieve Ip address of ubuntu vm using below command.

ip addr show
 ```

<b>link/ether</b> field of the output is the MAC address (Both for Wi-fi and ethernet connections, MAC address is represented by link/ether). Mostly this will be present in the second line.

---

### Save the below kind config file as `kind-cluster.yml`

```yml
kind: Cluster
apiVersion: kind.x-k8s.io/v1alpha4
networking:
  apiServerAddress: "host-ip" #update host ip address
  apiServerPort: 6443
nodes:
- role: control-plane
  extraPortMappings:
  - containerPort: 80
    hostPort: 80
    listenAddress: "host-ip" #update host ip address
    protocol: TCP
  - containerPort: 443
    listenAddress: "host-ip" #update host ip address
    protocol: TCP
    hostPort: 443
  extraMounts:
  - hostPath: .
    containerPath: /app

Setup Kind cluster


kind create cluster --config /path/to/kind-cluster.yml

Verify the kind cluster creation

kubectl cluster-info --context kind-kind


Namespace creation


kubectl create namespace <namespace>

Secret creation

Before creating the secret for kong gateway, make sure you have the certificates needed to onboard an IEM. You can either use your own TLS Certificates, which are used to terminate the TLS traffic on the Gateway, or you can create these by using openssl commands.

Create a secret for kong gateway containing the certificates for the gateway

NOTICE

The secret has to be created with the same namespace which was created on previous steps.

kubectl -n $namespace create secret tls kongcert --key "out/myCert.key" --cert "out/myCert.crt"
kubectl -n default create secret tls defaultcert --key "out/myCert.key" --cert "out/myCert.crt"