Skip to content

Commit f2e4f92

Browse files
committed
switch to docker in instructions
1 parent 7f28d30 commit f2e4f92

14 files changed

+50
-58
lines changed

docs/explanations/introduction.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ and their APIs such that container images can be interchanged between
2323
different frameworks.
2424

2525
Thus, in this project we develop, build and test our container images
26-
using docker or podman but the images can be run under Kubernetes' own
26+
using docker or docker but the images can be run under Kubernetes' own
2727
container runtime.
2828

2929
This article does a good job of explaining the relationship between docker /
@@ -94,9 +94,9 @@ implementing these features:
9494
- debug an IOC by starting a bash shell inside it's container
9595

9696
### Kubernetes Alternatives
97-
If you do not wish to maintain a Kubernetes cluster then you could simply install IOCs directly into the local docker or podman instance on each server. Instead of using Kubernetes and Helm, you can use docker compose to manage such IOC instances. But this is just an example, epics-containers is intended to be modular so that you can make use of any parts of it without adopting the whole framework as used at DLS.
97+
If you do not wish to maintain a Kubernetes cluster then you could simply install IOCs directly into the local docker or docker instance on each server. Instead of using Kubernetes and Helm, you can use docker compose to manage such IOC instances. But this is just an example, epics-containers is intended to be modular so that you can make use of any parts of it without adopting the whole framework as used at DLS.
9898

99-
We provide a template services project that uses docker compose with docker or podman as the runtime engine. Docker compose allows us to describe a set of IOCs and other services for each beamline server, similar to the way Helm does. Where a beamline has multiple servers, the distribution of IOCs across those servers could be managed by maintaining a separate docker-compose file for each server in the root of the services repository.
99+
We provide a template services project that uses docker compose with docker or docker as the runtime engine. Docker compose allows us to describe a set of IOCs and other services for each beamline server, similar to the way Helm does. Where a beamline has multiple servers, the distribution of IOCs across those servers could be managed by maintaining a separate docker-compose file for each server in the root of the services repository.
100100

101101
If you choose to use this approach then you may find it useful to have another tool for viewing and managing the set of containers you have deployed across your beamline servers. There are various solutions for this, one that has been tested with **epics-containers** is Portainer <https://www.portainer.io/>. Portainer is a paid for product that provides excellent visibility and control of your containers through a web interface. Such a tool could allow you to centrally manage the containers on all your servers.
102102

docs/how-to/debug.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ Add the phrase 'deliberate_error' to the top of the `ioc.yaml` file. Then try to
2626
ec -v deploy-local services/bl01t-ea-test-02
2727
```
2828

29-
You should see something like this (for docker users - podman users will see something similar):
29+
You should see something like this (for docker users - docker users will see something similar):
3030

3131
<pre>$ ec -v deploy-local services/bl01t-ea-test-02
3232
<font color="#5F8787">docker --version</font>

docs/images/bl01t-actions.png

-4.97 KB
Loading

docs/reference/cli.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ The CLI is just a thin wrapper around the underlying tools that do the real work
1616
:argocd: the ArgoCD command line interface
1717
```
1818

19-
`ec` is useful because it saves typing and provides a consistent interface when working on multiple {any}`services-repo` s. This is because it uses the environment setup by the beamline repo's `environment.sh` script. See {any}`environment`.
19+
`ec` is useful because it saves typing and provides a consistent interface when working on multiple {any}`services-repo`s. This is because it uses the environment setup by the beamline repo's `environment.sh` script. See {any}`environment`.
2020

2121
To see the available commands, run `ec --help`.
2222

docs/reference/docker.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,11 @@ Working with Docker
33

44
DLS is a `podman` shop and therefore more testing is done with `podman` than `docker` as the container CLI used with developer containers. `podman` works extremely well with developer containers, but `docker` needs a little more work sometimes.
55

6-
The primary difference is that `podman` does not require root access and `docker` does. When inside a podman container you appear to be root but you are running as your own host user id. When you write to any host mounted files you will be doing so with your host user permissions. In a docker container any host files written will be owned by the user id that the container is running as.
6+
The primary difference is that `podman` does not require root access and `docker` does. When inside a `podman` container you appear to be root but you are running as your own host user id. When you write to any host mounted files you will be doing so with your host user permissions. In a docker container any host files written will be owned by the user id that the container is running as.
77

88
Therefore:
9-
- It is better not to run docker containers as root.
10-
- It is easiest to run podman containers as root for simplicity.
9+
- It is better not to run `docker` containers as root.
10+
- It is easiest to run `podman` containers as root for simplicity.
1111

1212
We do fully support `docker`, please report any issues you find.
1313

docs/reference/environment.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ be adjusted to suit your domain. The variables are as follows:
3939
need to create a namespace for your domain. This is the name you should
4040
use here. If you are not using Kubernetes then you can leave this as
4141
`EC_K8S_NAMESPACE=local` and this will deploy IOC Instances to the local server's
42-
docker or podman instance.
42+
docker or docker instance.
4343

4444
- **EC_SERVICES_REPO**: this is a link back to the repository that defines this
4545
domain. For example the bl38p reference beamline repository uses

docs/tutorials/create_ioc.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -364,12 +364,12 @@ shared for easy debugging of IOC Instances.
364364

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

