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/how-to/own_tools.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
@@ -17,6 +17,6 @@ epics-containers has been tested with
17
17
- vscode
18
18
- Github Codespaces
19
19
20
-
If you prefer console based editors like vim or emacs, then you will get the best results by launching the development containers defined in the epics-containers using the devcontainer CLI as described here <https://containers.dev/supporting#devcontainer-cli>.
20
+
If you prefer console based editors like neovim or emacs, then you will get the best results by launching the development containers defined in the epics-containers using the devcontainer CLI as described here <https://containers.dev/supporting#devcontainer-cli>.
21
21
22
22
In addition you could install your editor inside the developer container by adding an apt-install command into the `epics-containers` user personalization file. See [details here](https://github.com/epics-containers/epics-containers.github.io/blob/3a87e808e1c7983430a30c5a4dcd0d0661895d60/.devcontainer/postCreateCommand#L23-L27)
Copy file name to clipboardExpand all lines: docs/reference/cli.md
+3-3Lines changed: 3 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -2,18 +2,18 @@
2
2
3
3
# Command Line Interface for IOC Management
4
4
5
-
The python project {any}`edge-containers-cli` is installed as part of the Python section of the initial tutorial {any}`../tutorials/setup_workstation`. It provides a command line function `ec` with support for:
5
+
The python project {any}`edge-containers-cli` is installed as part of the Python section of the initial tutorial {any}`../tutorials/setup_workstation`. It provides a command line function `ec` with support for managing and monitoring IOC instances.
6
6
7
-
-deploying, managing and monitoring IOC and service instances
7
+
This tool is only required if you are deploying to Kubernetes. Docker compose provides a very similar set of commands for local deployment. Also note that `ec` supports both ArgoCD and pure Helm deployments. The tutorials will use ArgoCD, for information on Helm based deployments see {any}`helm` .
8
8
9
9
The CLI is just a thin wrapper around the underlying tools that do the real work:
10
10
11
11
```{eval-rst}
12
12
13
13
:kubectl: the command line interface to the Kubernetes APIs
14
14
:helm: the command line interface to the Kubernetes Helm package manager
15
-
:podman/docker: CLIs for container engines
16
15
:git: the git version control system client
16
+
:argocd: the ArgoCD command line interface
17
17
```
18
18
19
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`.
Copy file name to clipboardExpand all lines: docs/reference/docker.md
+8-2Lines changed: 8 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -3,6 +3,12 @@ Working with Docker
3
3
4
4
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.
5
5
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.
7
+
8
+
Therefore:
9
+
- It is better not to run docker containers as root.
10
+
- It is easiest to run podman containers as root for simplicity.
11
+
6
12
We do fully support `docker`, please report any issues you find.
7
13
8
14
There are a few things to know if you are using `docker` in your developer containers:
@@ -12,7 +18,7 @@ There are a few things to know if you are using `docker` in your developer conta
1. you can use `sudo`if you are having permissions issues. In particular the following will reset permissions on a folder:
21
+
1. you can use `sudo`if you are having permissions issues. In particular the following will reset permissions on all of the epics files inside the container filesystem:
Copy file name to clipboardExpand all lines: docs/reference/glossary.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
@@ -16,7 +16,7 @@ epics-containers supports two kinds of services repositories:
16
16
17
17
A Python command line tool for the developer that runs *outside* of containers. It provides simple features for and monitoring and managing and IOC instances within a [](services-repo).
18
18
19
-
So named 'edge' containers because these services all run close to the hardware. Uses the command line entry point `ec`.
19
+
So named 'edge' containers because these services all run close to the hardware. Uses the command line entry point `ec`. See {any}`cli` for more details.
At DLS we use helm charts in our services repos to describe our IOC instances. However we use ArgoCD continuous deployment to deploy them. ArgoCD is a Kubernetes native tool that knows how to keep a set of Helm charts in a git repository in sync with a set of Kubernetes resources.
5
+
6
+
You are not required to use ArgoCD, you can use Helm directly if you prefer. This page discusses how to use the command line tool `ec` to deploy and manage IOC instances using Helm directly. `ec` adds some useful version management features to the workflow that to some extent replicates ArgoCD's ability to track versions.
7
+
8
+
### TODO this is WIP
9
+
10
+
If you set the `EC_CLI_BACKEND` environment variable to `K8S` then `ec` will use Helm directly to deploy and manage IOC instances. You can get a feel for the commands available with `ec --help`.
Copy file name to clipboardExpand all lines: docs/tutorials/setup_workstation.md
+22-48Lines changed: 22 additions & 48 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -24,16 +24,18 @@ See these how-to pages for more information:
24
24
25
25
## Platform Support
26
26
27
-
epics-containers can use Linux, Windows or MacOS as the host operating system for
28
-
the developer workstation.
27
+
The containers used in the tutorials are x86_64 Linux. The best way to experience the tutorials is to use an Intel Linux workstation or laptop. arm64 container images have been tested but are not yet widely used in the available images.
29
28
30
-
If you are using Windows then you must first
31
-
install WSL2 and then work within the Linux subsystem. see
32
-
[WSL2 installation instructions].
33
-
Ubuntu is recommended as the Linux distribution for WSL2.
29
+
If you are using a Mac or Windows then the simplest approach is to use the Linux Virtual Machine with pre-installed software that we provide. First install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and then download the [Virtual Machine](https://drive.google.com/file/d/1ejJjiVDcODkiJsTShkCclQyod02f4Tex/view?usp=drive_link) TODO: currently hosted on giles Google Drive - find a better hosting solution. The downloaded file is an OVA file which can be imported into VirtualBox using ``File->Import Appliance ...``. During the import process you will be able to modify the resources that the VM uses, the defaults are recommended, but you may decrease them if your host machine has limited resources.
30
+
31
+
If you are using Windows you could instead install WSL2 and then work within the Linux subsystem. see [WSL2 installation instructions]. Ubuntu is recommended as the Linux distribution for WSL2. This has not been tested with the tutorials recently so the VM above is the preferred option.
34
32
35
33
## Installation Steps
36
34
35
+
If you are using the Virtual Machine, then you can skip to "Setup virtual environment", because the first three requirements are already installed.
36
+
37
+
If you are using your own Linux machine then follow all the steps below to install the required software.
38
+
37
39
### Setup VSCode
38
40
39
41
:::{Note}
@@ -61,7 +63,7 @@ devcontainer in the next tutorial.
61
63
### Setup Docker or Podman
62
64
63
65
:::{Note}
64
-
**DLS Users**: RHEL 8 Workstations at DLS have podman 4.6.1 installed by default.
66
+
**DLS Users**: RHEL 8 Workstations at DLS have podman 4.9.4 installed by default.
65
67
RHEL 7 Workstations are not supported.
66
68
:::
67
69
@@ -70,21 +72,15 @@ has been tested with podman 4.4.1 and higher on RedHat 8, and Docker 24.0.5 and
70
72
71
73
If you are using docker, simply replace `podman` with `docker` in the commands listed in these tutorials. `docker` users should also take a look at this page: [](../reference/docker.md)
72
74
73
-
The podman version required is 4.0 or later. Any version of docker since 20.10
74
-
will also work. Pick the tool that has the most recent version for your platform.
75
-
RedHat 8 and above have recent podman versions. Debian platforms don't yet
76
-
have recent podman versions available. If you have a choice then podman is
77
-
preferred because it does not require root access and it is the tool with
78
-
which epics-containers has had the most testing.
75
+
The podman version required is 4.0 or later. Any version of docker since 20.10 will also work. Pick the tool that has the most recent version for your platform. RedHat 8 and above have recent podman versions. Older Debian platforms don't yet
76
+
have recent podman versions available. If you have a choice then podman is slightly preferred because it does not require root access and it is the tool with which epics-containers has had the most testing. However, docker is the most widely used container platform and is also well supported.
79
77
80
78
The links below have details of how to install your choice of container platform:
81
79
82
80
-[Install docker]
83
81
-[Install podman]
84
82
85
-
The docker install page encourages you to install Docker Desktop. This is a paid
86
-
for product and is not required for this tutorial. You can install the free linux
87
-
CLI tools by clicking on the appropriate linux distribution link.
83
+
The docker install page encourages you to install Docker Desktop. This is a paid for product and is not required for this tutorial. You can install the free linux CLI tools by clicking on the appropriate linux distribution link.
88
84
89
85
(python-setup)=
90
86
@@ -94,16 +90,15 @@ CLI tools by clicking on the appropriate linux distribution link.
94
90
**DLS Users**: for this step just use `module load python/3.11`
95
91
:::
96
92
97
-
Go ahead and install Python 3.10 or later. 3.11 is recommended as this is the
98
-
highest version that epics-containers has been tested with.
93
+
Go ahead and install Python 3.11 or later.
99
94
100
95
There are instructions for installing Python on all platforms here:
Note that each time you open a new shell you will need to activate the virtual
121
-
environment again. (Or place its bin folder in your path permanently).
115
+
Note that each time you open a new shell you will need to activate the virtual environment again. (Or place its bin folder in your path by adding it in your .bashrc).
122
116
123
117
(ec)=
124
118
125
119
### edge-containers-cli
126
120
127
-
Above we set up a python virtual environment. Now we will install
128
-
the {any}`edge-containers-cli` python tool into that environment.
121
+
Above we set up a python virtual environment. Now we will install the {any}`edge-containers-cli` python tool into that environment. This tool is used to manage the IOC instances in Kubernetes and is only required for the later tutorials.
129
122
130
123
```bash
131
124
pip install edge-containers-cli
132
125
```
133
126
134
-
This is the developer's 'outside of the container' helper tool. The command
135
-
line entry point is `ec`. We will be using many `ec` command line
136
-
functions in the next tutorial.
137
-
138
127
See {any}`CLI` for more details.
139
128
140
129
:::{note}
141
-
DLS Users: `ec` is already installed for you on `dls_sw` just do the
142
-
following to make sure it is always available:
130
+
DLS Users: `ec` is already installed for you on `dls_sw` just do the following to make sure it is always available:
# log out and back in again to make sure the new path is available
148
137
```
149
138
:::
150
139
@@ -161,24 +150,9 @@ You don't need Kubernetes yet.
161
150
The following tutorials will take you through creating, deploying and
162
151
debugging IOC instances, generic IOCs and support modules.
163
152
164
-
For simplicity we don't encourage using Kubernetes at this stage. Instead we
165
-
will deploy containers to the local workstation's docker or podman instance.
166
-
167
-
However, everything in these tutorials would also work with Kubernetes. If you
168
-
are particularly interested in Kubernetes then you can jump to
169
-
{any}`setup-kubernetes` and follow the instructions there. Then come back to this
170
-
point and continue with the tutorials. If you do this just be aware that
171
-
we use the beamline name `bl01t` for local deployment examples and
172
-
`bl46p` for Kubernetes examples so you will need to substitute the
173
-
appropriate beamline name for your environment. All the local deployment
174
-
examples should also deploy to a Kubernetes cluster.
175
-
176
-
If you are planning not to use Kubernetes at all then now might be
177
-
a good time to install an alternative container management platform such
178
-
as [Portainer](https://www.portainer.io/). Such tools will help you
179
-
visualise and manage your local containers. They are not required and you
180
-
could just manage everything from epics-containers command line interface
181
-
if you prefer.
153
+
For simplicity we don't encourage using Kubernetes at this stage. Instead we will deploy containers to the local workstation's docker or podman instance.
154
+
155
+
If you are planning not to use Kubernetes at all then now might be a good time to install an alternative container management platform such as [Portainer](https://www.portainer.io/). Such tools will help you visualise and manage your containers across a number of servers. These are not required and you could just manage everything from the docker compose command line if you prefer.
182
156
183
157
[download visual studio code]: https://code.visualstudio.com/download
184
158
[how to use wsl2 and visual studio code]: https://code.visualstudio.com/blogs/2019/09/03/wsl2
0 commit comments