You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/tutorials/create_ioc.md
+1-1Lines changed: 1 addition & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -207,7 +207,7 @@ Note that the process for taking a *Support yaml* entity_model with values from
207
207
208
208
To learn more about Jinja templating see here: <https://jinja.palletsprojects.com/en/3.0.x/templates/>.
209
209
210
-
Therefore, we can update our *IOC yaml* file by adding an ADSimDetector entity to the entities list. In vscode, open **services/t01-ea-cam-01/config/ioc.yaml** and edit the boilerplate template so that it looks like the following:
210
+
Therefore, we can update our *IOC yaml* file by adding an ADSimDetector entity to the entities list. In vscode, open **services/bl01t-ea-cam-01/config/ioc.yaml** and edit the boilerplate template so that it looks like the following:
Copy file name to clipboardExpand all lines: docs/tutorials/dev_container.md
+11-15Lines changed: 11 additions & 15 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -70,7 +70,7 @@ Also, epics-containers provides a mechanism for creating a separate workspace fo
70
70
71
71
The earlier tutorials were firmly in the realm of [](changes_1) above. It was adequate for us to install a container platform, IDE and python and that is all we needed.
72
72
73
-
Once you get to level of [](changes_2) you need to have compilers and build tools installed. You might also require system level dependencies. AreaDetector, that we used earlier has a long list of system dependencies that need to be installed in order to compile it. Traditionally we have installed all of these onto developer workstations or separately compiled the dependencies as part of the build.
73
+
Once you get to the level of [](changes_2) you need to have compilers and build tools installed. You might also require system level dependencies. AreaDetector, that we used earlier has a long list of system dependencies that need to be installed in order to compile it. Traditionally we have installed all of these onto developer workstations or separately compiled the dependencies as part of the build.
74
74
75
75
These tools and dependencies will likely differ from one Generic IOC to the next.
76
76
@@ -161,7 +161,7 @@ If you do not do this, your devcontainer will run as root. Although it will stil
161
161
162
162
### First Time Preparation
163
163
164
-
The devcontainer uses a docker network that it can share with a ca-gateway in order that your PVs are accessible from your host machine. We arrange to create this network once and as long as you don't delete it or reset docker it will be available for all your devcontainers going forward.
164
+
The devcontainer uses a docker network that it can share with a ca-gateway so that your PVs are accessible from your host machine. We arrange to create this network once, and as long as you don't delete it or reset docker, it will be available for all your devcontainers going forward.
In this section we are going to use vscode to launch a developer container. This means that all vscode terminals and editors will be running inside our container and browsing for files with vscode uses the container filesystem. This is a very convenient way to work because it makes it possible to archive away the development environment alongside the source code. It also means that you can easily share the development environment with other developers, and your development environment is portable between machines.
175
+
In this section we are going to use vscode to launch a developer container. This means that all vscode terminals and editors will be running inside our container and browsing for files with the container filesystem. This is a very convenient way to work because it makes it possible to archive away the development environment alongside the source code. It also means that you can easily share the development environment with other developers, and your development environment is portable between machines.
176
176
177
177
For epics-containers the generic IOC *is* the developer container. When
178
178
you build the developer target of the container in CI it will contain all the
@@ -267,7 +267,7 @@ In VSCode click the `File` menu and select `Add Folder to Workspace`. Navigate t
267
267
268
268
Also take this opportunity to add the folder `/epics` to the workspace. This is the root folder in which all of the EPICS source and built files are located.
269
269
270
-
You can now easily browse around the `/epics` folder and see all the support modules and epics-base. This will give you a feel for the layout of files in the container. Here is a summary (where WS is your workspace on your host. i.e. the root folder under which your two projects are cloned):
270
+
You can now easily browse around the `/epics` folder and see all the support modules and epics-base. This will give you a feel for the layout of files in the container. Here is a summary relative to `${localWorkspaceFolder}` which is at the root of the Generic IOC source repo (the directory containing `.devcontainer/devcontainer.json`):
271
271
272
272
(container-layout)=
273
273
## Generic IOC Container Filesystem Layout
@@ -290,11 +290,11 @@ You can now easily browse around the `/epics` folder and see all the support mod
290
290
- compiled epics-base
291
291
292
292
* - /epics/ioc
293
-
- WS/ioc-adsimdetector/ioc
293
+
- ${localWorkspaceFolder}/ioc
294
294
- soft link to IOC source tree
295
295
296
296
* - /epics/opi
297
-
- WS/ioc-adsimdetector/opi
297
+
- ${localWorkspaceFolder}/opi/ioc
298
298
- auto generated OPI files for the IOC
299
299
300
300
* - /epics/runtime
@@ -309,20 +309,16 @@ You can now easily browse around the `/epics` folder and see all the support mod
309
309
- N/A
310
310
- all PVI definitions from support modules
311
311
312
-
* - /epics/opi
313
-
- N/A
314
-
- all OPI files (generated or copied from support)
315
-
316
312
* - /workspaces
317
-
- WS
313
+
- ${localWorkspaceFolder}/../
318
314
- all peers to Generic IOC source repo
319
315
320
316
* - /workspaces/ioc-adsimdetector
321
-
- WS/ioc-adsimdetector
317
+
- ${localWorkspaceFolder}
322
318
- Generic IOC source repo (in this example)
323
319
324
320
* - /epics/generic-source
325
-
- WS/ioc-adsimdetector
321
+
- ${localWorkspaceFolder}
326
322
- A second - fixed location mount of the Generic IOC source repo to allow `ibek` to find it easily.
327
323
```
328
324
@@ -342,17 +338,17 @@ Now that we have the beamline repo visible in our container we can easily supply
342
338
Try the following:
343
339
344
340
```
345
-
cd /epics/ioc
346
341
ibek dev instance /workspaces/t01-services/services/bl01t-ea-cam-01
347
342
348
343
# check the it worked - should see a symlink to the config folder
344
+
cd /epics/ioc
349
345
ls -l config
350
346
# now start the IOC by running the standard entry point script
351
347
./start.sh
352
348
# you should now see the IOC instance startup and show the ioc shell prompt
353
349
```
354
350
355
-
This removed any existing config folder and replaced it with the config from the IOC instance bl01t-ea-cam-01 by symlinking to that IOC Instance's config folder. Note that we used a soft link, this means we can edit the config, restart the IOC to test it and the changes will already be in place in the beamline repository.
351
+
This removed any existing config folder and replaced it with the config from the IOC instance bl01t-ea-cam-01 by symlinking to its config folder. Note that we used a soft link, this means we can edit the config, restart the IOC to test it and the changes will already be in place in the beamline repository.
Copy file name to clipboardExpand all lines: docs/tutorials/setup_workstation.md
+14-1Lines changed: 14 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -7,12 +7,25 @@ The tools you need to install are:
7
7
- Visual Studio Code
8
8
- a container platform, either docker or podman
9
9
- Python 3.11 or later + a Python virtual environment
10
-
- git client for version control
10
+
- git client for version control (Configured for the current user, with read-write access for Repository Contents as well as Workflows. Note: If you use Personal Access Tokens then replace `[email protected]:` with `https://github.com/` throughout this tutorial)
11
11
12
12
Visual Studio Code is recommended because it has excellent integration with
13
13
devcontainers. It also has useful extensions for working with Kubernetes,
14
14
EPICS, Yaml files and more.
15
15
16
+
:::{note}
17
+
**Using a Personal Access Token (PAT):** If following the tutorials on an untrusted machine, using a PAT for authentication is encouraged as it can be scoped and time bound. For Github users a new token can be created via Settings -> Developer Settings -> Personal access tokens -> Fine-grained tokens.
0 commit comments