370370
```bash
371-
podman cp bl01t-ea-test-02:/epics/runtime/st.cmd services/bl01t-ea-test-02/config
372-
podman cp bl01t-ea-test-02:/epics/runtime/ioc.subst services/bl01t-ea-test-02/config/ioc.subst
371+
docker cp bl01t-ea-test-02:/epics/runtime/st.cmd services/bl01t-ea-test-02/config
372+
docker cp bl01t-ea-test-02:/epics/runtime/ioc.subst services/bl01t-ea-test-02/config/ioc.subst
373373
# no longer need an ibek ioc yaml file
374374
rm services/bl01t-ea-test-02/config/ioc.yaml
375375
```
@@ -388,7 +388,7 @@ ec deploy-local services/bl01t-ea-test-02
388388
```
389389

390390
:::{note}
391-
We used some raw podman / docker commands in the above script. If you
391+
We used some raw docker / docker commands in the above script. If you
392392
want to know what commands `ec` is running under the hood then you can
393393
use the `-v` option to see them.
394394

docs/tutorials/debug_generic_ioc.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ STEP 15/19: RUN StreamDevice/install.sh 2.8.24
7272
```
7373

7474
- copy the hash of the step you want to debug e.g. `631291db1751` in this case
75-
- podman run -it --entrypoint /bin/bash 631291db1751 # (the hash you copied)
75+
- docker run -it --entrypoint /bin/bash 631291db1751 # (the hash you copied)
7676

7777
Now we have a prompt inside the part-built container and can retry the failed
7878
command.

docs/tutorials/deploy_example.md

Lines changed: 16 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -2,15 +2,9 @@
22

33
## Introduction
44

5-
This tutorial will show you how to deploy and manage the example IOC Instance
6-
that came with the template beamline repository.
7-
You will need to have your own `bl01t` beamline repository
8-
from the previous tutorial.
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.
96

10-
For these early tutorials we are not using Kubernetes and instead are deploying
11-
IOCs to the local docker or podman instance. So for these tutorials we
12-
shall pretend that your workstation is one of the IOC servers on the fictitious
13-
beamline `BL01T`.
7+
For these early tutorials we are not using Kubernetes and instead are deploying IOCs to the local docker or docker 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.
148

159
## Continuous Integration
1610

@@ -43,7 +37,19 @@ For the moment just check that your CI passed and if not review that you
4337
have followed the instructions in the previous tutorial correctly.
4438

4539
(setup-beamline-bl01t)=
46-
## Set up Environment for BL01T Beamline
40+
## Set up Environment for the t01 Beamline
41+
42+
It is much easier to investigate the commands available to you with command line completion enabled. You need only do the following steps once to permanently enable this feature.
43+
44+
```bash
45+
# these steps will make cli completion work for bash
46+
mkdir -p ~/.local/share/bash-completion/completions
47+
docker completion bash > ~/.local/share/bash-completion/completions/docker
48+
49+
# these steps will make cli completion work for zsh
50+
mkdir -p ~/.oh-my-zsh/completions
51+
docker completion zsh > ~/.oh-my-zsh/completions/_docker
52+
```
4753

4854
The standard way to set up your environment for any ec services repository is to get the environment.sh script from the domain repository and source it.
4955

@@ -53,30 +59,9 @@ First make sure you have the local binaries folder in your path by adding
5359
the following to the end of your `$HOME/.bash_profile` file:
5460

5561
```bash
56-
export PATH="$PATH:~/.local/bin"
62+
source ./environment.sh
5763
```
5864

59-
Then follow these steps (make sure you insert your GitHub account name
60-
where indicated):
61-
62-
```bash
63-
# make sure we have the path setup from the bash_profile
64-
source ~/.bash_profile
65-
66-
mkdir -p ~/.local/bin
67-
# make a copy of the environment.sh script named after the beamline
68-
cp environment.sh ~/.local/bin/bl01t
69-
source bl01t
70-
```
71-
72-
Once you have done this and logged out and back in again to pick up your new
73-
profile you should be able to enable the `bl01t` environment as follows:
74-
75-
```bash
76-
# first make sure you have loaded your virtual environment for the ec tool
77-
source $HOME/ec-venv/bin/activate # DLS users don't need this step
78-
source bl01t
79-
```
8065

8166
(deploy-example-instance)=
8267
## Deploy the Example IOC Instance

docs/tutorials/dev_container.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ DLS Users and Redhat Users:
107107

108108
There is a
109109
[bug in VSCode devcontainers extension](https://github.com/microsoft/vscode-remote-release/issues/8557)
110-
at the time of writing that makes it incompatible with podman and an SELinux
110+
at the time of writing that makes it incompatible with docker and an SELinux
111111
enabled /tmp directory. This will affect most Redhat users and you will see an
112112
error regarding permissions on the /tmp folder when VSCode is building your
113113
devcontainer.
@@ -270,7 +270,7 @@ and git will complain about ownership. You can cancel out of these errors
270270
as you should not edit project folders inside of `/epics` - they were
271271
built by the container and should be considered immutable. We will learn
272272
how to work on support modules in later tutorials. This error should only
273-
be seen on first launch. podman users will have no such problem because they
273+
be seen on first launch. docker users will have no such problem because they
274274
will be root inside the container and root built the container.
275275

276276
To mitigate this problem you can tell vscode not to look for git repos in subfolders, see [](scm_settings).

0 commit comments

Comments
 (0)