-
Notifications
You must be signed in to change notification settings - Fork 5
Description
This is an idea to create an ioc.yaml that will be reused more than once by multiple IOCs.
To implement this the shared ioc.yaml will be placed in a submodule or shared folder in the services repository, it will be symlinked into every services/xxx/config folder that needs it.
The yaml will be parameterized by using Jinja in exactly the same way as it currently is. The difference will be that each config folder will be able to inject additional parameters into the jinja context via and env.yaml file in the config folder.
e.g.
shared ioc.yaml will look like:-
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adaravis/releases/download/2024.11.1/ibek.ioc.schema.json
ioc_name: "{{ _global.get_env('IOC_NAME') }}"
description: auto-generated by https://github.com/epics-containers/builder2ibek
entities:
- type: devIocStats.iocAdminSoft
IOC: "{{ ioc_name | upper }}"
- type: ADAravis.aravisCamera
CLASS: {{ env.cameraClass }}
ID: {{ env.cameraID }}
P: {{ env.prefix }}
PORT: DET.CAM
R: ":DET:"
- type: ADAravis.aravisSettings
camera: DET.CAM
- type: ADCore.NDPvaPlugin
NDARRAY_PORT: DET.CAM
P: BL47P-EA-DET-01
PORT: DET.PVA
R: ":TX:"
PVNAME: {{ env.prefix }}:TX:PVAenv.yaml will look like:-
cameraClass: AutoADGenICam
cameraID: 192.168.250.3
prefix: BL47P-EA-DET-01The changes to ibek will be minimal. It will initially look for env.yaml and if found will apply the list of variables into the jinja context before parsing the ioc.yaml file exactly as before