Skip to content

Commit a133776

Browse files
committed
#31 improve ec dev ioc-launch
1 parent 62ebc65 commit a133776

File tree

4 files changed

+27
-108
lines changed

4 files changed

+27
-108
lines changed

docs/user/how-to/run_iocs.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ thing as the above podman command:
4848

4949
.. code-block:: bash
5050
51-
ec dev ioc-launch iocs/bl01t-ea-ioc-01 --tag 23.3.3
51+
ec dev ioc-launch iocs/bl01t-ea-ioc-01
5252
5353
That is because ``ioc-launch`` is intended for locally testing an IOC instance
5454
that is destined for Kubernetes.

docs/user/reference/cli.rst

Lines changed: 0 additions & 100 deletions
Original file line numberDiff line numberDiff line change
@@ -19,103 +19,3 @@ or by setting the ``K8S_QUIET=true`` in your environment.
1919
The CLI entrypoint is ``ec``. To see the available commands, run ``ec --help``.
2020
Much of the functionality is available through subcommands dev and ioc.
2121
Below is pasted the current version of help for the CLI.
22-
23-
.. code-block::
24-
25-
26-
[E7][work-ec]$ ec --help
27-
28-
Usage: ec [OPTIONS] COMMAND [ARGS]...
29-
30-
EPICS Containers assistant CLI
31-
32-
╭─ Options ─────────────────────────────────────────────────────╮
33-
│ --version Log the version of ec and │
34-
│ exit │
35-
│ --domain -d TEXT Domain namespace to use │
36-
│ [default: bl01t] │
37-
│ --image-registry TEXT Image registry to pull │
38-
│ from │
39-
│ [default: │
40-
│ ghcr.io/gilesknap] │
41-
│ --helm-registry TEXT Helm registry to pull │
42-
│ from │
43-
│ [default: │
44-
│ ghcr.io/gilesknap] │
45-
│ --quiet -q Suppress printing of │
46-
│ commands executed │
47-
│ --log-level TEXT Log level (DEBUG, INFO, │
48-
│ WARNING, ERROR, CRITICAL) │
49-
│ [default: WARN] │
50-
│ --install-completion Install completion for │
51-
│ the current shell. │
52-
│ --show-completion Show completion for the │
53-
│ current shell, to copy it │
54-
│ or customize the │
55-
│ installation. │
56-
│ --help Show this message and │
57-
│ exit. │
58-
╰───────────────────────────────────────────────────────────────╯
59-
╭─ Commands ────────────────────────────────────────────────────╮
60-
│ dev Commands for building, debugging containers. See │
61-
│ 'ec dev --help' │
62-
│ ioc Commands for managing IOCs in the cluster. See 'ec │
63-
│ ioc --help' │
64-
│ monitor Monitor the status of IOCs in a domain │
65-
│ ps List the IOCs running in the current domain │
66-
│ resources Output information about a domain's cluster │
67-
│ resources │
68-
╰───────────────────────────────────────────────────────────────╯
69-
70-
[E7][work-ec]$ ec dev --help
71-
72-
Usage: ec dev [OPTIONS] COMMAND [ARGS]...
73-
74-
Commands for building, debugging containers. See 'ec dev
75-
--help'
76-
77-
╭─ Options ─────────────────────────────────────────────────────╮
78-
│ --help Show this message and exit. │
79-
╰───────────────────────────────────────────────────────────────╯
80-
╭─ Commands ────────────────────────────────────────────────────╮
81-
│ build Build a container locally from a container │
82-
│ project. │
83-
│ debug-last Launches a container with the most recent image │
84-
│ build. Useful for debugging failed builds │
85-
│ ioc-launch Launch an IOC instance using a local helm chart │
86-
│ definition. Set folder for a locally editable │
87-
│ generic IOC or tag to choose any version from the │
88-
│ registry. │
89-
│ launch Launch a bash prompt in a container │
90-
│ make make the generic IOC source code inside its │
91-
│ container │
92-
╰───────────────────────────────────────────────────────────────╯
93-
94-
[E7][work-ec]$ ec ioc --help
95-
96-
Usage: ec ioc [OPTIONS] COMMAND [ARGS]...
97-
98-
Commands for managing IOCs in the cluster. See 'ec ioc --help'
99-
100-
╭─ Options ─────────────────────────────────────────────────────╮
101-
│ --help Show this message and exit. │
102-
╰───────────────────────────────────────────────────────────────╯
103-
╭─ Commands ────────────────────────────────────────────────────╮
104-
│ attach Attach to the IOC shell of a live IOC │
105-
│ delete Remove an IOC helm deployment from the cluster │
106-
│ deploy Pull an IOC helm chart and deploy it to the │
107-
│ cluster │
108-
│ deploy-local Deploy a local IOC helm chart directly to the │
109-
│ cluster with dated beta version │
110-
│ exec Execute a bash prompt in a live IOC's container │
111-
│ log-history Open historical logs for an IOC │
112-
│ logs Show logs for current and previous instances of │
113-
│ an IOC │
114-
│ restart Restart an IOC │
115-
│ start Start an IOC │
116-
│ stop Stop an IOC │
117-
│ template print out the helm template generated from a │
118-
│ local ioc helm chart │
119-
│ versions List all versions of the IOC available in the │
120-
│ helm registry │
121-
╰───────────────────────────────────────────────────────────────╯

