Skip to content

Commit 79cbf6b

Browse files
committed
update introductory pages
1 parent 2c754f5 commit 79cbf6b

File tree

3 files changed

+35
-42
lines changed

3 files changed

+35
-42
lines changed

docs/explanations/introduction.md

Lines changed: 30 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ forks of these repositories.
3939

4040
#### Generic IOCs and instances
4141

42-
An important principal of the approach presented here is that an IOC container image represents a 'Generic' IOC. The Generic IOC image is used for all IOC instances that connect to a given class of device. For example the Generic IOC image here: [ghcr.io/epics-containers/ioc-adaravisruntime:2024.2.2 ](https://github.com/epics-containers/ioc-adaravis/pkgs/container/ioc-adaravisruntime) uses the AreaDetector driver ADAravis to connect to GigE cameras.
42+
An important principal of the approach presented here is that an IOC container image represents a 'Generic' IOC. The Generic IOC image is used for all IOC instances that connect to a given class of device. For example the Generic IOC image here: [ghcr.io/epics-containers/ioc-adaravis-runtime:2024.2.2 ](https://github.com/epics-containers/ioc-adaravis/pkgs/container/ioc-adaravisruntime) uses the AreaDetector driver ADAravis to connect to GigE cameras.
4343

4444
An IOC instance runs in a container runtime by loading two things:
4545

@@ -78,11 +78,11 @@ Today it is by far the dominant orchestration technology for containers.
7878
In this project we use Kubernetes and helm to provide a standard way of
7979
implementing these features:
8080

81-
- Auto start IOCs the cluster comes up from power off
81+
- Auto start IOCs when the cluster comes up from power off
8282
- Manually Start and Stop IOCs
8383
- Monitor IOC health and versions
8484
- Deploy versioned IOCs to the beamline
85-
- Rollback to a previous IOC version
85+
- Rollback IOCs to a previous version
8686
- Allocate a server with adequate resources on which to run each IOC
8787
- Failover to another server (for soft IOCs not tied to hardware in a server)
8888
- View the current log
@@ -91,12 +91,7 @@ implementing these features:
9191
- debug an IOC by starting a bash shell inside it's container
9292

9393
### Kubernetes Alternative
94-
95-
If you do not have the resources to maintain a Kubernetes cluster then this project
96-
supports installing IOC instances directly into the local docker or podman runtime
97-
on the current server. Where a beamline has multiple servers the distribution of
98-
IOCs across those servers is managed by the user. These tools would replace
99-
Kubernetes and Helm in the technology stack.
94+
If you do not have the resources to maintain a Kubernetes cluster then this project supports installing IOC instances directly into the local docker or podman runtime on the current server. Where a beamline has multiple servers the distribution of IOCs across those servers is managed by the user. These tools would replace Kubernetes and Helm in the technology stack. Docker compose allows us to describe a set of IOCs and other services for each beamline server.
10095

10196
If you choose to use this approach then you may find it useful to have another
10297
tool for viewing and managing the set of containers you have deployed across
@@ -106,9 +101,14 @@ Portainer is a paid for product
106101
that provides excellent visibility and control of your containers through a
107102
web interface. It is very easy to install.
108103

109-
The downside of this approach is that you will need to manually manage the
110-
resources available to each IOC instance and manually decide which server to
111-
run each IOC on.
104+
The downsides of not using Kuberenetes are:
105+
106+
- manually managing the resources. i.e. deciding up front which server to run each IOC on.
107+
- no automatic failover to another server if the current server fails or becomes overloaded.
108+
- no continuous deployment
109+
-
110+
111+
is that you will need to manually manage the resources available to each IOC instance and manually decide which server to run each IOC on. It also means that you cannot take advantage of the Kubernetes feat
112112

113113
### Helm
114114

@@ -139,25 +139,19 @@ IOCs. Which performs the following steps:
139139
- Clone the beamline repository at a specific tag to a temporary folder
140140
- install the resulting chart into the cluster
141141
- remove the temporary folder
142+
- helm templating for making multiple similar IOCs is not available
143+
- no centralized access to ioc shell or debug shell - instead you must ssh to the correct server first.
142144

143145

144146
### Repositories
145147

146-
All of the assets required to manage a
147-
set of IOC Instances for a beamline are held in repositories.
148+
All of the assets required to manage a set of IOC Instances for a beamline are held in repositories.
148149

149-
Thus all version control is done via these repositories and no special
150-
locations in a shared filesystem are required.
151-
(The legacy approach at DLS relied heavily on know locations in a
152-
shared filesystem).
150+
Thus all version control is done via these repositories and no special locations in a shared filesystem are required. (The legacy approach at DLS relied heavily on know locations in a shared filesystem).
153151

154-
In the **epics-containers** examples all repositories are held in the same
155-
github organization. This is nicely contained and means that only one set
156-
of credentials is required to access all the resources.
152+
In the **epics-containers** examples all repositories are held in the same github organization. This is nicely contained and means that only one set of credentials is required to access all the resources.
157153

158-
There are many alternative services for storing these repositories, both
159-
in the cloud and on premises. Below we list the choices we have tested
160-
during the POC.
154+
There are many alternative services for storing these repositories, both in the cloud and on premises. Below we list the choices we have tested during the POC.
161155

162156
The classes of repository are as follows:
163157

@@ -166,16 +160,16 @@ The classes of repository are as follows:
166160
167161
Holds the source code but also provides the Continuous Integration actions for testing, building and publishing to the image / helm repositories. These have been tested:
168162
169-
- github
170-
- gitlab (on premises)
163+
- GitHub
164+
- GitLab (on premises)
171165
172166
:Generic IOC Source Repositories:
173167
174168
Define how a Generic IOC image is built, this does not typically include source code, but instead is a set of instructions for building the Generic IOC image by compiling source from a number of upstream support module repositories. Boilerplate IOC source code is also included in the Generic IOC source repository and can be customized if needed.
175169
176-
:EC Services Source Repositories:
170+
:Services Source Repositories:
177171
178-
Define the IOC instances for a beamline or accelerator area. This includes the IOC boot scripts and any other configuration required to make the IOC instance unique. For ibek based IOCs, each IOC instance is defined by an ibek yaml file only.
172+
Define the IOC instances and other services for a beamline, accelerator domain or any other grouping strategy. This includes the IOC boot scripts and any other configuration required to make the IOC instance unique. For **ibek** based IOCs, each IOC instance is defined by an **ibek** yaml file only.
179173
180174
:An OCI Image Repository:
181175
@@ -208,8 +202,8 @@ There are these types of CI:
208202
- publishes the image to github packages (only if the commit is tagged)
209203
or other OCI registry
210204
211-
:`ec-services-repo` source:
212-
- prepares a helm chart from each IOC instance definition
205+
:services source:
206+
- prepares a helm chart from each IOC instance or other service definition
213207
- tests that the helm chart is deployable (but does not deploy it)
214208
- locally launches each IOC instance and loads its configuration to
215209
verify that the configuration is valid (no system tests because this
@@ -239,24 +233,18 @@ in the future.
239233

240234
Python soft IOCs are also supported.
241235

242-
GUI generation for engineering screens will be supported via the PVI project.
243-
See <https://github.com/epics-containers/pvi>.
236+
GUI generation for engineering screens is supported via the PVI project. See <https://github.com/epics-containers/pvi>.
244237

245238
## Additional Tools
246239

247240
### edge-containers-cli
248241

249-
This is the developer's 'outside of the container' helper tool. The command
242+
This is the 'outside of the container' helper tool. The command
250243
line entry point is **ec**.
251244

252-
The project is a python package featuring simple command
253-
line functions for deploying and monitoring IOC instances. It is a wrapper
254-
around the standard command line tools kubectl, podman/docker, helm, and git
255-
but saves typing and provides help and command line completion. It also
256-
can teach you how to use these tools by showing you the commands it is
257-
running.
245+
The project is a python package featuring simple command line functions for deploying monitoring IOC instances. It is a thin wrapper around the argocd, kubectl, helm and git commands. This tool can be used by developers and beamline staff to get a quick CLI based view of IOCs running in the cluster, as well as stop/start and obtain logs from them.
258246

259-
See {any}`CLI` for moore details.
247+
See {any}`CLI` for more details.
260248

261249
### **ibek**
262250

@@ -267,6 +255,7 @@ container images. It is used:
267255
- at container build time: to fetch and build EPICS support modules
268256
- at container run time: to extract all useful build artifacts into a
269257
runtime image
258+
- inside the developer container: to assist with testing and debugging.
270259

271260
See <https://github.com/epics-containers/ibek>.
272261

@@ -281,3 +270,4 @@ Process Variables allowing us to:
281270

282271
[bluesky]: https://blueskyproject.io/
283272
[ophyd]: https://github.com/bluesky/ophyd-async
273+
[pvi]: https://github.com/epics-containers/pvi

docs/overview.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,8 @@ There are 5 themes to this strategy:
1818
Source, container and helm repositories manage all of the above assets.
1919
No shared file systems required.
2020
21-
:Continuous Integration / Delivery:
21+
:Continuous Integration / Deployment:
2222
Source repositories automatically build containers and helm charts
23-
delivering them to OCI registries.
23+
delivering them to OCI registries. Services repositories automatically deploy
24+
IOC containers to Kubernetes clusters.
2425
```

docs/tutorials/intro.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,12 @@ some background in the following topics.
1313
================================================================ ================
1414
**An introduction to containers** https://www.docker.com/resources/what-container/
1515
**Managing containers on a workstation: introduction to docker** https://docs.docker.com/get-started/overview/
16+
**Introduction to docker compose** https://docs.docker.com/compose/
1617
**Podman, a recommended docker alternative** https://docs.podman.io/en/latest/Introduction.html
1718
**Orchestrating containers in a cluster with Kubernetes** https://kubernetes.io/docs/concepts/overview/
1819
**Managing packages in a Kubernetes Cluster with Helm** https://helm.sh/docs/intro/quickstart/
1920
**Introduction to EPICS** https://docs.epics-controls.org/en/latest/guides/EPICS_Intro.html
21+
**Argo CD continuous delpoyment for Kubernetes** https://argo-cd.readthedocs.io/en/stable/
2022
================================================================ ================
2123
```
2224

0 commit comments

Comments
 (0)