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/setup_workstation.md
+47-34Lines changed: 47 additions & 34 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -5,9 +5,9 @@ in readiness for the remaining tutorials.
5
5
The tools you need to install are:
6
6
7
7
- Visual Studio Code
8
-
- a container platform, either docker or podman
9
-
- Python 3.11 or later + a Python virtual environment
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)
8
+
- a container platform, either docker or podman and docker-compose
9
+
- Python 3.10 or later + a Python virtual environment
10
+
- git client for version control (Configured for the current user, with read-write access for Repository Contents and Workflows.)
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,
Username for `https://github.com': <ENTER YOUR USERNAME>
24
24
Password for `https://<YOUR USERNAME>@github.com': <ENTER YOUR PAT>
25
25
```
26
+
27
+
When using Personal Access Tokens, replace `[email protected]:` with `https://github.com/` throughout these tutorials.
26
28
:::
27
29
28
30
@@ -39,13 +41,43 @@ See these how-to pages for more information:
39
41
40
42
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.
41
43
42
-
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.
44
+
Whatever your platform, if you can install virtualbox, then you can work using the applicance we provide.
43
45
44
-
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.
46
+
In all cases you will need an internet connection to download the software and the container images. (if you are at DLS you do not need access to DLS network resources, only the internet).
47
+
48
+
| Platform | Requirements |
49
+
|----------|--------------|
50
+
| Any Linux | admin rights only: go to {ref}`installation-steps`|
51
+
| Windows | Virtualbox: go to {ref}`appliance`|
52
+
| Mac x86 | Virtualbox: go to {ref}`appliance`|
53
+
| Mac M1 | ?? |
54
+
| DLS RHEL 8 | go to {ref}`installation-steps`|
55
+
56
+
57
+
(appliance)=
58
+
## VirtualBox Appliance
59
+
60
+
If you already have a linux distribution with admin permissions then go to {ref}`installation-steps` below.
61
+
62
+
63
+
::: {important}
64
+
For some tutorials you will need write access to a project in your personal github. We recommend using the PAT method described in the 1st section above.
65
+
:::
66
+
67
+
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.
68
+
69
+
First install [VirtualBox](https://www.virtualbox.org/wiki/Downloads) and then download the [Virtual Machine](https://drive.google.com/file/d/1AZ1ptVqTV4-YjCsNKQXdjOkA-d77hWp7/view?usp=sharing). The downloaded file is an OVA file which can be imported into VirtualBox using ``File->Import Appliance ...``
70
+
71
+
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. We recommend 8GB of RAM and 4 CPUs for the VM but more is better for the developer container tutorials!
72
+
73
+
When the appliance is started you can log in as `ec-demo` with password `demo1`.
74
+
75
+
Now jump to {ref}`cli-completion` below.
45
76
46
-
## Installation Steps
47
77
48
-
If you are using the Virtual Machine, then you can skip to "Setup virtual environment", because the first three requirements are already installed.
78
+
79
+
(installation-steps)=
80
+
## Installation Steps
49
81
50
82
If you are using your own Linux machine then follow all the steps below to install the required software.
51
83
@@ -65,9 +97,6 @@ useful for working with epics-containers. You will need to install the *Required
65
97
extensions before proceeding to the next tutorial. See the links for instructions
66
98
on how to do this.
67
99
68
-
The recommended extensions will be installed for you when you launch the
69
-
devcontainer in the next tutorial.
70
-
71
100
- Required: [Remote Development]
72
101
- Required for Windows: [VSCode WSL2] (see [How to use WSL2 and Visual Studio Code])
73
102
- Recommended: [VSCode EPICS]
@@ -78,7 +107,7 @@ devcontainer in the next tutorial.
78
107
:::{Note}
79
108
**DLS Users**: RHEL 8 Workstations at DLS have podman 4.9.4 installed by default. RHEL 7 Workstations are not supported.
80
109
81
-
If this is the first time you have used podman OR you are using a DLS Redhat laptop then you must perform the following steps:
110
+
If this is the first time you have used podman **OR you are using a DLS Redhat laptop** then you must perform the following steps:
82
111
83
112
```bash
84
113
# setup the podman config folders in your home directory
@@ -119,7 +148,7 @@ in your `.bashrc` file.
119
148
120
149
`docker` users should also take a look at this page: [](../reference/docker.md) which describes a couple of extra steps that are required to make docker work in developer containers.
121
150
122
-
151
+
(cli-completion)=
123
152
### Command Line Completion
124
153
125
154
This is an optional step to set up CLI completion for docker or podman.
@@ -152,8 +181,8 @@ Go ahead and install Python 3.11 or later.
152
181
There are instructions for installing Python on all platforms here:
Once you have python, set up a virtual environment for your epics-containers
159
188
work. In the examples we will use `$HOME/ec-venv` as the virtual environment
@@ -164,39 +193,23 @@ but you can choose any folder.
164
193
:::
165
194
166
195
```bash
167
-
python -m venv $HOME/ec-venv
196
+
python3 -m venv $HOME/ec-venv
168
197
source$HOME/ec-venv/bin/activate
169
-
python -m pip install --upgrade pip
198
+
python3 -m pip install --upgrade pip
170
199
```
171
200
172
-
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).
201
+
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 `PATH=$HOME/ec-venv/bin:$PATH` in your .bashrc).
173
202
174
203
(ec)=
175
204
176
-
### edge-containers-cli and copier
177
-
178
-
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.
205
+
### copier
179
206
180
-
We also take this opportunity to install `copier` which is used to copy the templates for the services repositories and generic IOCs.
207
+
Above we set up a python virtual environment. Now we will install `copier` which is used to copy the templates for the services repositories and generic IOCs.
181
208
182
209
```bash
183
-
pip install edge-containers-cli
184
210
pip install copier
185
211
```
186
212
187
-
See {any}`CLI` for more details.
188
-
189
-
:::{note}
190
-
DLS Users: `ec` is already installed for you on `dls_sw` just do the following to make sure it is always available:
0 commit comments