Skip to content

Commit fbf2c9b

Browse files
committed
update ioc_changes? to 3.4.0
1 parent 373b906 commit fbf2c9b

File tree

8 files changed

+41
-30
lines changed

8 files changed

+41
-30
lines changed

docs/explanations/introduction.md

Lines changed: 1 addition & 1 deletion
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-adaravis-linux-runtime:2024.2.2 ](https://github.com/epics-containers/ioc-adaravis/pkgs/container/ioc-adaravis-linux-runtime) 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-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.
4343

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

docs/how-to/debug.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ Are you sure ? [y/N]: y
4141
<font color="#5F8787">docker container create --name busybox -v bl01t-ea-test-02_config:/copyto busybox</font>
4242
<font color="#5F8787">docker cp /home/giles/tutorial/bl01t/services/bl01t-ea-test-02/config/ioc.yaml busybox:copyto</font>
4343
<font color="#5F8787">docker rm -f busybox</font>
44-
<font color="#5F8787">docker run -dit --net host --restart unless-stopped -l is_IOC=true -l version=2024.2.17-b8.30 -v bl01t-ea-test-02_config:/epics/ioc/config/ -e IOC_NAME=bl01t-ea-test-02 --name bl01t-ea-test-02 ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2024.2.2</font>
44+
<font color="#5F8787">docker run -dit --net host --restart unless-stopped -l is_IOC=true -l version=2024.2.17-b8.30 -v bl01t-ea-test-02_config:/epics/ioc/config/ -e IOC_NAME=bl01t-ea-test-02 --name bl01t-ea-test-02 ghcr.io/epics-containers/ioc-adsimdetectorruntime:2024.2.2</font>
4545
76c2834dac805780b3329af91c332abb90fb2692a510c11b888b82e48f60b44f
4646
<font color="#5F8787">docker ps -f name=bl01t-ea-test-02 --format &apos;{{.Names}}&apos;</font>
4747
</pre>
@@ -59,7 +59,7 @@ Now you can tell `ec` to stop the IOC instance and then run it in a way that you
5959

6060
```bash
6161
ec stop bl01t-ea-test-02
62-
docker run --entrypoint bash -it --net host -l is_IOC=true -l version=2024.2.17-b8.30 -v bl01t-ea-test-02_config:/epics/ioc/config/ -e IOC_NAME=bl01t-ea-test-02 --name bl01t-ea-test-02-debug ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2024.2.2
62+
docker run --entrypoint bash -it --net host -l is_IOC=true -l version=2024.2.17-b8.30 -v bl01t-ea-test-02_config:/epics/ioc/config/ -e IOC_NAME=bl01t-ea-test-02 --name bl01t-ea-test-02-debug ghcr.io/epics-containers/ioc-adsimdetectorruntime:2024.2.2
6363
```
6464

6565
You should now be in a shell inside the container. You can look at the files and run the IOC instance manually to see what the error is. You can re-run the IOC instance multiple times and you can even install your favourite editor or debugging tools.

docs/tutorials/create_ioc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@ You will now have vscode and open and editing the values.yaml file. Add the foll
6969
```yaml
7070
shared:
7171
ioc-instance:
72-
image: ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2024.4.1
72+
image: ghcr.io/epics-containers/ioc-adsimdetectorruntime:2024.4.1
7373
```
7474
75-
This tells the IOC Instance to run in the `ioc-adsimdetector-linux-runtime`
75+
This tells the IOC Instance to run in the `ioc-adsimdetectorruntime`
7676
container. This container was built by the Generic IOC source repo here
7777
<https://github.com/epics-containers/ioc-adsimdetector>. The container has
7878
support for AreaDetector and ADSimDetector compiled into its IOC binary.

docs/tutorials/debug_generic_ioc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ You should find the build succeeds. But this is not the whole story. There
134134
is another line in `install.h` that I added to make this work:
135135

136136
```bash
137-
ibek support add-config-macro ${NAME} PCRE_LIB /usr/lib/x86_64-linux-gnu
137+
ibek support add-config-macro ${NAME} PCRE_LIB /usr/lib/x86_64gnu
138138
```
139139

140140
This added a macro to `CONFIG_SITE.linux-x86_64.Common` that tells the

docs/tutorials/deploy_example.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ have valid configuration.
4242
For the moment just check that your CI passed and if not review that you
4343
have followed the instructions in the previous tutorial correctly.
4444

45+
(setup-beamline-bl01t)=
4546
## Set up Environment for BL01T Beamline
4647

4748
The standard way to set up your environment for any ec services repository is to get the environment.sh script from the domain repository and source it.
@@ -162,7 +163,7 @@ bdbd155d437361fe88bce0faa0ddd3cd225a9026287ac5e73545aeb4ab3a67e9
162163
$ ec ps -w
163164
| name | version | running | restarts | deployed | image |
164165
|------------------|----------|---------|----------|---------------------|-------------------------------------------------------------------|
165-
| bl01t-ea-test-01 | 2024.3.1 | true | 0 | 2024-03-19 11:10:53 | ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2024.4.1 |
166+
| bl01t-ea-test-01 | 2024.3.1 | true | 0 | 2024-03-19 11:10:53 | ghcr.io/epics-containers/ioc-adsimdetectorruntime:2024.4.1 |
166167
```
167168

168169
### IMPORTANT: deploy-local vs deploy
@@ -191,7 +192,7 @@ ec ps
191192
Generic IOCs.
192193

193194
You may have noticed that the IOC instance has is showing that it has
194-
an image `ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2024.4.1`.
195+
an image `ghcr.io/epics-containers/ioc-adsimdetectorruntime:2024.4.1`.
195196

196197
This is a Generic IOC image and all IOC Instances must be based upon one
197198
of these images. This IOC instance has no startup script and is therefore

docs/tutorials/dev_container.md

Lines changed: 26 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,11 @@ which appear in the `iocs` folder of an {any}`ec-services-repo`. e.g.:
2121
- for Kubernetes: changes to the global values.yaml
2222
file found in `helm/shared`, these affect all IOCs in the repository.
2323

24+
To make a change like this requires:
25+
26+
- change the IOC instance ioc.yaml or values.yaml
27+
- redeploy the IOC with `ec deploy-local` or `ec deploy`
28+
2429
(changes_2)=
2530
### Changing the Generic IOC
2631

@@ -34,14 +39,28 @@ Types of changes include:
3439
- adding new support modules
3540
- altering the system dependencies installed into the container image
3641

42+
To make a change like this requires:
43+
44+
- make changes to the Generic IOC Dockerfile
45+
- push the changes and tag the repo - this will release a new container image
46+
- change the IOC instance values.yaml to point at the new container image
47+
- redeploy the IOC with `ec deploy-local` or `ec deploy`
48+
49+
3750
(changes_3)=
3851
### Changing the dependencies
3952

40-
Sometimes you will need to alter the support modules used by the Generic IOC. To make use of these changes would require:
53+
Sometimes you will need to alter the support modules used by the Generic IOC. Reasons to do this include:
54+
55+
- fix a bug in a support module
56+
- update to support a new version of the device
57+
- update to support a feature of the device not yet implemented in the support module
58+
59+
To make a change like this would require:
4160

42-
- publishing a new release of the support module,
43-
- updating and publishing the Generic IOC
44-
- updating and publishing the IOC instance
61+
- making the change in the support module source code
62+
- test and publish a release of the above
63+
- repeat the steps in [](changes_2)
4564

4665
## Need for a Developer Container
4766

@@ -167,22 +186,14 @@ Once built, open the project in VSCode:
167186
code .
168187
```
169188

170-
When it opens, VSCode may prompt you to open in a devcontainer. If not then click
171-
the green icon in the bottom left of the VSCode window and select
172-
`Reopen in Container`.
189+
When it opens, VSCode may prompt you to open in a devcontainer, if so the choose to do so. If not then use `ctrl-shift-p` and type `Reopen in Container`.
173190

174191
You should now be *inside* the container. All terminals started in VSCode will
175192
be running inside the container. Every file that you open with the VSCode editor
176193
will be inside the container.
177194

178-
There are some caveats because some folders are mounted from the host file
179-
system. For example, the `ioc-adsimdetector` project folder
180-
is mounted into the container as a volume. It is mounted under
181-
`/workspaces/ioc-adsimdetector`. This means that you can edit the source code
182-
from your local machine and the changes will be visible inside the container and
183-
outside the container. This is a good thing as you should consider the container
184-
filesystem to be a temporary filesystem that will be destroyed when the container
185-
is rebuilt or deleted.
195+
There are some caveats because some folders are mounted from the host file system. For example, the `ioc-adsimdetector` project folder
196+
is mounted into the container as a volume. It is mounted under `/workspaces/ioc-adsimdetector`. This means that you can edit the source code from your local machine and the changes will be visible inside the container and outside the container. This is a good thing as you should consider the container filesystem to be a temporary filesystem, because will be destroyed when the container is rebuilt or deleted.
186197

187198
### Preparing the IOC for Testing
188199

docs/tutorials/ioc_changes1.md

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ and deployed the IOC instance in a previous tutorial without one. It is up to
99
you how you choose to make these types of changes. Types 2,3 do require a
1010
devcontainer because they involve compiling Generic IOC / support module code.
1111

12-
These instructions are for running inside the devcontainer. If you closed your developer container from the last tutorial, then open it again now. To do open your `bl01t` folder in vscode and then press `Ctrl-Shift-P` and type `Remote-Containers: Reopen in Container`.
12+
These instructions are for running inside the devcontainer. If you closed your developer container from the last tutorial, then open it again now. To do so, open your `ioc-adsimdetector` folder in vscode and then press `Ctrl-Shift-P` and type `Remote-Containers: Reopen in Container`.
1313

1414
We are going to add a hand crafted EPICS DB file to the IOC instance. This will be a simple record that we will be able to query to verify that the change is working. We will use the version of the IOC instance that used `ioc.yaml`. If you changed to using raw startup assets in the previous tutorial then revert to using `ioc.yaml` for this tutorial or see [](raw-startup-assets).
1515

@@ -74,10 +74,7 @@ You can change this and make your devcontainer network isolated by removing the
7474
host. You may want to isolate your development network if multiple developers are working on the same subnet. In this case some other solution is required for running OPI tools on the host (TODO add link to solution - likely to be container networks).
7575
:::
7676

77-
Because of the symlink between `/epics/ioc/config` and
78-
`/workspaces/bl01t/services/bl01t-ea-test-02/config` the same files you are testing
79-
by launching the IOC inside of the devcontainer are also ready to be
80-
committed and pushed to the bl01t repo. i.e.:
77+
Because of the symlink between `/epics/ioc/config` and `/workspaces/bl01t/services/bl01t-ea-test-02/config` the same files you are testing by launching the IOC inside of the devcontainer are also ready to be committed and pushed to the bl01t repo. The following commands show how to do this:
8178

8279
```bash
8380
# Do this from a host terminal (not a devcontainer terminal)
@@ -92,6 +89,8 @@ git push origin 2024.3.2
9289
ec deploy bl01t-ea-test-02 2024.3.2
9390
```
9491

92+
NOTE: the above assumes you have an active python virtual environment with the `edge-containers-cli` installed and you have sourced the beamline environment file (for a reminder of how to do this see {any}`setup-beamline-bl01t`).
93+
9594
You can now see that the versioned IOC instance is running and loading the extra.db by looking at its log with:
9695

9796
```bash

docs/tutorials/rtems_ioc.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -125,8 +125,8 @@ in the cluster. The matrix of targets also includes an architecture dimension,
125125
at present the ioc-template supports two architectures, `linux` and
126126
`rtems`, thus there are 4 targets in total as follows:
127127

128-
- ghcr.io/epics-containers/ioc-template-linux-runtime
129-
- ghcr.io/epics-containers/ioc-template-linux-developer
128+
- ghcr.io/epics-containers/ioc-templateruntime
129+
- ghcr.io/epics-containers/ioc-templatedeveloper
130130
- ghcr.io/epics-containers/ioc-template-rtems-runtime
131131
- ghcr.io/epics-containers/ioc-template-rtems-developer
132132

0 commit comments

Comments
 (0)