Versions Compared

Key

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

Table of Contents

For the integration of existing developments into docker/kubernates we use part of the  Diamond flow for a beamline under kubernates.

...

Once the IOC runs correctly as docker can be inserted in the EPIK8S configuration


Build a support from existing git support

This is path is more complex, but gives much more satisfaction, in fact each time you add a new support as much generic possible you greatly simplify the life of your self and in principle many other people will use the your support.

Step 1 create a directory inside ibek-support


Create by copy and renaming one of the existing support. Suppose you want to add the support for <mydevmodule>, you should have:

Code Block
languagebash
titleProject layout
.
├── Dockerfile
├── LICENSE
├── README.md
├── build
├── ibek-support
│   ├── ADAravis
│   ├── mydevmodule
│   │   ├── install.sh
│   │   └── mydevmodule.ibek.support.yaml
│   ├── opcua
│   │   └── install.sh
│   ├── pmac
│   │   ├── install.sh
│   │   ├── make_pvi.sh
│   │   ├── pmac.ibek.support.todo
│   │   ├── pmac.ibek.support.yaml
│   │   ├── pmacAxis.pvi.device.yaml
│   │   ├── pmacCSController.pvi.device.yaml
│   │   ├── pmacController.pvi.device.yaml
│   │   └── pmacTrajectory.pvi.device.yaml
│   



So in general just two file must be added: install.sh and mydevmodule.ibek.support.yaml.

The first are instructions on howto compile and the dependencies of your module. In general if the mydevmodule  is well structured from a build epics point of view needs only to be patched like that:

Code Block
languagebash
titleinstall.sh
#!/bin/bash

# ARGUMENTS:
#  $1 VERSION to install (must match repo tag)
VERSION=${1}
NAME=<mydevmodule>  ## as compare in the git repository
FOLDER=$(dirname $(readlink -f $0))

# log output and abort on failure
set -xe

# get the source and fix up the configure/RELEASE files
ibek support git-clone ${NAME} ${VERSION} --org http://gitrepo ## repository git root
ibek support register ${NAME}

# declare the libs and DBDs that are required in ioc/iocApp/src/Makefile
ibek support add-libs <mydevmodulelib> <support1lib> <support2lib> asyn ## optional libraries that must be linked
ibek support add-dbds <mydevmodule>.dbd <optsupport1.dbd> <optsupport2>.dbd ### optional dbd supports
# global config settings
${FOLDER}/../_global/install.sh ${NAME}

# compile the support module
ibek support compile ${NAME}
# prepare *.bob, *.pvi, *.ibek.support.yaml for access outside the container.
ibek support generate-links ${FOLDER}