Install Hkube

Prerequisites#


Hkube requires a working installation of kubernetes.
There are many options for local k8s installations. e.g Minikube or microk8s.

Hkube is installed using helm. Both helm 2 and the newer helm 3 should work.

Make sure kubectl is configured to your cluster.
In order to collect algorithm logs, and create builds, Hkube requires that certain pods will run in privileged security permissions. Consult your kubernetes installation to see how to do that.

These instructions assume the use Minikube and helm 3

Click here for Openshift instructions

Helm repository setup#

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

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

Start minikube#

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

docker context use default

This will be your output:

default
Current context is now "default"

Next:


minikube start --driver docker --addons ingress --addons registry \
  --addons registry-aliases --addons storage-provisioner
# verify that all pods are running
kubectl get pods -A
    

Installing the Chart#

To install the chart with the release name hkube:

Also set the registry to the internal registry

helm install hkube --set build_secret.docker_registry=registry.minikube --set build_secret.docker_registry_insecure=true hkube/hkube

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

Open the dashboard#

Before starting your journey, verify that the requiered resources have finished loading (make sure to copy the whole line):

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

Once it let's you know the resources have been successfully rolled out, get the IP address of your minikube instance

minikube ip

and browse to the dashboard at http://<minikube_ip_here>/hkube/dashboard/

TL;DR;#

$ helm repo add hkube http://hkube.org/helm/
$ helm install hkube hkube/hkube

Uninstalling the Chart#

$ helm delete hkube

Configuration#

The default installation of HKube (with default values) is designed for local development.
It will install:

  • etcd cluster for state management
  • redis cluster for queues
  • minio for 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 →Install CLI