Skip to content

Commit 62ebc65

Browse files
committed
#31 make PV names unique in tutorial IOC
1 parent 9d7980c commit 62ebc65

File tree

5 files changed

+28
-12
lines changed

5 files changed

+28
-12
lines changed

docs/user/tutorials/create_beamline.rst

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -87,16 +87,19 @@ repo in the future.
8787
mv iocs/blxxi-ea-ioc-01/ iocs/bl01t-ea-ioc-01
8888
mv opi/blxxi-ea-ioc-01/ opi/bl01t-ea-ioc-01
8989
# careful to use find *, NOT find . or you will change the .git folder
90-
sed -i 's/BLXXI/BL01T/g' $(find * -type f)
91-
sed -i 's/blxxi/bl01t/g' $(find * -type f)
90+
sed -i s/blxxi/bl01t/g $(find * -type f)
91+
# use your username as the prefix to all PV names
92+
# this ensures multiple simultaneous users do not clash
93+
sed -i s/BLXXI/$USER/g $(find * -type f)
9294
9395
.. note::
9496

9597
If you are sharing the bl01t namespace on a cluster with other users
96-
(e.g. if you are at DLS) then consider changing the name of your IOC
98+
(e.g. if you are at **DLS**) then change the name of your IOC
9799
to something unique. To do this rename the folder iocs/bl01t-ea-ioc-01
98100
to your unique name and edit the ``name:`` field at the top of
99-
``Chart.yaml`` to match the folder name.
101+
``Chart.yaml`` to match the folder name. The suggested name is your
102+
username as the prefix e.g. hgv27681-ea-ioc-01.
100103

101104
If you do this - remember to substitute in your own name in the
102105
following steps, replacing bl01t-ea-ioc-01.
@@ -115,7 +118,7 @@ repo in the future.
115118
git remote add origin [email protected]:<YOUR USER NAME>/bl01t.git
116119
git add .
117120
git commit -m "rename blxxi to bl01t"
118-
git push origin main
121+
git push --set-upstream origin main
119122
120123
As this is your first commit you may find that you need to set your
121124
username and email address for git. If so, follow the instructions

docs/user/tutorials/debug_generic_ioc.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -231,4 +231,4 @@ the image to a container registry so that it can run in Kubernetes.
231231

232232

233233
.. Once running:-
234-
.. caput -S BL01T-EA-TST-02:CAM:URL1
234+
.. caput -S $USER-EA-TST-02:CAM:URL1

docs/user/tutorials/deploy_example.rst

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,9 @@ IOC Instance.
3636
point. For more information see `CLI` or try ``ec --help``.
3737

3838

39-
The following command will deploy the example IOC instance to your cluster:
39+
The following command will deploy the example IOC instance to your cluster
40+
(if you changed the ioc name in the previous tutorial then
41+
remember to change bl01t-ea-ioc-01 to your unique name here):
4042

4143
.. code-block:: bash
4244
@@ -91,7 +93,7 @@ You can now launch the client applications as follows:
9193
.. code-block:: bash
9294
9395
./blxxi-ea-ioc-01-gui.sh
94-
c2dv --pv BL01T-EA-TST-01:IMAGE
96+
c2dv --pv $USER-EA-TST-01:IMAGE
9597
9698
Now make sure the AreaDetector is Acquiring by clicking Start if needed on
9799
the CAM screen. Next click on Auto to scale the

docs/user/tutorials/ioc_changes.rst

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,12 @@ is working.
5151
Make the following changes in your test IOC config folder
5252
(``bl01t/iocs/bl01t-ea-ioc-01/config``):
5353

54-
1. Add a file called ``extra.db`` with the following contents:
54+
1. Add a file called ``extra.db`` with the following contents.
55+
IMPORTANT replace [$USER] with your username:
5556

5657
.. code-block:: text
5758
58-
record(ai, "BL01T-EA-IOC-01:TEST") {
59+
record(ai, "[$USER]-EA-IOC-01:TEST") {
5960
field(DESC, "Test record")
6061
field(DTYP, "Soft Channel")
6162
field(SCAN, "Passive")
@@ -91,7 +92,7 @@ from another terminal (VSCode menus -> Terminal -> New Terminal) like so:
9192

9293
.. code-block:: bash
9394
94-
caget BL01T-EA-IOC-01:TEST
95+
caget $USER-EA-IOC-01:TEST
9596
9697
If you see the value 1 then your change is working.
9798

@@ -156,7 +157,7 @@ from the above command):
156157
.. code-block:: bash
157158
158159
export EPICS_CA_ADDR_LIST=192.168.0.32
159-
caget BL01T-EA-IOC-01:TEST
160+
caget $USER-EA-IOC-01:TEST
160161
161162
Once you are happy with your changes you can push and tag your beamline repo.
162163
This will publish a new version of the IOC instance helm chart to the OCI helm

docs/user/tutorials/rtems_ioc.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,16 @@ runs, it deploys a kubernetes pod that manages the RTEMS IOC. It does contain
229229
the IOC's configuration and the IOC's binary code, which it will copy to the
230230
file-server on startup.
231231

232+
Finally you will need to tell the IOC to mount the Persistent Volume Claim
233+
that the bl01t-ioc-files service is serving over NFS and TFTP. To do this
234+
add the following lines to ``iocs/bl01t-ea-ioc-02/values.yaml``:
235+
236+
.. code-block:: yaml
237+
238+
# for RTEMS IOCS this is the PVC name for the filesystem where RTEMS
239+
# IOCs look for their files - enable this in RTEMS IOCs only
240+
nfsv2TftpClaim: bl01t-ioc-files-claim
241+
232242
You are now ready to deploy the IOC instance to the cluster and test it out.
233243

234244

0 commit comments

Comments
 (0)