Skip to content

Commit f6ab4ac

Browse files
committed
add some ibek notes
1 parent 81961f1 commit f6ab4ac

File tree

2 files changed

+75
-0
lines changed

2 files changed

+75
-0
lines changed

docs/user/index.rst

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -27,6 +27,7 @@ side-bar.
2727
tutorials/support_module
2828
tutorials/rtems_setup
2929
tutorials/rtems_ioc
30+
tutorials/ibek
3031

3132
Tutorials for installation and typical usage. New users start here.
3233

docs/user/tutorials/ibek.rst

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
Defining IOC Instances using IBEK
2+
=================================
3+
4+
.. warning::
5+
6+
This page is work in progress. It is currently just some loose notes.
7+
8+
TODO: do some of these titles belong in explanations or reference sections? If so then the tutorial will need to reference them at the start.
9+
10+
What is IBEK
11+
------------
12+
13+
- IOC Builder for EPICS on Kubernetes
14+
- uses Support YAML to define what each support module can supply
15+
- uses IOC YAML to instantiate instances of support features that make up an IOC instances
16+
17+
Why Use IBEK
18+
------------
19+
20+
- saves on typing of substitution files
21+
- provides a level of verification at build time
22+
- encapsulates knowledge of each support module within module
23+
- etc.
24+
25+
Alternatives
26+
------------
27+
28+
epics-containers supports out of the box dropping a startup script and
29+
substitution file into the config folder as an alternative to supplying
30+
ibek IOC YAML. But you can override start.sh and work in any way you choose
31+
at runtime.
32+
33+
ibek-defs
34+
---------
35+
36+
- defines the support modules YAML in a single place.
37+
- exists to avoid duplication of support module definitions
38+
- and to avoid working on multiple support modules while kicking off epics-containers
39+
- in future YAML could be supplied in each support module itself - but until epics-containers is widely used, this is a good way to get started
40+
- the ibek-defs repo is added as a git-submodule to every generic ioc (ioc-xxx) repo and in this ensures that a rebuild of a generic ioc will be with a consistent set of YAML files until a developer explicitly updates the submodule.
41+
42+
How to work on ibek-defs
43+
------------------------
44+
45+
Building a new generic ioc and making it compatible with ibek means creating ibek support YAML for all of its dependent support modules (where they do not already exist)
46+
47+
These steps assume you have a generic ioc for ADUrl based on ioc_template as discussed in `generic_ioc`.
48+
Your generic ioc has a default ioc instance used for testing.
49+
In ioc/config/st.cmd we have a default startup script for the example IOC.
50+
To work on ibek support we will remove this file and replace it with ``ioc.yaml``.
51+
We already have a git submodule for ibek-defs which we used for accessing patch files
52+
during build, this will also be used for creating and editing support yaml files.
53+
54+
TODO: this will become a concrete example for walking through as a tutorial with ioc-adurl.
55+
56+
STEPS:
57+
58+
- remove ioc/config/st.cmd and create ioc/config/ioc.yaml
59+
- cd ibek-defs
60+
- git checkout -b my-working-branch
61+
- cd ..
62+
- add useful yaml definitions to ibek-defs/<a support module>/<a support module>.yaml
63+
- add some entities that use those definitions to ioc/config/ioc.yaml
64+
- TODO need to make dev launch mount ioc folder into the container - avoiding build step and giving us a tight inner dev loop
65+
- (whereas dev ioc-launch mounts in the config of an IOC instance - MAYBE this is confusing or these commands need better names?)
66+
- ec dev build
67+
- ec dev launch
68+
- inside the container:
69+
- cd /repos/epics/ioc
70+
- start.sh
71+
72+
73+
74+

0 commit comments

Comments
 (0)