Architecture
Here below a sketch of an existing beamline repo referring to SCS.
Beamline tree
Anchor | ||||
---|---|---|---|---|
|
Each beamline in EPIK8S has a GIT project associated. This GIT project has:
- opi directory that points to a OPI git project that contains the interface of the given beamline;
- deploy directory that has the format of an helm chart and contains instruction on what deploy on k8s (Kubernetes);
- config directory that contains initialisations and configurations for:
- iocs: iocs of your beamline;
- services: epics services (cagateway, archivers...);
- applications: things that are not iocs nor services, typically support applications for importing, simulation, cronjobs.
As you can see, the Beamline Tree can be composed by other git submodules.
Code Block | ||||
---|---|---|---|---|
| ||||
├── README.md
├── config
│ ├── applications
│ │ ├── flame-state-import <-- a project submodule
│ │ └── icpdastemp01
│ ├── iocs
│ │ ├── mrf01
│ │ ├── pitaya
│ │ ├── temp01
│ │ └── yag-screens
│ └── services
│ └── cagateway
├── deploy
│ ├── Chart.yaml
│ ├── templates
│ │ └── epik8.yaml
│ └── values.yaml
├── opi <-- Beamline OPI git project submodule
│ ├── Launcher.bob
│ ├── README.md
│ ├── deploy
│ │ └── update-opi.yaml
│ ├── env.sh
│ ├── phoebus_mrf_interface <-- OPI git project submodule
│ │ ├── MRFIOC_EVG.bob
│ │ ├── MRFIOC_EVR0.bob
│ │ ├── MRFIOC_EVR1.bob
│ │ ├── README.md
│ │ ├── _evg_mxc.opi
│ │ ├── _evg_trigevt.opi
│ │ ├── _evrdlygen.opi
│ │ ├── _evrinput.opi
│ │ ├── _evroutput.opi
│ │ ├── evg
│ │ ├── evm-fct.opi
│ │ ├── evr
│ │ ├── evr-expert.opi
│ │ └── settings.ini
│ ├── ptts
│ │ ├── Timing.bob
│ │ ├── Timing_EVR.bob
│ │ ├── Timing_EVR_Main.bob
│ │ ├── Timing_Output.bob
│ │ ├── Timing_Output.opi
│ │ ├── external$py.class
│ │ ├── scripts
│ │ └── support
│ ├── rp-opi <-- git project submodule
│ │ ├── LICENSE
│ │ ├── Makefile
│ │ ├── README.md
│ │ ├── RedPitayaSup
│ │ ├── RedPitayaTestApp
│ │ ├── configure
│ │ ├── iocBoot
│ │ └── opi
│ ├── settings.ini
│ ├── settings_template.ini
│ └── start.sh
└── sparc-deploy.yaml |
Create a new EPIK8s beamline
A bunch of tools have been developed to help EPIK8s beamlines creation and management.
Install EPIK8S tools
Code Block | ||||
---|---|---|---|---|
| ||||
## create an environment
python3 -m venv epik8s
source epik8s/bin/activate
pip3 install epik8s-tools |
Create your beamline i.e testbeamline
Code Block | ||||
---|---|---|---|---|
| ||||
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" |
This command will create a Beamline tree, the script needs some information coming from K8S installation.
In particular if you want to fix IPs of your IOC to work around CA/PVA bugs you need to know the service cidr.
iocbaseip = service cidr
cagatewayip = first unused IP from metallb metallb
pvagatewayip = second unused IP from metallb metallb