Getting Started

I want to..

Add a new project to SKA organisation

Develop a Tango device

Containerise my solution

Our containerisation standards can be found in the containerisation section.

$ docker -v

  Docker version 1.7.0, build 0baf609

Incorporate my project into the integration environment

We use Kubernetes as orchestration layer - refer to our Orchestration Guidelines.

Once a project is ready to form part of the integrated solution, we need to verify that all prerequisites are installed and working properly.

$ kubectl version

  Client Version: version.Info{Major:"1", Minor:"15", GitVersion:"v1.15.1", GitCommit:"4485c6f18cee9a5d3c3b4e523bd27972b1b53892",
  GitTreeState:"clean", BuildDate:"2019-07-18T09:18:22Z", GoVersion:"go1.12.5", Compiler:"gc", Platform:"linux/amd64"}
  The connection to the server localhost:8080 was refused - did you specify the right host or port?
$ minikube

  Minikube is a CLI tool that provisions and manages single-node Kubernetes clusters optimized for development workflows...
  • Launch Kubernetes.
    • Look out for kubectl is now configured to use “minikube” near the end:
 $ sudo -E minikube start --vm-driver=none --extra-config=kubelet.resolv-conf=/var/run/systemd/resolve/resolv.conf

 😄  minikube v0.34.1 on linux (amd64)
 🤹  Configuring local host environment ...

 ⚠️  The 'none' driver provides limited isolation and may reduce system security and reliability.
 ⚠ ️  For more information, see:
 👉  https://github.com/kubernetes/minikube/blob/master/docs/vmdriver-none.md

 ⚠️  kubectl and minikube configuration will be stored in /home/ubuntu
 ⚠️  To use kubectl or minikube commands as your own user, you may
 ⚠️  need to relocate them. For example, to overwrite your own settings:

   ▪ sudo mv /home/ubuntu/.kube /home/ubuntu/.minikube $HOME
   ▪ sudo chown -R $USER /home/ubuntu/.kube /home/ubuntu/.minikube

💡  This can also be done automatically by setting the env var CHANGE_MINIKUBE_NONE_USER=true
🔥  Creating none VM (CPUs=2, Memory=2048MB, Disk=20000MB) ...
📶  "minikube" IP address is 192.168.86.29
🐳  Configuring Docker as the container runtime ...
✨  Preparing Kubernetes environment ...
   ▪ kubelet.resolv-conf=/var/run/systemd/resolve/resolv.conf
🚜  Pulling images required by Kubernetes v1.13.3 ...
🚀  Launching Kubernetes v1.13.3 using kubeadm ...
🔑  Configuring cluster permissions ...
🤔  Verifying component health .....
💗  kubectl is now configured to use "minikube"
🏄  Done! Thank you for using minikube

Test that the connectivity in the cluster works

$ kubectl get pods -n kube-system
NAME                               READY   STATUS    RESTARTS   AGE
coredns-86c58d9df4-5ztg8           1/1     Running   0          3m24s
...
$ helm

The Kubernetes package manager

To begin working with Helm, run the 'helm init' command:

$ helm init
...

Once Helm is installed, develop a helm chart for the project. Refer to Helm instructions for guidelines.

Install Helm charts from our own repository

The SKAMPI repository is in essence a configuration management repository, which basically just consists of a number of Helm charts and instructions for installing them on a kubernetes cluster.

Installing Helm charts from our own Helm Chart Repository is another option, specifically that enables installing different charts during run-time.

To add the SKA Helm chart repo to your local Helm, simply run

$ helm repo add skatelescope https://nexus.engageska-portugal.pt/repository/helm-chart

Working with the Helm chart repository, including how to package and upload charts to our repository, is described here in detail.

Deploy the TMC prototype and Webjive in kubernetes

The integration gitlab repository can be found at https://gitlab.com/ska-telescope/skampi.

Documentation on deployment can be found at https://developer.skatelescope.org/projects/skampi/en/latest/README.html

Add the helm chart to the skampi repository: Integration instructions.

  • Verify k8s integration
    • Launch the integration environment
$  make deploy_all KUBE_NAMESPACE=integration

and verify that the pods are able to startup without any errors

$ watch kubectl get all,pv,pvc,ingress -n integration

Every 2.0s: kubectl get all,pv,pvc -n integration           osboxes: Fri Mar 29 09:25:05 2019

NAME                                          READY   STATUS             RESTARTS   AGE
pod/databaseds-integration-tmc-webui-test-0   1/1     Running            3          117s
pod/rsyslog-integration-tmc-webui-test-0      1/1     Running            0          117s
podtangodb-integration-tmc-webui-test-0      1/1     Running            0          117s
pod/tangotest-integration-tmc-webui-test      1/1     Running            2          117s
pod/tmcprototype-integration-tmc-webui-test   4/5     CrashLoopBackOff   2          117s
pod/webjive-integration-tmc-webui-test-0      4/4     Running            0          117s
...