...
| Code Block | ||||
|---|---|---|---|---|
| ||||
- name: "mynewioc"
asset: "https://confluence.infn.it/x/nYD8DQ" ## optional link to the asset
charturl: 'https://baltig.infn.it/epics-containers/ioc-chart.git'
iocprefix: "LEL:DIA" ## iocprefix that can be used in start.sh to change dynamically prefix of different instances
iocroot: ""
securityContext:
privileged: true
runAsUser: 0
dataVolume:
accessMode: 'ReadWriteOnce' ## space and type required to run
size: 8Mi
gitinit: true ## use default beamline repository and as path <config>/iocs/<mynewioc>
## is possible (but not suggested) to define a custom repository as starting point
|
An simple example took from (https://baltig.infn.it/lnf-da-control/dafne-k8s-ecs/-/tree/main/config/ioc/ioc-dafne-accumulator-orbit?ref_type=heads):
If the application/ioc is generic a more generic approach should be followed decoupling the source and the startup. In this approach the configuration of the IOC resides in a dedicated directory <TARGET ECS>/config/ioc of the target K8s ECS see for instance https://baltig.infn.it/lnf-da-control/dafne-k8s-ecs/-/tree/main/config/ioc
Follow this steps:
...
| Code Block | ||||
|---|---|---|---|---|
| ||||
git clone https://baltig.infn.it/lnf-da-control/<BEAMLINE>-k8s-ecs.git --recurse-submodules |
...
| language | yml |
|---|---|
| title | Application yaml |
...
Out Cluster
This is the case of devices that have an IOC embedded. This case EPIK8S will transfer the configuration on the remote target and will start the IOC via ssh.
NOTE: the remote IOC must have sshd and an authorised key to perform ssh commands.
| Code Block | ||||
|---|---|---|---|---|
| ||||
- name: "mrf01"
asset: "https://confluence.infn.it/x/nYD8DQ" |
...
|
...
charturl: 'https://baltig.infn.it/epics-containers/ioc-launcher-chart.git' |
...
iocname: |
...
"mrf01" |
...
iocprefix: |
...
"MRF01" host: "plsparcmrf001.lnf.infn.it" ## HOST |
...
user: "root" ## USER workdir: "/home/nat/progetti/mrfioc2/iocBoot/epik8s" ## WORKDIR (where transfer config/iocs/mrf01 configuration) |
...
exec: |
...
"start.sh"
|
Commit the deploy
Once your deploy configuration is ready you should commit.
| Code Block | ||||
|---|---|---|---|---|
| ||||
cd <EPIK8Sfolder/>
git commit -m "my comment" .
git push origin
|
ArgoCD after few minutes will update the cluster.
The status should be visible on https://argocd-server-argocd.apps.okd-datest.lnf.infn.it/applications
...
Update EPICS CA clients
If you want your new IOC be visible to all EPICS CA clients you should restart ca-gateway service via ArgoCD. This could bring few seconds of services interruption
...
.
Setup Phoebus and develop the OPI for your softioc
...