Skip to content

Commit 0a4ae57

Browse files
Tutorial Proof Read Batch #1 (#140)
* Typo * Typo fix * Move command next to instruction * Fix numbering not continuous * Fix accidental copying 'copier update ..' * Release number not part of date * Grammar * Floating bullet * Grammar * Explicity link IOC instance to example-test-01 * Non working feature breaks flow - reorder * Qualify instance * Inconsistent image revision? * Typo * Remove redundancy * Grammar * update adsimdetector v to 2024.8.2 --------- Co-authored-by: Giles Knap <[email protected]>
1 parent 7379e90 commit 0a4ae57

File tree

4 files changed

+40
-38
lines changed

4 files changed

+40
-38
lines changed

docs/tutorials/create_beamline.md

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ Here we are going to create the test beamline repository `t01-services`. When th
2222
This beamline repository will be made from a template that comes with a single example IOC and further steps in the following tutorials will teach you how to add your own.
2323

2424
:::{note}
25-
If you are working is a shared environment you need not create a unique beamline name or PV prefix because the example runs with all PVs published on localhost only. Your example beamline will be isolated from other users on the same network.
25+
If you are working in a shared environment you need not create a unique beamline name or PV prefix because the example runs with all PVs published on localhost only. Your example beamline will be isolated from other users on the same network.
2626
:::
2727

2828
## To Start
@@ -46,14 +46,15 @@ NOTE: for these tutorials we will use your personal GitHub Account to store ever
4646

4747
1. Use copier to copy the services template repository to a new repository named `t01-services`. Note that there are two services templates, one for local deployments (using docker compose) and one for deployments to Kubernetes. We will use the local deployment template here.
4848

49-
Note the benefits of using copier to create a new repository:
50-
- you can template the repository and use questions to fill in the template, making a unique result.
51-
- if the template changes in future you can merge the changes into you repository without losing your changes, simply by running `copier update .`.
52-
5349
```bash
5450
copier copy gh:epics-containers/services-template-compose t01-services
5551
```
5652

53+
Note the benefits of using copier to create a new repository:
54+
- you can template the repository and use questions to fill in the template, making a unique result.
55+
- if the template changes in future you can merge the changes into you repository without losing your changes, simply by running `copier update .`
56+
57+
5758
1. Answer the copier template questions with their default values as follows:
5859

5960
<pre><font color="#75507B">hgv27681</font>@<font color="#C4A000">pc0116</font>: <font color="#729FCF"><b>/scratch/hgv27681/work</b></font>
@@ -72,11 +73,11 @@ Note the benefits of using copier to create a new repository:
7273

7374
1. Create your new repository on GitHub in your personal space by following this link <https://github.com/new>. Give it the name t01-services and a description of "t01 IOC Instances and Services". Then click "Create repository".
7475

75-
Now copy the ssh address of your new repository from the GitHub page.
76+
Now copy the ssh address of your new repository from the GitHub page.
7677

77-
:::{figure} ../images/copy_gh_repo_addr.png
78-
copying the repository address from GitHub
79-
:::
78+
:::{figure} ../images/copy_gh_repo_addr.png
79+
copying the repository address from GitHub
80+
:::
8081

8182
1. Make the first commit and push the repository to GitHub.
8283

@@ -116,7 +117,7 @@ CalVer is described here: <https://calver.org/> and is used where semantic
116117
versioning is not appropriate because the repository contains a mix of
117118
dependencies and does not have a clear API.
118119

119-
Note that 2024.9.1 represents the date that this tutorial was last updated.
120+
Note that 2024.9 represents the date that this tutorial was last updated.
120121
For completeness you could use the current year and month instead. You
121122
are also free to choose your own versioning scheme as this is not enforced by
122123
any of the epics-containers tools.

docs/tutorials/create_ioc.md

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Introduction
44

5-
The last section covered deploying and managing the example Instance that came with the template services repository. Here we will create a new IOC Instance that implements a simulated detector.
5+
The last section covered deploying and managing the example IOC Instance that came with the template services repository. Here we will create a new IOC Instance that implements a simulated detector.
66

77
For this tutorial some familiarity with the EPICS AreaDetector framework is useful. Take a look at this documentation if you have not yet come across AreaDetector: <https://areadetector.github.io/master/index.html>.
88

@@ -38,7 +38,7 @@ code .
3838

3939
Our new example IOC will be a simulation detector using the AreaDetector SimDetector. There is already a Generic IOC for the SimDetector, therefore to create an IOC Instance, we just need to refer to that Generic IOC container image and provide some configuration for it.
4040

