Skip to content

Commit c0d5f63

Browse files
committed
changes from review after pvi branch merge
1 parent c5d2e32 commit c0d5f63

File tree

5 files changed

+48
-32
lines changed

5 files changed

+48
-32
lines changed

docs/user/reference/environment.rst

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,11 @@ Required Variables
3838

3939
You can have multiple mappings if needed by separating them with a space.
4040

41-
- **EC_NAMESPACE**: defines the namespace in a Kubernetes Cluster that your IOC
41+
- **EC_K8S_NAMESPACE**: defines the namespace in a Kubernetes Cluster that your IOC
4242
Instances will be deployed to. When you come to set up a cluster you will
4343
need to create a namespace for your domain. This is the name you should
4444
use here. If you are not using Kubernetes then you can leave this as
45-
``EC_NAMESPACE=`` and this will deploy IOC Instances to the local server's
45+
``EC_K8S_NAMESPACE=local`` and this will deploy IOC Instances to the local server's
4646
docker or podman instance.
4747

4848
- **EC_DOMAIN_REPO**: this is a link back to the repository that defines this

docs/user/tutorials/create_beamline.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -131,7 +131,7 @@ where indicated):
131131
- SECTION 1:
132132

133133
- ``export EC_REGISTRY_MAPPING='github.com=ghcr.io'``
134-
- ``export EC_K8S_NAMESPACE=``
134+
- ``export EC_K8S_NAMESPACE=local``
135135
- ``export [email protected]:**YOUR GITHUB ACCOUNT**/bl01t``
136136

137137
- SECTION 2:

docs/user/tutorials/create_ioc.rst

Lines changed: 17 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ This folder needs to contain these two items:
3030
can take a number of forms
3131
`listed here <https://github.com/epics-containers/ibek/blob/ea9da7e1cfe88f2a300ad236f820221837dd9dcf/src/ibek/templates/ioc/config/start.sh>`_.
3232

33-
values.yaml
33+
values.yaml
3434
~~~~~~~~~~~~~~~~~~~~~~~
3535

3636
We will start by creating the values.yaml file:
@@ -45,7 +45,7 @@ This should launch vscode and open the values.yaml file. Add the following:
4545

4646
.. code-block:: yaml
4747
48-
image: ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2023.10.7
48+
image: ghcr.io/epics-containers/ioc-adsimdetector-linux-runtime:2023.11.1
4949
5050
This tells the IOC Instance to run in the ``ioc-adsimdetector-linux-runtime``
5151
container. This container was built by the Generic IOC source repo here
@@ -190,7 +190,7 @@ This should launch vscode and open the ioc.yaml file. Add the following:
190190

191191
.. code:: yaml
192192
193-
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.10.7/ibek.ioc.schema.json
193+
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.11.1/ibek.ioc.schema.json
194194
195195
ioc_name: bl01t-ea-ioc-02
196196
description: Example simulated camera for BL01T
@@ -290,6 +290,9 @@ Now we can start our simulation detector like this:
290290
.. code-block:: bash
291291
292292
ec ioc exec bl01t-ea-ioc-02
293+
# enable the PVA plugin that publishes the output
294+
caput BL01T-EA-TST-02:PVA:EnableCallbacks 1
295+
# start the simulation detector
293296
caput BL01T-EA-TST-02:DET:Acquire 1
294297
295298
You should see a moving image appear in the ``c2dv`` window. For smoothest
@@ -317,15 +320,15 @@ That is because every Generic IOC publishes an *IOC schema* that describes
317320
the set of entities that an instance of that IOC may instantiate.
318321

319322
The Generic IOC we used was released at this location:
320-
https://github.com/epics-containers/ioc-adsimdetector/releases/tag/2023.10.7.
323+
https://github.com/epics-containers/ioc-adsimdetector/releases/tag/2023.11.1.
321324
This page includes the assets that are published as part of the release and
322325
one of those is ``ibek.ioc.schema.json``. This is the *IOC schema* for the
323326
``ioc-adsimdetector`` Generic IOC. This is what we referred to at the top of
324327
our *IOC yaml* file like this:
325328

326329
.. code:: yaml
327330
328-
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.10.7/ibek.ioc.schema.json
331+
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2023.11.1/ibek.ioc.schema.json
329332
330333
When editing with a YAML aware editor like VSCode this will enable auto
331334
completion and validation of the *IOC yaml* file. To enable this in VSCode
@@ -361,16 +364,17 @@ To see what ibek generated you can go and look inside the IOC container:
361364
.. code:: bash
362365
363366
ec ioc exec bl01t-ea-ioc-02
364-
ls /opt/epics/ioc/iocBoot/iocbl01t-ea-ioc-02
365-
cat /tmp/ioc.subst
366-
cat /tmp/st.cmd
367+
cd /epics/runtime/
368+
cat ioc.subst
369+
cat st.cmd
367370
368371
.. note::
369372

