...
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.
Updating an existing IOC
Add IOC configuration to EPIK8s
Once your configuration directory mynewioc is complete. We need to add to the main git repository.After a soft IOC, located in the linked repository, has been modified:
| Code Block | ||||
|---|---|---|---|---|
| ||||
cd <EPIK8Sfolder/config/iocs/<ioc_name>/scripts> git pull ## updates to remote changes cd ..mynewioc> chmod a+x start.sh # make start.sh executable git add start.sh myconfig./json scripts/ git commit -m "updatedmy IOC <ioc_name>"comment" . git push origin |
To make the changes effective in the running IOC, you have to restart the related process in argoCD.
Add IOC configuration to EPIK8s
Once your configuration directory mynewioc is complete. We need to add to the main git repository.
| Code Block | ||||
|---|---|---|---|---|
| ||||
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 deploy/values.yaml and add your IOC:
|
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 deploy/values.yaml and add your IOC:
| Code Block | ||||
|---|---|---|---|---|
| ||||
name: "mynewioc"
asset: "https://confluence.infn.it/x/nYD8DQ"
charturl: 'https://baltig.infn.it/epics-containers/ioc-chart.git'
image: baltig.infn.it:4567/epics-containers/epics-py-base | ||||
| Code Block | ||||
| ||||
name: "mynewioc" assetiocprefix: "https://confluence.infn.it/x/nYD8DQSPARC:ORBIT" charturlstart: 'https:"/epics/baltig.infn.it/epics-containers/ioc-chart.git' image: baltig.infn.it:4567/epics-containers/epics-py-base iocprefix: "SPARC:ORBIT"ioc/config/start.sh" ## if your mynewioc has a start.sh this line must be kept start: "/epics/ioc/config/start.sh" ## if your mynewioc has a start.sh this line must be kept gitinit: true |
Out Cluster
gitinit: true
|
Out Cluster
This is the case of devices that have an IOC embedded. This case EPIK8S will transfer the 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.
...
To test a deploy, you need to have helm tool installed, then go into the deploy directory just where the values.yaml is. Then do the following command:
| Code Block | ||||
|---|---|---|---|---|
| ||||
helm template --debug .
|
Commit the deploy
.yaml is. Then do the following command:
| Code Block | ||||
|---|---|---|---|---|
| ||||
helm template --debug .
|
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
Updating an existing IOC
If you only wants to updated an existing IOC, after it has been modified in the linked repository:Once your deploy configuration is ready you should commit.
| Code Block | ||||
|---|---|---|---|---|
| ||||
cd <EPIK8Sfolder/>/config/iocs/<ioc_name>/scripts> git pull ## updates to remote changes cd .. git add ./scripts/ git commit -m "my comment" .updated IOC <ioc_name>" git push origin |
ArgoCD after few minutes will update the cluster.
To make the changes effective in the running IOC, you have to restart the related process in ArgoCD.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.
...