41-
You can find the Generic IOC container source for SimDetector here: <https://github.com/epics-containers/ioc-adsimdetector>. This repository publishes its container image at: `ghcr.io/epics-containers/ioc-adsimdetector-runtime:2024.8.1`. Later tutorials will cover how to build and publish your own Generic IOC container images.
41+
You can find the Generic IOC container source for SimDetector here: <https://github.com/epics-containers/ioc-adsimdetector>. This repository publishes its container image at: `ghcr.io/epics-containers/ioc-adsimdetector-runtime:2024.8.2`. Later tutorials will cover how to build and publish your own Generic IOC container images.
4242

4343
Edit the `compose.yml` file in the `bl01t-ea-cam-01` folder to reflect the new IOC name and to refer to the Generic IOC container image for the SimDetector:
4444

@@ -60,7 +60,7 @@ services:
6060
service: linux_ioc
6161
file: ../../include/ioc.yml
6262

63-
image: ghcr.io/epics-containers/ioc-adsimdetector-runtime:2024.8.1
63+
image: ghcr.io/epics-containers/ioc-adsimdetector-runtime:2024.8.2
6464

6565
labels:
6666
version: 0.1.0
@@ -328,7 +328,7 @@ one of those is `ibek.ioc.schema.json`. This is the *IOC schema* for the
328328
our *IOC yaml* file like this:
329329

330330
```yaml
331-
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2024.8.1/ibek.ioc.schema.json
331+
# yaml-language-server: $schema=https://github.com/epics-containers/ioc-adsimdetector/releases/download/2024.8.2/ibek.ioc.schema.json
332332
```
333333

334334
When editing with a YAML aware editor like VSCode this will enable auto
@@ -372,7 +372,7 @@ Now you will see a red squiggle at the start of 'type'. Hover over this and it w
372372
using schema to add an NDProcess plugin
373373
:::
374374

375-
Fill out the rest of you NDProcess entity as follows:
375+
Fill out the rest of your NDProcess entity as follows:
376376
```yaml
377377
- type: ADCore.NDProcess
378378
PORT: DET.PROC
@@ -416,8 +416,7 @@ shared for easy debugging of IOC Instances.
416416

417417
If you would like to see an IOC Instance that uses a raw startup script and
418418
database then you can copy these two files out of the container and into
419-
your IOC Instance config folder like this (replace docker with
420-
docker if that is what you are using):
419+
your IOC Instance config folder like this:
421420

422421
```bash
423422
docker cp bl01t-ea-cam-01-1:/epics/runtime/st.cmd services/bl01t-ea-cam-01/config
@@ -426,7 +425,7 @@ docker cp bl01t-ea-cam-01-1:/epics/runtime/ioc.subst services/bl01t-ea-cam-01/co
426425
rm services/bl01t-ea-test-02/config/ioc.yaml
427426
```
428427

429-
You will need to make a minor change to the `ioc.subst` file. Edit this and remove references to the two template files with `.pvi` in their name. These are PVI generated templates for use with OphydAsync and are not available in manually build IOC Instances.
428+
You will need to make a minor change to the `ioc.subst` file. Edit this and remove references to the two template files with `.pvi` in their name. These are PVI generated templates for use with OphydAsync and are not available in manually built IOC Instances.
430429

431430
Your IOC Instance will now be using the raw startup script and database. But should behave exactly the same as before. You are free to experiment with changes in the startup script and substitution file and re-deploy the IOC.
432431

docs/tutorials/deploy_example.md

Lines changed: 21 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
## Introduction
44

5-
This tutorial will show you how to deploy and manage the example IOC Instance that came with the template beamline repository. You will need to have your own `t01-services` beamline repository from the previous tutorial.
5+
This tutorial will show you how to deploy and manage the example IOC Instance `example-test-01` that came with the template beamline repository. You will need to have your own `t01-services` beamline repository from the previous tutorial.
66

77
For these early tutorials we are not using Kubernetes and instead are deploying IOCs to the local docker or podman instance. These kind of deployments are ideal for testing and development on a developer workstation. They could also potentially be used for production deployments to beamline servers where Kubernetes is not available.
88

@@ -31,7 +31,7 @@ If you click on the most recent job you can drill in and see the steps that
3131
were executed. The most interesting step is `Run IOC checks`. This
3232
is executing the script `.github/workflows/ci_verify.sh`. This goes through
3333
each of the IOC Instances in the `services` folder and checks that they
34-
have valid configuration.
34+
have a valid configuration.
3535

3636
For the moment just check that your CI passed and if not review that you
3737
have followed the instructions in the previous tutorial correctly.
@@ -47,7 +47,7 @@ The standard way to set up your environment for any ec services repository is to
4747
source ./environment.sh
4848
```
4949

