Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Code Block
languagebash
titleBeamLine Tree
├── README.md
├── config
│   ├── applications
│   │   ├── flame-state-import 		
│   │   └── icpdastemp01
│   ├── iocs
│   │   ├── mrf01
│   │   ├── pitaya
│   │   ├── temp01
│   │   └── mynewioc                    <-- add here your folder or git subproject for configuration
│   └── services
│       └── cagateway
├── deploy
│   ├── Chart.yaml
│   ├── templates
│   │   └── epik8.yaml
│   └── values.yaml						<-- add here your IOC to deploy
├─
...


Adding IOC

Suppose your iocname is mynewioc you should create a folder with the same name. This folder should contain a:

...

This script will launch ./scripts/mynewioc (remember scripts scripts is the folder name you gave to your submodule in the previous  step) and will give some parameters and a configuration myconfig.json file that must be added to the mynewioc.


Add IOC configuration to EPIK8s

Once your configuration directory mynewioc  is complete. We need to add to the main git repository.

Code Block
languagebash
titlestart.sh
cd  <EPIK8Sfolder/config/iocs/mynewioc>
chmod a+x start.sh # make start.sh executable
git add start.sh myconfig.json scripts
git commit -m "my comment" .
git push origin



This way we just added the information needed to start the ioc, but we still instruct ArgoCD to launch the IOC in the EPIK8S target infrastructure.


Deploy IOC to EPIK8s infrastructure

We should now add and entry into <EPIK8Sfolder/deploy/values.yaml>

We must distinguish IOC types, the configuration is slightly different if the IOC runs inside the cluster or outside.

In cluster

You must find the iocs section in values.yaml and add your IOC:

Code Block
languageyml
titleDeploy an internal IOC
- 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>



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):

...