@@ -230,50 +230,57 @@ The above is true because your project folder ioc-adsimdetector is mounted into
230
230
the container's filesystem with a bind mount at the same place that the
231
231
ioc files were originally placed by the container build.
232
232
233
- epics-containers devcontainers have carefully curated host filesystem mounts
234
- that allow them to look as similar as possible to the runtime container but
235
- at the same time preserve any changes that you make in the host file system.
236
- This is important because the container filesystem is temporary and will be
233
+ epics-containers devcontainers have carefully curated host filesystem mounts.
234
+ This allows the developer environment to look as similar as possible to the
235
+ runtime container.
236
+ It also will preserve any important changes that you make in the host file system.
237
+ This is essential because the container filesystem is temporary and will bed
237
238
destroyed when the container is rebuilt or deleted.
238
239
239
- The IOC code is entirely boilerplate boilerplate, the ``src/Makefile ``
240
+ See `container-layout `_ for details of which host folders are mounted into the
241
+ container.
242
+
243
+ The IOC code is entirely boilerplate, the ``/epics/ioc/iocApp/src/Makefile ``
240
244
determines which dbd and lib files to link by including two files that
241
- ibek generated during the container build namely
245
+ `` ibek `` generated during the container build namely
242
246
``/epics/support/configure/lib_list `` and ``/epics/support/configure/dbd_list ``.
243
-
244
- You can go and take a look at the Makefile in
245
- `` /epics/ioc/iocApp/src/Makefile `` to see how this is done .
247
+ Although all Generic IOCs derived from ioc-template start out with the same
248
+ generic source in `` iocApp/src ``, you are free to change them if there is
249
+ a need for different compilation options etc .
246
250
247
251
The Generic IOC should now be ready to run inside of the container. To do this:
248
252
249
253
.. code-block :: bash
250
254
251
- cd ioc
252
255
./start.sh
253
256
254
257
You will just see the default output of a Generic IOC that has no Instance
255
- configuration. Next we will add some instance configuration from one of the
258
+ configuration. Hit ``Ctrl-C `` to stop the this default script.
259
+
260
+ Next we will add some instance configuration from one of the
256
261
IOC instances in the ``bl01t `` beamline.
257
262
258
- Let's now add some other folders to our VSCode workspace to make it easier to
259
- work with ``bl01t `` and to investigate the container.
263
+ To do this we will add some other folders to our VSCode workspace to make it
264
+ easier to work with ``bl01t `` and to investigate the container filesystem .
260
265
261
266
Adding the Beamline to the Workspace
262
267
------------------------------------
263
268
264
269
To meaningfully test the Generic IOC we will need an instance to test it
265
- against. We will use the ``bl01t `` beamline that you already made. The container
266
- has been configured to mount some useful local files from the user's home directory,
267
- including the parent folder of the workspace as ``/repos `` so we can work on
270
+ against. We will use the ``bl01t `` beamline that you already made. The devcontainer
271
+ has been configured to mount some useful host folders into the container
272
+ including the parent folder of the workspace as ``/workspaces `` so we can work on
268
273
multiple peer projects.
269
274
270
275
In VSCode click the ``File `` menu and select ``Add Folder to Workspace ``.
271
- Navigate to ``/repos `` and you will see all the peers of your ``ioc-adsimdetector ``
276
+ Navigate to ``/workspaces `` and you will see all the peers of your ``ioc-adsimdetector ``
272
277
folder (see `container-layout ` below). Choose the ``bl01t `` folder and add it to the
273
- workspace - you may see an error but if so clicking "reload window " will
278
+ workspace - you may see an error but if so clicking "Cancel " will
274
279
clear it.
275
280
276
- Also take this opportunity to add the folder ``/epics `` to the workspace.
281
+ Also take this opportunity to add the folder ``/epics `` to the workspace. This
282
+ is the root folder in which all of the EPICS source and built files are
283
+ located.
277
284
278
285
.. note ::
279
286
@@ -284,7 +291,7 @@ Also take this opportunity to add the folder ``/epics`` to the workspace.
284
291
built by the container and should be considered immutable. We will learn
285
292
how to work on support modules in later tutorials. This error should only
286
293
be seen on first launch. podman users will have no such problem because they
287
- will be root inside the container and root build the container.
294
+ will be root inside the container and root built the container.
288
295
289
296
You can now easily browse around the ``/epics `` folder and see all the
290
297
support modules and epics-base. This will give you a feel for the layout of
@@ -309,10 +316,6 @@ host. i.e. the root folder under which your projects are all cloned):
309
316
- N/A
310
317
- compiled epics-base
311
318
312
- * - /epics/ioc-adsimdetector
313
- - WS/ioc-adsimdetector
314
- - Source repository for the Generic IOC
315
-
316
319
* - /epics/ioc
317
320
- WS/ioc-adsimdetector/ioc
318
321
- soft link to IOC source tree
@@ -329,10 +332,19 @@ host. i.e. the root folder under which your projects are all cloned):
329
332
- N/A
330
333
- all OPI files (generated or copied from support)
331
334
332
- * - /repos
335
+ * - /workspaces
333
336
- WS
334
337
- all peers to Generic IOC source repo
335
338
339
+ * - /workspaces/ioc-adsimdetector
340
+ - WS/ioc-adsimdetector
341
+ - Generic IOC source repo (in this example)
342
+
343
+ * - /epics/generic-source
344
+ - WS/ioc-adsimdetector
345
+ - A second - fixed location mount of the Generic IOC source repo
346
+
347
+
336
348
.. _choose-ioc-instance :
337
349
338
350
Choose the IOC Instance to Test
@@ -346,7 +358,7 @@ Try the following:
346
358
347
359
cd /epics/ioc
348
360
rm -r config
349
- ln -s /repos /bl01t/iocs/bl01t-ea-ioc-02/config .
361
+ ln -s /workspaces /bl01t/iocs/bl01t-ea-ioc-02/config .
350
362
# check the ln worked
351
363
ls -l config
352
364
./start.sh
0 commit comments