50-
The environment file is the same for all local deployment services projects and sets up the following. The defaults supplied are all intended for developer workstation use:-
50+
The environment file is the same for all local deployment services projects and sets up the following. The defaults supplied are all intended for developer workstation use:
5151
- sets permissions on **xhost** to allow local containers to display GUIs on the host.
5252
- sets **UIDGID** which is used to set which account and group the phoebus container is launched with. This is always 0:0 for podman and USERID:GROUPID for docker. Only required for developer workstations.
5353
- sets **COMPOSE_PROFILES** which determines which compose profile is launched. Defaults to the 'test' profile intended for testing on developer workstations. It runs a ca-gateway container that publishes PVs on localhost and a container for phoebus to provide an OPI.
@@ -102,25 +102,12 @@ ec ps
102102
:::{Note}
103103
Generic IOCs.
104104

105-
You may have noticed that the IOC instance has is showing that it has container image `ghcr.io/epics-containers/ioc-template-example-runtime:3.5.1`.
105+
You may have noticed that the IOC instance is showing that it has container image `ghcr.io/epics-containers/ioc-template-example-runtime:3.5.1`.
106106

107107
This is a Generic IOC image and all IOC Instances must be based upon one of these images. ioc-template-example-runtime is an instantiation of the template project for creating new Generic IOCs. It has only deviocstats support and no other support modules. This generic IOC can be used for serving records out of a database file as we have done in this example.
108108
:::
109109

110-
### Monitoring and interacting with an IOC shell
111-
112-
To attach to the IOC shell you can use the following command. HOWEVER, this
113-
will attach you to nothing in the case of this example IOC as it has no
114-
shell. In the next tutorial we will use this command to interact with
115-
iocShell.
116-
117-
```bash
118-
ec attach example-test-01
119-
dbl
120-
# ctrl-p ctrl-q to detach
121-
```
122-
123-
Use the command sequence ctrl-P then ctrl-Q to detach from the IOC. **However, there are issues with both VSCode and IOC shells capturing ctrl-P**. Until this is resolved it may be necessary to close the terminal window to detach. You can also restart and detach from the IOC using ctrl-D or ctrl-C, or by typing `exit`. If you do this docker will restart your IOC right away.
110+
### Exploring an IOC instance
124111

125112
To run a bash shell inside the IOC container:
126113

@@ -171,7 +158,7 @@ ec stop
171158
```
172159

173160
This will stop all the currently running containers described in the `compose.yml` file.
174-
However this will leave the resources themselves in place:-
161+
However this will leave the resources themselves in place:
175162
- stopped containers
176163
- container networks
177164
- container volumes
@@ -181,3 +168,18 @@ To take down the services and remove all of their resources use the following co
181168
```bash
182169
ec down
183170
```
171+
172+
### Monitoring and interacting with an IOC shell
173+
174+
To attach to the IOC shell you can use the following command. HOWEVER, this
175+
will attach you to nothing in the case of this example IOC as it has no
176+
shell. In the next tutorial we will use this command to interact with
177+
iocShell.
178+
179+
```bash
180+
ec attach example-test-01
181+
dbl
182+
# ctrl-p ctrl-q to detach
183+
```
184+
185+
Use the command sequence ctrl-P then ctrl-Q to detach from the IOC. **However, there are issues with both VSCode and IOC shells capturing ctrl-P**. Until this is resolved it may be necessary to close the terminal window to detach. You can also restart and detach from the IOC using ctrl-D or ctrl-C, or by typing `exit`. If you do this docker will restart your IOC right away.

docs/tutorials/intro.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ some background in the following topics.
1818
**Orchestrating containers in a cluster with Kubernetes** https://kubernetes.io/docs/concepts/overview/
1919
**Managing packages in a Kubernetes Cluster with Helm** https://helm.sh/docs/intro/quickstart/
2020
**Introduction to EPICS** https://docs.epics-controls.org/en/latest/guides/EPICS_Intro.html
21-
**Argo CD continuous delpoyment for Kubernetes** https://argo-cd.readthedocs.io/en/stable/
21+
**Argo CD continuous deployment for Kubernetes** https://argo-cd.readthedocs.io/en/stable/
2222
================================================================ ================
2323
```
2424

0 commit comments

Comments
 (0)