Skip to content

Commit 130884c

Browse files
authored
Merge pull request #28 from epics-containers/dev
complete rtems ioc tutorial
2 parents 4554281 + 6886061 commit 130884c

File tree

4 files changed

+63
-10
lines changed

4 files changed

+63
-10
lines changed

docs/user/reference/ioc_helm_chart.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ IOC Helm Chart Details
33

44
IOC instances are described using a helm chart which in turn generates
55
a Kubernetes manifest to tell Kubernetes what resources to create in order
6-
to run for the IOC instance.
6+
to run the IOC instance.
77

88
Here we will look inside the template IOC instance in the template
99
domain repository blxxi-template.

docs/user/tutorials/create_beamline.rst

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,6 +98,9 @@ repo in the future.
9898
to your unique name and edit the ``name:`` field at the top of
9999
``Chart.yaml`` to match the folder name.
100100

101+
If you do this - remember to substitute in your own name in the
102+
following steps, replacing bl01t-ea-ioc-01.
103+
101104
#. Add your new repo to your VSCode workspace and take a look at what you
102105
have.
103106

@@ -167,6 +170,5 @@ for it and published ready for deployment to your cluster.
167170
In the next tutorial we will look into what we have created in more detail
168171
and we will deploy and test the new example IOC.
169172

170-
171-
TODO: I need to describe the contents of beamline-chart folder somewhere and
172-
this might be a good place to do that.
173+
For details of what goes into the helm chart of an IOC instance see
174+
`../reference/ioc_helm_chart`.

docs/user/tutorials/ioc_changes.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,8 @@ in the container like this:
114114
115115
When you type exit on the iocShell the container will stop and and be removed.
116116

117+
.. _local_deploy_ioc:
118+
117119
Deploying a Beta IOC Instance to The Cluster
118120
============================================
119121

docs/user/tutorials/rtems_ioc.rst

Lines changed: 55 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -235,10 +235,59 @@ You are now ready to deploy the IOC instance to the cluster and test it out.
235235
Deploying an RTEMS IOC Instance
236236
-------------------------------
237237

238-
TODO:
238+
To deploy an IOC instance to the cluster you can use one of two approaches:
239239

240-
Once you have the correct configuration in your RTEMS boot-loader and you have
241-
deployed the kubernetes IOC instance, you can restart the IOC with
242-
the ``reset`` command. This will cause it to reboot and it should pick
243-
up your binary from the network and start the IOC. You should see the
244-
iocShell fire up and run
240+
- push your beamline repo to GitHub and tag it. Then use ``ec ioc deploy`` to
241+
deploy the resulting versioned IOC instance. This was covered for linux IOCs
242+
in `deploy_example`.
243+
244+
- use ``ec ioc deploy-local`` to directly deploy the local copy of the IOC
245+
instance helm chart to kubernetes as a beta version. This was covered for
246+
linux IOCs in `local_deploy_ioc`.
247+
248+
Both types of deployment of IOC instances above work exactly the same for
249+
linux and RTEMS IOCs. We will do the latter as it is quicker for
250+
the purposes of the tutorial.
251+
252+
Execute the following commands:
253+
254+
.. code-block:: bash
255+
256+
cd bl01t
257+
ec ioc deploy-local iocs/bl01t-ea-ioc-02
258+
259+
When an RTEMS Kubernetes pod runs up it will make a telnet connection to
260+
the hard IOC's console and present the console as stdin/stdout of the
261+
container. This means once you have done the above deployment the command:
262+
263+
264+
.. code-block:: bash
265+
266+
ec logs bl01t-ea-ioc-02 -f
267+
268+
will show the RTEMS console output, and follow it along (``-f``) as the IOC
269+
starts up. You can hit ``^C`` to stop following the logs.
270+
271+
You can also attach to the container and interact with the RTEMS console via
272+
the telnet connection with:
273+
274+
.. code-block:: bash
275+
276+
ec attach bl01t-ea-ioc-02
277+
278+
Most likely for the first deploy your IOC will still be sitting at the
279+
``MVME5500>`` prompt. If you see this prompt when you attach then you need
280+
to type ``reset`` to restart the boot-loader. This should then go through
281+
the boot-loader startup and eventually start the IOC.
282+
283+
Checking your RTEMS IOC
284+
-----------------------
285+
286+
To verify that your RTEMS IOC is working you should be able to execute the
287+
following commands and get correct sum of the A and B values:
288+
289+
.. code-block:: bash
290+
291+
caput bl01t-ea-ioc-02:A 12
292+
caput get bl01t-ea-ioc-02:B 13
293+
caget get bl01t-ea-ioc-02:SUM

0 commit comments

Comments
 (0)