Using the SDP Makefile
The ska-sdp-integration repository contains a Makefile which provides targets to simplify deploying and testing the SDP. The following commands should be run from the root directory of the git repository.
If you want to install without access to the repository, using helm and kubectl, follow the instructions here: Installing the SDP stand-alone
This page provides general instructions, most of which are cluster and environment independent. For environment-specific differences see the relevant pages:
Environment variables
The environment variables to control the deployment and testing of the SDP are defined at the top of the Makefile. They are described in the table below.
Environment variable |
Default value |
Description |
|---|---|---|
|
|
Kubernetes namespace for deploying the control system |
|
|
Kubernetes namespace for deploying the processing scripts |
|
|
Name of the Helm chart release |
|
|
Location of the Helm chart repository, may be a directory or name of a remote repository |
|
empty |
Version of the chart to install (useful when using a remote repository) |
|
|
Values file(s) to use to install/upgrade the SDP deployment, may be a list of files separated by spaces |
|
|
Timeout for helm upgrade and helm install |
|
|
Whether |
|
Not set |
Ingress to use to execute tests |
|
|
Client to use to connect to Tango devices in the tests |
|
|
Pytest markers to be used in the tests |
|
|
Additional flags passed to |
The default values are defined to be suitable for testing in Minikube.
If you are using different values from the default ones, you will have to export the environment variables, or use them together with the commands. Alternatively, you can temporarily update the Makefile, but make sure you are working from a branch so that you don’t accidentally commit your changes.
For example:
$ export KUBE_NAMESPACE=default
$ export KUBE_NAMESPACE_SDP=sdp
$ make install-sdp
The above will install SDP into the default namespace and use the sdp namespace
for processing script deployments.
Creating namespaces
Create the namespaces specified in the environment variables with:
$ make create-namespaces
Chart dependencies
If you are using the local copy of the chart to install SDP, you can make sure you have the latest chart dependencies with:
$ make build-chart-dependencies
which will download the dependencies listed in the Chart.lock file. Note
that Helm will not download dependencies from arbitrary URLs; it must know
about the repositories in advance. You may need to add the repositories with
the helm repo add command, e.g.
$ helm repo add skao https://artefact.skao.int/repository/helm-internal
$ helm repo add bitnami https://charts.bitnami.com/bitnami
If you are developing the chart and want to update the dependencies and rebuild
the Chart.lock file, then you should run:
$ make update-chart-dependencies
Using a custom values file
You can specify a custom values.yaml file to be used when SDP is installed,
using the CHART_VALUES environment variable. In this, you can enable
or disable components, and set the parameters for the Persistent
Volume Claim (PVC) to be used for data processing.
The following example will deploy ITango, and will ask SDP to create a PVC with a given storage class:
ska-tango-base:
itango:
enabled: true
ska-sdp:
data-pvc:
create:
enabled: true
storageClassName: nfss1
size: 5Gi
Assuming you save the above into my_values.yaml, export it as follows to be used:
$ export CHART_VALUES=my_values.yaml
There are various custom values files provided in the resources/values directory of the ska-sdp-integration repository.
Deploying the SDP
$ make install-sdp
By default, the SDP will be installed using the local copy of the Helm chart in
the charts directory.
If instead you want to use the published version of the SDP chart from the SKA
Central Artefact Repository, then you can do that using the CHART_REPO
variable. First, add the Helm chart repository:
$ helm repo add skao https://artefact.skao.int/repository/helm-internal
Then install SDP using this repository:
$ make install-sdp CHART_REPO=skao
The install-sdp command upgrades the deployment if it exists,
or installs it if it doesn’t. It has a --wait switch added to it,
which means the command will only return once the deployment has
finished installing/upgrading.
Cleaning up and removing SDP
Once you finished work with SDP, you can use the following commands to clean up your deployment.
Uninstall SDP:
$ make uninstall-sdp
Delete namespaces (optional, only if you created the namespaces)
$ make delete-namespaces