Configuring a Services Repository for a Cluster#
Warning
This page is a work in progress.
Intro#
In Create a New Kubernetes Beamline we created a new beamline repository for a Kubernetes cluster. The copier template is capable of fully configuring the repo for the following types of cluster:
a local k3s cluster created in Setup a Kubernetes Cluster
your DLS fedid namespace in the Pollux cluster
a dedicated beamline cluster at DLS
a shared accelerator cluster at DLS
If you have a cluster that is not in the above list then you will need edit your environment.sh and services/values.yaml files accordingly. The following sections introduce the details of this process.
Cluster Topologies#
There are two supported topologies for beamline clusters:
shared cluster with multiple beamlines’ IOCs running in the same cluster
dedicated cluster with a single beamline’s IOCs running in the cluster
If you are working with the single node k3s cluster set up in the previous tutorial then this will be considered a dedicated cluster.
If you are creating a real DLS beamline then this will also be a dedicated cluster. However if your repo contains a set of accelerator IOCs this will share the single accelerator cluster amongst several serives repositories and is therefore a shared cluster.
If you are working with one of the test beamlines at DLS then these are usually shared topology and are set up as nodes on the Pollux cluster.
Other facilities are free to choose the topology that best suits their needs.
Dedicated Clusters#
In the dedicated cluster topology we would usually want to let the IOCs run on any of the worker nodes in the cluster. In this case the only thing that is required is a namespace in which to run your IOCs.
By convention we use a namespace like t03-beamline
for this purpose. This namespace will need the appropriate permissions to allow the IOCs to run with network host OR you will expose your PVs by running a ca-gateway in the cluster. At DLS we have chosen to use network host for our dedicated clusteres because:
we prefer not to pass the Channel Access traffic through the gateway
other protocols such as GigE Streaming also require network host because they are not NAT friendly
TODO - these following sections are WORK IN PROGRESS.
Environment Setup#
Every services repository has an environment.sh
file used to configure your shell so that the command line tools know which cluster to talk to. Up to this point we have been using the local docker or podman instance, but here we have configured it to use the the cluster. The copier template should have created the correct settings in environment.sh for you. But you can review them by if needed here The Environment Configuration File.
TODO pull the above ref into this page and update it.
Setting up the Beamline Helm Chart Defaults#
You do not need to understand helm in detail to deploy IOCs to the cluster. But it may be instructive to understand what is happening under the hood. You will need to know how to edit the values.yaml files to configure your charts for your individual cluster topology.
TODO incomplete.