epik8s-tools
is a Python-based toolset for automating project structure generation, Helm chart creation, and deployment for EPICS (Experimental Physics and Industrial Control System) applications in Kubernetes environments EPIK8s. Designed to simplify complex deployment configurations, this package includes a command-line interface for rendering templates based on YAML configurations, making it easy to manage beamline and IOC (Input/Output Controller) configurations with a consistent structure. A simple guide to bring up a k8s single node cluster (extensible) is microk8s.
Features
- Project Structure Generation: Automatically create directories and files needed for EPICS-based projects.
- Helm Chart Creation: Generate Helm charts for Kubernetes deployments with custom values and templates.
- Docker compose Creation: Generate a docker compose file to run locally, iocs and services of a given epik8s configuration
- OPI Generation: Configure OPI (Operator Interface) panels for each beamline, including macros and settings.
- Support for Ingress and Load Balancers: Configurable settings for CA and PVA gateway IPs and ingress classes.
- Customizable Options: Extensive CLI options to adapt configurations to specific project needs.
Install EPIK8S tools
Code Block |
---|
language | bash |
---|
title | install epik8s tools |
---|
|
## create an environment
python3 -m venv epik8s
source epik8s/bin/activate
pip3 install epik8s-tools |
epik8s-gen
Create your beamline i.e e testbeamline
Code Block |
---|
language | bash |
---|
title | create test beamline |
---|
|
epik8s-gen epik8s-testbeamline --namespace testbeamline --beamlinerepogit https://baltig.infn.it/lnf-da-control/epik8s-testbeamline.git --iocbaseip "10.96.0.0/12" --cagatewayip 10.10.6.109 --pvagatewayip 10.10.6.110 --dnsnamespace "apps.k8s-da.lnf.infn.it" |
...
pvagatewayip = second unused IP from metallb metallb
epik8s-opigen
Create your beamline opi from a beamline yaml configuration
Code Block |
---|
language | shell |
---|
title | create opi for a beamline |
---|
|
epik8s-opigen --yaml tests/eli_values.yaml --projectdir eli-test-opi --controls polrev-icpdas01 polrev-icpdas02 |
epik8s-compose
Test your beamline yaml configuration in docker-compose
Code Block |
---|
language | shell |
---|
title | create docker compose configuration |
---|
|
epik8s-compose --config tests/eli_values.yaml --host-dir ./tests/eli_config --output docker-compose-eli.yaml --pvaport 5175 --exclude archiver |