Skip to content

Commit 4e0001f

Browse files
committed
tidy up workstation setup page
1 parent 2012022 commit 4e0001f

File tree

1 file changed

+47
-34
lines changed

1 file changed

+47
-34
lines changed

docs/tutorials/setup_workstation.md

Lines changed: 47 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ in readiness for the remaining tutorials.
55
The tools you need to install are:
66

77
- 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.)
1111

1212
Visual Studio Code is recommended because it has excellent integration with
1313
devcontainers. It also has useful extensions for working with Kubernetes,
@@ -23,6 +23,8 @@ git config --global credential.helper 'cache --timeout 18000'
2323
Username for `https://github.com': <ENTER YOUR USERNAME>
2424
Password for `https://<YOUR USERNAME>@github.com': <ENTER YOUR PAT>
2525
```
26+
27+
When using Personal Access Tokens, replace `[email protected]:` with `https://github.com/` throughout these tutorials.
2628
:::
2729

2830

@@ -39,13 +41,43 @@ See these how-to pages for more information:
3941

4042
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.
4143

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.
4345

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.
4576

46-
## Installation Steps
4777

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
4981

5082
If you are using your own Linux machine then follow all the steps below to install the required software.
5183

@@ -65,9 +97,6 @@ useful for working with epics-containers. You will need to install the *Required
6597
extensions before proceeding to the next tutorial. See the links for instructions
6698
on how to do this.
6799

68-
The recommended extensions will be installed for you when you launch the
69-
devcontainer in the next tutorial.
70-
71100
- Required: [Remote Development]
72101
- Required for Windows: [VSCode WSL2] (see [How to use WSL2 and Visual Studio Code])
73102
- Recommended: [VSCode EPICS]
@@ -78,7 +107,7 @@ devcontainer in the next tutorial.
78107
:::{Note}
79108
**DLS Users**: RHEL 8 Workstations at DLS have podman 4.9.4 installed by default. RHEL 7 Workstations are not supported.
80109

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:
82111

83112
```bash
84113
# setup the podman config folders in your home directory
@@ -119,7 +148,7 @@ in your `.bashrc` file.
119148

120149
`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.
121150

122-
151+
(cli-completion)=
123152
### Command Line Completion
124153

125154
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.
152181
There are instructions for installing Python on all platforms here:
153182
<https://docs.python-guide.org/starting/installation/>
154183

155-
### Setup virtual environment
156184

185+
### Setup virtual environment
157186

158187
Once you have python, set up a virtual environment for your epics-containers
159188
work. In the examples we will use `$HOME/ec-venv` as the virtual environment
@@ -164,39 +193,23 @@ but you can choose any folder.
164193
:::
165194

166195
```bash
167-
python -m venv $HOME/ec-venv
196+
python3 -m venv $HOME/ec-venv
168197
source $HOME/ec-venv/bin/activate
169-
python -m pip install --upgrade pip
198+
python3 -m pip install --upgrade pip
170199
```
171200

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).
173202

174203
(ec)=
175204

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
179206

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.
181208

182209
```bash
183-
pip install edge-containers-cli
184210
pip install copier
185211
```
186212

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:
191-
192-
```bash
193-
# use the ec version from /dls_sw/work/python3
194-
mkdir -p $HOME/.local/bin
195-
ln -fs /dls_sw/work/python3/ec-venv/bin/ec $HOME/.local/bin/ec
196-
# log out and back in again to make sure the new path is available
197-
```
198-
:::
199-
200213
### Git
201214

202215
If you don't already have git installed see

0 commit comments

Comments
 (0)