Versions Compared

Key

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

...

Each beamline in EPIK8S has a GIT project associated. This GIT project has a opi directory that point to a OPI git project that contains the interface of the given beamline.

Code Block
languagebashxml
titleBeamline Repo
├── README.md
├── config
│   ├── applications
│   ├── iocs
│   └── services
├── deploy
│   ├── Chart.yaml
│   ├── templates
│   └── values.yaml
├── opi                          <--- This is the OPI git submodule (this case https://baltig.infn.it/lnf-da-control/sparc-epics-opi.git)
│   ├── Launcher.bob             <--- OPI entry point
│   ├── README.md
│   ├── deploy
│   ├── env.sh
│   ├── phoebus_mrf_interface
│   ├── ptts
│   ├── rp-opi
│   ├── settings.ini				<--- phoebus initialization (see beamline info i.e https://confluence.infn.it/display/SCS/EPIK8s+Sparc) 
│   ├── settings_template.ini
│   └── start.sh                    <--- phoebus start (generally works on EPIK8s, Linux and MAC) 
└── sparc-deploy.yaml


This structure allows:

...

Please refer to this guide: Phoebus Setup. Particular sensitive is the settings.ini. This file must exists and initialised as EPIK8s information page suggests (i.e EPIK8s Sparc ).

...

Develop your OPI and deploy

The development flow depends on you. You may have your OPI in a git project (very suggested way) or you may have developed something really custom for the beamline so that you may include it directly in  the OPI beamline project.

If you developed your OPI and resides in a GIT repository you should include your repository into the Beamline OPI as submodule:

Code Block
languagebash
titleAdd your project as submodule
cd opi
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
## here add your new submodule
git submodule add <your repository_URL> [<submodule_path>]
git commit -m "your comment Add submodule <submodule_name>"
git push origin <your remote branch i.e main/master>


In case you want add your OPI to the Beamline OPI, so your files we'll be part of the Beamline OPI just use:Use your local Phoebus to develop and test your OPI, when the OPI is ok commit your changes.

Code Block
languagebash
titlestart.sh
cd opi
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
## here add your folder/files
git add <your files/folder>
git commit -m "myyour comment " .
git push origin <your remote branch i.e main/master>


Update an existing OPI submodule:

Code Block
languagebash
titleProcedure for the OPI submodule update
cd /<your git directory>/epik8-<beamline name> ## for example epik8-sparc
git pull --recurse-submodules ## to update remote changes
git submodule update --init ## to update eventually new submodules
cd opi/<OPI TYPE>/<submodule name> ## fro example RF/sparc-rf-opi
git pull ## to update the submodule
cd ..
git add <submodule name>
git commit -m "<your message>"
git push origin ## add HEAD:main to this command line if you are in a detached HEAD
cd ../.. ## to go in the master repository
git add opi/
git commit -m "<your message>"
git push origin

If, in any moment in the update procedure, git says that you are not in a branch you can type:

Code Block
languagebash
titleEnter an existing branch
git branch ## to verify the available branches (typically "main" for the submodule and "master" for the main repository)
git switch <name of the branch>

to enter in the correct branch.