diff --git a/.gitignore b/.gitignore index 56db627..9dfe86a 100644 --- a/.gitignore +++ b/.gitignore @@ -6,5 +6,6 @@ venv* *workspace # this is the root directory for generated opi files -# and is created at runtime -services/opi +# and is created at runtime by IOCs using PVI +opi/iocs +!opi/iocs/README.md diff --git a/compose.yaml b/compose.yaml index 09084aa..0a89dea 100644 --- a/compose.yaml +++ b/compose.yaml @@ -11,10 +11,10 @@ # or for a multiple server repo: # docker compose --profile deploy -f my_server_01.yml up --detach -include: - # initialise volumes - - include/init.yml +# to deploy the IOCs to a workstation for testing and development, use: +# docker compose up --detach +include: # all profiles - services/bl01t-ea-test-01/compose.yml - services/bl01t-di-cam-01/compose.yml diff --git a/include/init.sh b/include/init.sh deleted file mode 100644 index 40c8234..0000000 --- a/include/init.sh +++ /dev/null @@ -1,8 +0,0 @@ -#!/bin/sh - -# The init service shell script - initialises the opi volumes with any custom -# bob files from this repo and ensures that each IOC has a subfolder in the -# volumes. - -# copy in any opi files from the repo -cp -r /repo/opi/* /opi; diff --git a/include/init.yml b/include/init.yml deleted file mode 100644 index 3d8d50a..0000000 --- a/include/init.yml +++ /dev/null @@ -1,15 +0,0 @@ -# A basic init service that sets up volumes for the IOCs described in -# this repo. - -services: - init_iocs: - image: docker.io/busybox - - command: | - sh /repo/include/init.sh - - volumes: - # mount the runtime opi folder - - ../services/opi:/opi/ - # mount the repo to copy hand coded opis into runtime opi - - ..:/repo diff --git a/include/ioc.yml b/include/ioc.yml index 842faf1..80aede9 100644 --- a/include/ioc.yml +++ b/include/ioc.yml @@ -5,9 +5,6 @@ services: # linux IOCs that run in a container ######################################### linux_ioc: &linux_ioc - depends_on: - - init_iocs - labels: # a reference to which repository created this IOC ioc_group: bl01t diff --git a/include/volumes.yml b/include/volumes.yml deleted file mode 100644 index 3cff8bf..0000000 --- a/include/volumes.yml +++ /dev/null @@ -1,21 +0,0 @@ -volumes: - # hand coded opi files from this repo - opi: - - # Note - for the moment we don't use this volume but instead bind mount - # services/opis host folder into the ioc containers. - # - # This is because of a podman limitation that ignores the subpath field - # of a volume mount. - # - # Keeping this file as a reminder of how we would prefer to use docker - # volumes for this purpose once the issue is resolved: - # https://github.com/containers/podman/issues/20661 - - # in kubernetes we also create volumes for - # - autosave - # - runtime (mounted to /epics/runtime) - # - data - for each IOC that wants to persist data - # - binaries - for proxy that control hard IOCs and supply their binaries - # - # in future this compose framework could include these volumes too diff --git a/opi/index.bob b/opi/index.bob index 5e42991..528aebd 100644 --- a/opi/index.bob +++ b/opi/index.bob @@ -1,7 +1,7 @@ + + Example IOCs - 0 - 0 388 80 4 @@ -31,20 +31,19 @@ 23 30 150 - 20 $(text) OpenDisplay - bl01t-di-cam-01/index.bob - tab - Open Display + iocs/bl01t-di-cam-01/index.bob

BL01T-EA-TST-01

:DET:
+ tab + Open Display
bl01t-di-cam-01 @@ -60,20 +59,19 @@ 23 55 150 - 20 $(text)
OpenDisplay - bl01t-mo-sim-01/index.bob - tab - Open Display + iocs/bl01t-mo-sim-01/index.bob

BL01T-EA-TST-01

:PVA:
+ tab + Open Display
bl01t-mo-sim-01 @@ -83,4 +81,396 @@ 20 $(actions)
+ + CAMERA + +

BL01T-DI-CAM-01

+ :DET: +
+ 416 + 396 + 308 + true + + Label_3 + Acquire + 2 + 150 + $(text) + + + ToggleButton_1 + $(P)$(R)Acquire + 155 + 2 + 20 + + Item 1 + Item 2 + + + + LED + $(P)$(R)Acquire_RBV + 300 + 2 + + + Label_4 + Array Counter + 27 + 150 + $(text) + + + TextEntry + $(P)$(R)ArrayCounter + 155 + 27 + 1 + + + TextUpdate_1 + $(P)$(R)ArrayCounter_RBV + 260 + 27 + + + + + 1 + + + Label_5 + Array Callbacks + 52 + 150 + $(text) + + + ToggleButton_2 + $(P)$(R)ArrayCallbacks + 155 + 52 + 20 + + Item 1 + Item 2 + + + + LED_1 + $(P)$(R)ArrayCallbacks_RBV + 300 + 52 + + + Label_6 + Acquire Time + 77 + 150 + $(text) + + + TextEntry_1 + $(P)$(R)AcquireTime + 155 + 77 + 1 + + + TextUpdate_2 + $(P)$(R)AcquireTime_RBV + 260 + 77 + + + + + 1 + + + Label_7 + Acquire Period + 102 + 150 + $(text) + + + TextEntry_2 + $(P)$(R)AcquirePeriod + 155 + 102 + 1 + + + TextUpdate_3 + $(P)$(R)AcquirePeriod_RBV + 260 + 102 + + + + + 1 + + + Label_8 + Num Images Counter + 127 + 150 + $(text) + + + TextUpdate_4 + $(P)$(R)NumImagesCounter_RBV + 155 + 127 + 205 + + + + + 1 + + + Label_9 + Num Images + 152 + 150 + $(text) + + + TextEntry_3 + $(P)$(R)NumImages + 155 + 152 + 1 + + + TextUpdate_5 + $(P)$(R)NumImages_RBV + 260 + 152 + + + + + 1 + + + Label_10 + Num Exposures + 177 + 150 + $(text) + + + TextEntry_4 + $(P)$(R)NumExposures + 155 + 177 + 1 + + + TextUpdate_6 + $(P)$(R)NumExposures_RBV + 260 + 177 + + + + + 1 + + + Label_11 + Image Mode + 202 + 150 + $(text) + + + ComboBox + $(P)$(R)ImageMode + 155 + 202 + 20 + + + TextUpdate_7 + $(P)$(R)ImageMode_RBV + 260 + 202 + + + + + 1 + + + Label_13 + Detector State + 230 + 150 + $(text) + + + TextUpdate_9 + $(P)$(R)DetectorState_RBV + 155 + 230 + 205 + + + + + 1 + + + Label_14 + Status Message + 255 + 150 + $(text) + + + TextUpdate_10 + $(P)$(R)StatusMessage_RBV + 155 + 255 + 205 + + + + + 6 + 1 + +
+ + PVA + +

