@@ -5,11 +5,88 @@ Overview
5
5
--------
6
6
7
7
Kubernetes for EPICS IOCs provides the means to deploy and manage IOCs using
8
- modern industry standard approaches.
8
+ modern industry standard approaches. The same approaches used by the large
9
+ majority of micro-service and SOA applications.
9
10
10
11
This page briefly describes the required concepts and technologies.
11
12
12
13
14
+ Industry Standard Technologies
15
+ ------------------------------
16
+
17
+ Images and Containers
18
+ ~~~~~~~~~~~~~~~~~~~~~
19
+ Containers provide the means to package up IOC software and execute it
20
+ in a lightweight virtual environment. This includes saving the packages
21
+ into public or private image registries such as DockerHub or Google Cloud
22
+ Registry.
23
+
24
+ The Open Container Initiative (OCI) defines the set container services
25
+ and their APIs such that container images can be interchanged between
26
+ different frameworks.
27
+
28
+ Thus, in this project we develop, build and test our container images
29
+ using docker or podman but the images can be run under Kubernetes' own
30
+ container runtime.
31
+
32
+ This article does a good job of explaining the relationship between docker /
33
+ containers and Kubernetes https://semaphoreci.com/blog/kubernetes-vs-docker
34
+
35
+ Perhaps the best outcome of using containers is that you can alter the
36
+ environment inside the container to suit the IOC code, instead of altering the
37
+ code to suit your infrastructure. At DLS, this means that we are able to use
38
+ vanilla EPICS base and support modules. We no longer require our own
39
+ forks of these repositories.
40
+
41
+
42
+ Kubernetes
43
+ ~~~~~~~~~~
44
+ https://kubernetes.io/
45
+
46
+ Kubernetes easily and efficiently manages containers across clusters of hosts.
47
+
48
+ It builds upon 15 years of experience of running production workloads at
49
+ Google, combined with best-of-breed ideas and practices from the community,
50
+ since it was open-sourced in 2014.
51
+
52
+ Today it is by far the dominant orchestration technology for containers.
53
+
54
+ In this project we use Kubernetes to provide a standard way of implementing
55
+ these features:
56
+
57
+ - Auto start IOCs when servers come up
58
+ - Manually Start and Stop IOCs
59
+ - Monitor IOC status and versions
60
+ - Deploy versioned IOCs to the beamline
61
+ - Rollback to a previous IOC version
62
+ - Allocate the server which runs an IOC
63
+ - View the current log
64
+ - View historical logs (via graylog)
65
+ - Connect to an IOC and interact with its shell
66
+ - debug an ioc by starting a bash shell inside it's container
67
+ - etc.
68
+
69
+
70
+ Helm
71
+ ~~~~
72
+ https://helm.sh/
73
+
74
+ Helm is the most popular package manager for Kubernetes applications.
75
+
76
+ The packages are called Helm Charts. They contain templated YAML files to
77
+ define a set of resources to apply to a Kubernetes cluster.
78
+
79
+ Helm has functions to deploy Charts to a cluster and manage multiple versions
80
+ of the chart within the cluster.
81
+
82
+ It also supports registries for storing version history of charts,
83
+ much like docker.
84
+
85
+ In this project we use Helm Charts to define and deploy IOC instances. Each
86
+ beamline has its own Helm Repository which stores current and historical
87
+ version of its IOC instances.
88
+
89
+
13
90
Concepts
14
91
--------
15
92
@@ -110,29 +187,38 @@ There are these types of CI:
110
187
- builds the sphinx docs
111
188
- publishes it to github.io pages
112
189
113
- Industry Standard Technologies
114
- ------------------------------
190
+ Scope
191
+ -----
192
+ This project currently targets the low hanging fruit of x86_64 Linux Soft
193
+ IOCs only.
115
194
116
- Images and Containers
117
- ~~~~~~~~~~~~~~~~~~~~~
118
- **TODO **
195
+ Other linux architectures could be added to the Kubernetes cluster.
119
196
120
- Kubernetes
121
- ~~~~~~~~~~
122
- **TODO **
197
+ In future it is entirely possible that Windows IOCs could also be supported
198
+ since Kubernetes supports mixed OS clusters. This would be needed
199
+ because windows containers require a windows host.
200
+
201
+ Hard IOCs will not be supported in their current form. Perhaps there is a
202
+ future possibility of turning hard IOCs remote devices.
123
203
124
- Helm
125
- ~~~~
126
- **TODO **
127
204
128
205
Additional Tools
129
206
----------------
130
207
131
208
k8s-epics-utils
132
209
~~~~~~~~~~~~~~~
133
- **TODO **
210
+ The project k9s-epics utils contains a script to add simple command
211
+ line functions for deploying and monitoring IOCs.
212
+
213
+ It also provides a Dockerfile for building a personal developer image
214
+ allowing a developer to work on support modules or IOCs anywhere.
215
+
216
+ See the repository documentation (TODO)
134
217
135
218
Ibek
136
219
~~~~
137
- **TODO **
220
+ IOC Builder for EPICS and Kubernetes provides a way to generate an IOC
221
+ helm chart from a YAML description of the IOC.
138
222
223
+ TODO: this is in early development and not yet included in the epics-containers
224
+ Organization.
0 commit comments