docs/user/tutorials/deploy_example.rst

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,9 @@ monitor the progress (hit ctrl-C to stop following the logs):
6363
ec ioc logs bl01t-ea-ioc-01 -f
6464
6565
Note there may be a little delay while the cluster pulls the generic IOC
66-
image from the GitHub container registry.
66+
image from the GitHub container registry. The error
67+
"recGblRecordError: devStringinEnvVar (init_record) Illegal INP parm field Illegal field value PV: BL01T-EA-IOC-01:TIMEZONE"
68+
is benign, TODO: take a look at the cause of this error.
6769

6870
Once the IOC is running you can find out the IP address of the pod it is
6971
running in with:

docs/user/tutorials/ioc_changes.rst

Lines changed: 23 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,13 +79,11 @@ folder:
7979

8080
.. code-block:: bash
8181
82-
ec dev ioc-launch iocs/bl01t-ea-ioc-01 --tag 23.3.4
82+
ec dev ioc-launch iocs/bl01t-ea-ioc-01
8383
84-
The ``--tag`` option specifies the version of the Generic IOC container to use
85-
and this means it will be pulled from the container registry (or come from
86-
the cache if it has already been pulled).
87-
If you do not supply a tag then ``ec`` will look for a local copy of the
88-
container to use, we will cover this in `generic_ioc`.
84+
This will launch Generic IOC container specified in the ``bl01t-ea-ioc-01``
85+
helm chart and mount into it the local config specified in
86+
``/iocs/bl01t-ea-ioc-01/config``.
8987

9088
If all is well you should see your iocShell prompt and you can test your change
9189
from another terminal (VSCode menus -> Terminal -> New Terminal) like so:
@@ -96,6 +94,25 @@ from another terminal (VSCode menus -> Terminal -> New Terminal) like so:
9694
9795
If you see the value 1 then your change is working.
9896

97+
.. note::
98+
99+
If you also wanted to make local changes
100+
to the generic IOC itself you could clone the generic IOC source repo,
101+
locally build the container image and then use ``ec dev ioc-launch`` as
102+
follows:
103+
104+
.. code-block:: bash
105+
106+
# advanced example - not part of this tutorial
107+
cd <root of your workspace>
108+
git clone [email protected]:epics-containers/ioc-adsimdetector.git
109+
cd ioc-adsimdetector
110+
# this makes a local image with tag :local
111+
ec dev build
112+
cd ../bl01t
113+
ec dev ioc-launch iocs/bl01t-ea-ioc-01 ../ioc-adsimdetector
114+
115+
99116
Note you can see your running IOC in podman using this command:
100117

101118
.. code-block:: bash

0 commit comments

Comments
 (0)