Install HKube

Prerequisites#


  • HKube requires a working Kubernetes cluster.
  • You can use local Kubernetes like Minikube or microk8s.
  • HKube is installed using Helm. Both Helm 2 and the newer Helm 3 should work.
  • kubectl must be configured to your Kubernetes cluster.
  • HKube needs certain pods to run with privileged permissions for logs and builds; consult your Kubernetes docs on how to enable that.

These instructions assume the use Minikube and Helm 3
Click here for Openshift instructions


Minikube Installation#

1. Helm repository setup#

The chart is hosted in http://hkube.org/helm/ To add the HKube Helm repo to your helm run:

helm repo add hkube http://hkube.org/helm/
helm repo update 

2. Set Docker Context#

Make sure your Docker CLI is using the default context:

docker context use default 

This will be your output:

default
Current context is now "default"

3. Start Minikube#

Currently HKube requires at least 4 cpu cores and 6GB of memory, ingress controller, registry, and dynamic storage.

HKube was tested on Kubernetes v1.23.5, so to run it properly, start Minikube with:

minikube start --driver=docker \
  --addons ingress \
  --addons registry \
  --addons registry-aliases \
  --addons storage-provisioner \
  --kubernetes-version=v1.23.5

4. Wait for All Pods#

Make sure all pods are ready before you continue:

kubectl get pods -A 

5. Install HKube#

Install the HKube chart using Helm:

helm upgrade -i hkube hkube/hkube \
  --set build_secret.docker_registry=registry.minikube \
  --set build_secret.docker_registry_insecure=true \
  --set global.hkube_url=https://192.168.49.2/hkube \
  --set global.ingress.use_regex=true \
  --timeout 15m 
Note: the IP `192.168.49.2` is taken out of the command `minikube ip`. Verify it's your minikube IP.

This command installs hkube in a minimal configuration for development. See below for production install.
Be patient. This can take some time depending on your internet connection.

6. Verify HKube Deployment#

Before starting your journey, verify that the required components have fully rolled out:

kubectl rollout status deployment/simulator --watch
kubectl rollout status deployment/api-server --watch 

7. Access HKube Dashboard#

Once the components have been successfully rolled out, get the Minikube IP:

minikube ip 

Finally, open your browser and access the dashboard at:

https://<minikube_ip_here>/hkube/dashboard/

Uninstalling HKube#

To remove the HKube release from your cluster:

helm delete hkube 

Configuration Details#

The default HKube installation is meant for local development. It includes:

  • etcd for storing internal state
  • redis for queues and messaging
  • minio as an object storage
  • Small configuration for HKube

Production Deployment#

General#

  1. for HA installation, a HA kubernetes cluster is needed.
  2. HKube uses needs persistent storage. The default installation uses minio hosted in the cluster. For production installations it is recommended to create a dedicated s3 server, or use a PVC.
  3. to enable running multiple pipelines set the number of pipeline driver to a higher number (the default is 1)

Configuration#

Common configuration options are described below. For a complete list see the helm chart Readme

ParameterDescriptionDefault
global.clusterNameThe dns domain name of the cluster. needed for Jaegercluster.local
global.registryDocker registry for private registries''
global.registry_namespacehkube
global.registry_username''
global.registry_password''
global.registry_insecurefalse
global.registry_skip_tls_verifyfalse
global.storage.fs.pvc.storage_classDynamic storage storageClassName. Empty for default. '-' to disable''
global.storage.s3.access_keyaccess key for s3hkubeminiokey
global.storage.s3.secret_keysecret key for s3hkubeminiosecret
global.storage.s3.urlendpoint url for s3'http://hkube-minio:9000'
env.default_storageselects the storage mode [s3 or fs]s3
jaeger.enableenable install of jaeger and dependenciesfalse
minio.enabletrue
build_secret.docker_registryDocker registry information for automated builds''
build_secret.docker_namespace''
build_secret.docker_username''
build_secret.docker_password''
task_executor.env.pipeline_drivers_amountSet to 30 for a reasonable size1

Specify each parameter using the --set key=value[,key=value] argument to helm install. For example:

helm install hkube hkube/hkube  --set global.clusterName=cluster.local

Alternatively, a YAML file that specifies the values for the parameters can be provided while installing the chart. For example:

helm install hkube hkube/hkube  --values values.yaml
Next →API