BL01T-DI-CAM-01

+ :PVA: +
+ 416 + 299 + 396 + 110 + true + + Label_19 + Array Counter + 52 + 150 + $(text) + + + TextEntry_5 + $(P)$(R)ArrayCounter + 155 + 52 + 1 + + + TextUpdate_13 + $(P)$(R)ArrayCounter_RBV + 260 + 52 + + + + + 1 + + + ToggleButton_6 + $(P)$(R)EnableCallbacks + 155 + 2 + 20 + + Item 1 + Item 2 + + + + Label_22 + Enable Callbacks + 2 + 150 + $(text) + + + LED_4 + $(P)$(R)EnableCallbacks_RBV + 300 + 2 + + + TextUpdate_15 + $(P)$(R)PvName_RBV + 155 + 27 + 205 + + + + + 6 + 1 + + + Label_23 + Pv Name + 27 + 150 + $(text) + +
+ + Image + pva://BL01T-DI-CAM-01:PVA:OUTPUT + 820 + 8 + 772 + 760 + + false + 40 + + + + + + + false + SimDetector Image + 0.0 + 100.0 + + + + + + + + + + + false + Y + 0.0 + 100.0 + + + + + + + + + +
diff --git a/services/bl01t-di-cam-01/compose.yml b/services/bl01t-di-cam-01/compose.yml index 833060f..f0a764d 100644 --- a/services/bl01t-di-cam-01/compose.yml +++ b/services/bl01t-di-cam-01/compose.yml @@ -9,8 +9,6 @@ services: image: ghcr.io/epics-containers/ioc-adsimdetector-runtime:2024.6.1 labels: - # this should be incremented when changes are made to this file - # (TODO: can we enforce/automate this?) version: 0.1.0 environment: @@ -19,7 +17,7 @@ services: IOC_PREFIX: BL01T-DI-CAM-01 volumes: - - ../opi/bl01t-di-cam-01:/epics/opi + - ../../opi/iocs/bl01t-di-cam-01:/epics/opi configs: - source: bl01t-di-cam-01_config @@ -30,5 +28,5 @@ configs: file: ./config include: - - include/networks.yml - - include/volumes.yml + - path: + - include/networks.yml diff --git a/services/bl01t-di-cam-01/config/ioc.yaml b/services/bl01t-di-cam-01/config/ioc.yaml index 0cb30fc..04d1ab5 100644 --- a/services/bl01t-di-cam-01/config/ioc.yaml +++ b/services/bl01t-di-cam-01/config/ioc.yaml @@ -6,12 +6,12 @@ description: Example simulated camera for BL01T entities: - type: ADSimDetector.simDetector PORT: DET.DET - P: BL01T-EA-TST-01 + P: BL01T-DI-CAM-01 R: ":DET:" - type: ADCore.NDPvaPlugin PORT: DET.PVA - PVNAME: BL01T-EA-TST-01:PVA:OUTPUT - P: BL01T-EA-TST-01 + PVNAME: BL01T-DI-CAM-01:PVA:OUTPUT + P: BL01T-DI-CAM-01 R: ":PVA:" NDARRAY_PORT: DET.DET diff --git a/services/bl01t-ea-test-01/compose.yml b/services/bl01t-ea-test-01/compose.yml index b1b687f..681d3cf 100644 --- a/services/bl01t-ea-test-01/compose.yml +++ b/services/bl01t-ea-test-01/compose.yml @@ -17,7 +17,7 @@ services: IOC_PREFIX: BL01T-EA-TEST-01 volumes: - - ../opi/bl01t-ea-test-01:/epics/opi + - ../../opi/iocs/bl01t-ea-test-01:/epics/opi configs: - source: bl01t-ea-test-01_config @@ -28,5 +28,5 @@ configs: file: ./config include: - - include/networks.yml - - include/volumes.yml + - path: + include/networks.yml diff --git a/services/phoebus/compose.yml b/services/phoebus/compose.yml index d97e221..ba839ad 100644 --- a/services/phoebus/compose.yml +++ b/services/phoebus/compose.yml @@ -12,7 +12,7 @@ services: volumes: - /tmp/.X11-unix:/tmp/.X11-unix - ~/.Xauthority:/root/.Xauthority - - ../opi:/opi + - ../../opi:/opi # for X11 to work we need to run as the same UID as the host # IMPORTANT: set UIDGID to your host user:group e.g. 1000:1000 # BUT: always to 0:0 if you are using podman