370373
The startup script and database are generated at container run time,
371-
by ``ibek``. They are generated in the /tmp folder of the container.
372-
This is because this is the only folder that is guaranteed to be
373-
writeable due to container security considerations.
374+
by ``ibek``. They are generated in the /epics/runtime folder
375+
of the container.
376+
In Kubernetes this will be a persistent volume so that it can be
377+
shared for easy debugging of IOC Instances.
374378

375379
If you would like to see an IOC Instance that uses a raw startup script and
376380
database then you can copy these two files out of the container and into
@@ -379,8 +383,8 @@ docker if that is what you are using):
379383

380384
.. code-block:: bash
381385
382-
podman cp bl01t-ea-ioc-02:/tmp/st.cmd iocs/bl01t-ea-ioc-02/config
383-
podman cp bl01t-ea-ioc-02:/tmp/ioc.subst iocs/bl01t-ea-ioc-02/config/ioc.subst
386+
podman cp bl01t-ea-ioc-02:/epics/runtime/st.cmd iocs/bl01t-ea-ioc-02/config
387+
podman cp bl01t-ea-ioc-02:/epics/runtime/ioc.subst iocs/bl01t-ea-ioc-02/config/ioc.subst
384388
# no longer need an ibek ioc yaml file
385389
rm iocs/bl01t-ea-ioc-02/config/ioc.yaml
386390
# re-deploy from local filesystem

docs/user/tutorials/deploy_example.rst

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -130,6 +130,13 @@ check that the IOC instance version is available as expected:
130130
Available instance versions for bl01t-ea-ioc-01:
131131
2023.11.1
132132
133+
.. note::
134+
135+
The above command is the first one to look at your github repository.
136+
This is how it finds out the versions
137+
of the IOC instance that are available. If you get an error it may be
138+
because you set EC_DOMAIN_REPO incorrectly in environment.sh. Check it
139+
and source it again to pick up any changes.
133140

134141
Now that we know the latest version number we can deploy a release version.
135142
This command will extract the IOC instance using the tag from GitHub and deploy

docs/user/tutorials/dev_container.rst

Lines changed: 21 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -96,20 +96,12 @@ Starting a Developer Container
9696
This will affect most Redhat users and you will see an error regarding
9797
permissions on the /tmp folder when VSCode is building your devcontainer.
9898

99-
Here is a temporary workaround, paste this into a terminal:
99+
Here is a workaround that disables SELinux labels in podman.
100+
Paste this into a terminal:
100101

101102
.. code-block:: bash
102103
103-
echo '
104-
#!/bin/bash
105-
if [[ "${@}" == "buildx build"* ]] ; then
106-
shift 2
107-
/usr/bin/podman buildx build --security-opt=label=disable "${@}"
108-
else
109-
/usr/bin/podman "${@}"
110-
fi
111-
' > $HOME/.local/bin/podman
112-
chmod +x $HOME/.local/bin/podman
104+
sed -i ~/.config/containers/containers.conf -e '/label=false/d' -e '/^\[containers\]$/a label=false'
113105
114106
115107
For this section we will work with the ADSimDetector Generic IOC that we
@@ -125,7 +117,7 @@ this tutorial:
125117
126118
# starting from folder bl01t so that the clone is next to bl01t
127119
cd ..
128-
git clone --recursive [email protected]:epics-containers/ioc-adsimdetector.git -b 2023.10.7
120+
git clone --recursive [email protected]:epics-containers/ioc-adsimdetector.git -b 2023.11.1
129121
cd ioc-adsimdetector
130122
ec dev build
131123
@@ -228,6 +220,17 @@ clear it.
228220

229221
Also take this opportunity to add the folder ``/epics`` to the workspace.
230222

223+
.. note::
224+
225+
Docker Users: your account inside the container will not be the owner of
226+
/epics files. vscode will try to open the repos in epics-base and support/*
227+
and git will complain about ownership. You can cancel out of these errors
228+
as you should not edit project folders inside of ``/epics`` - they were
229+
built by the container and should be considered immutable. We will learn
230+
how to work on support modules in later tuorials. This error should only
231+
be seen on first launch. podman users will have no such problem becuase they
232+
will be root inside the container and root build the container.
233+
231234
You can now easily browse around the ``/epics`` folder and see all the
232235
support modules and epics-base. This will give you a feel for the layout of
233236
files in the container. Here is a summary (where WS is your workspace on your
@@ -282,10 +285,12 @@ Try the following:
282285

283286
.. code::
284287
285-
cd /epics/ioc-adsimdetector
286-
rm -r ioc/config
287-
ln -s /repos/bl01t/iocs/bl01t-ea-ioc-02/config ioc
288-
ioc/start.sh
288+
cd /epics/ioc
289+
rm -r config
290+
ln -s /repos/bl02t/iocs/bl02t-ea-ioc-02/config .
291+
# check the ln worked
292+
ls -l config
293+
./start.sh
289294
290295
This removed the boilerplate config and replaced it with the config from
291296
the IOC instance bl01t-ea-ioc-02. Note that we used a soft link, this

0 commit comments

Comments
 (0)