1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> | Index | 1994 1995 1996 1997 1998 1999 2000 2001 2002 2003 2004 2005 2006 2007 2008 2009 2010 2011 2012 2013 2014 2015 2016 2017 2018 2019 2020 2021 2022 2023 <2024> |
<== Date ==> | <== Thread ==> |
---|
Subject: | Re: Generic EPICS IOCs |
From: | Han Lee via Tech-talk <tech-talk at aps.anl.gov> |
To: | "Knap, Giles (DLSLtd,RAL,LSCI)" <giles.knap at diamond.ac.uk> |
Cc: | "tech-talk at aps.anl.gov" <tech-talk at aps.anl.gov> |
Date: | Wed, 17 Jan 2024 09:43:21 -0800 |
Thanks for all the responses.
I'll try to address as many of the points as I can.
Our approach is to have a very flat structure, an EPICS base container and then one container that compiles the support for a particular class of device plus all of the dependencies of that support. It will also install Debian packages for any system dependencies if required.
We experimented with a more hierarchical structure initially but container dependency management became unwieldy. Instead, having all support modules compiled together so that the dependencies are all inside the one container really simplifies things. (Perhaps I could draw parallels to the way Arch Linux installs things)
One example that we have extensively tested is GigE cameras which use the ADAravis support module. You can see how this is made in the Dockerfile here https://github.com/epics-containers/ioc-adaravis/blob/main/Dockerfile. Note that we include some generally useful support like autosave and iocStats.
It is absolutely the case that this is targeting a device that we have hundreds of and it is beneficial to this site to only have to compile it once then deploy multiple times. Each beamline has a repo of ioc instances that are described using YAML. Deploying the IOC instance is a matter of telling Kubernetes to combine the generic ADAravis container with some config that specifies which camera to connect to, what PV prefixes to use and which areadetector plugins you want. These choices determine what thestartup script and Database look like.
The generic IOC concept works for this case but the framework can also have individual IOCs. You can make a specific IOC container image using a Dockerfile that combines whatever support you want and embed the yaml description (or traditional startup script/ DB if preferred). Or you can make your specific IOC image by deriving from a Generic IOC and adding whatever you please. Containers are perfectly good at inheritance, but not that good for composition. I don't know anything about E3 and would appreciate some pointers as it sounds like it is handling the composition problem.
So the generic IOC is there to keep down the proliferation of container images, but the benefits of using containers and orchestration are still valuable even if you have mostly individually built containers. Clearly whenever individually compiled code like Sequencer state machines etc are involved, this needs a non-generic container.
One of the ways we are mitigating need for custom combinations of support is that we are as far as possible making fine grained IOCs that are one to one with a device. Historically DLS diagnostic camera IOCs managed a hutch or two's worth of cameras, those are being split into one per camera. Kubernetes is good at managing lots of small services and allocating CPU/Memory resources accordingly.
I'll finish by retracting the phrase "viable for use in any facility" and replace with "viable for use at more than one facility" :-)
Regards,giles
From: Tech-talk <tech-talk-bounces at aps.anl.gov> on behalf of Andrea michelotti via Tech-talk <tech-talk at aps.anl.gov>
Sent: 16 January 2024 17:39
To: tech-talk at aps.anl.gov <tech-talk at aps.anl.gov>
Subject: Re: Generic EPICS IOCsHello,
At INFN-LNF, we adopted dockerization and Kubernetes in 2019 to efficiently manage one of our beam test facilities using our custom control system, !CHAOS. Through our experiences, we have become increasingly convinced of the benefits offered by a dockerized and orchestrated approach in control systems. I think this is especially valuable in addressing and mitigating the complexities introduced by an older, non-object-oriented control system like EPICS.
Considering our limited manpower for supporting custom control systems in upcoming accelerator infrastructures, we have decided to embrace EPICS, despite being relatively new to it. Starting afresh, our goal is to blend new technologies with the utilization of EPICS. We closely follow Giles' initiatives at Diamond and actively work to integrate his proposed workflows into our own, aiming for generality and maximum reuse of controls. I particularly appreciate the idea of having a tool like ibek that allows instantiation of IOCs from .yaml(s). This, combined with support for 'generic containers', offers a clean and efficient way to create 'reusable controls.'
Best regards,
Andrea
Il 15/01/24 12:36, Knap, Giles (DLSLtd,RAL,LSCI) via Tech-talk ha scritto:
Good day All,
I would like to canvas opinion on the viability of the concept of Generic IOCs.
At DLS, we have been working on moving our IOCs to Kubernetes for a while. Part of our approach is to use the concept of Generic IOCs for our container images as follows:
We build all the support for a given class of device into a single container image. This 'Generic IOC' has an IOC binary but no startup script or EPICS DB. An IOC instance is a pointer to a Generic IOC image plus enough information to generate the startup script and DB at runtime.
For a more detailed description see https://epics-containers.github.io/main/user/explanations/introduction.html#generic-iocs-and-instances.
So this means that we have a generic version of epics base built into a container image and then one generic IOC container image based upon that for each device. In none of these are any site specific changes made, all the source we use is upstream and untouched (with one or two small exceptions for compilers to work in our base OS).
The intention is that these Generic IOCs are viable for use in any facility that chooses to use containers to deploy its IOCs (using any container runtime that is OCI compliant).
Is this a bad idea? are there site specific options that cannot be avoided, and cannot be applied at runtime?
Any thoughts much appreciated.
Regards,giles
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom
-- --------------------- dr. Andrea Michelotti Head of Control Systems Service INFN - Laboratori Nazionali di Frascati Accelerator Division, Bldg.2, Room 120 Via Enrico Fermi, 40 00044 Frascati (RM) e-mail: andrea.michelotti at infn.it office: (+39) 06.9403.2272 mobile: (+39) 06.9403.8203 fax : (+39) 06.9403.2256 Teams : amichelo at infn.it LinkedIn: http://it.linkedin.com/in/michelotti
--
This e-mail and any attachments may contain confidential, copyright and or privileged material, and are for the use of the intended addressee only. If you are not the intended addressee or an authorised recipient of the addressee please notify us of receipt by returning the e-mail and do not use, copy, retain, distribute or disclose the information in or attached to the e-mail.
Any opinions expressed within this e-mail are those of the individual and not necessarily of Diamond Light Source Ltd.
Diamond Light Source Ltd. cannot guarantee that this e-mail or any attachments are free from viruses and we cannot accept liability for any damage which you may sustain as a result of software viruses which may be transmitted in or with the message.
Diamond Light Source Limited (company no. 4375679). Registered in England and Wales with its registered office at Diamond House, Harwell Science and Innovation Campus, Didcot, Oxfordshire, OX11 0DE, United Kingdom