Skip to content

Commit a76644e

Browse files
authored
uenv 8.1 docs (#125)
1 parent fced282 commit a76644e

File tree

10 files changed

+566
-142
lines changed

10 files changed

+566
-142
lines changed

docs/alps/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,9 +19,9 @@ Additionally, network segregation ensures secure and isolated communication, wit
1919

2020
- :fontawesome-solid-signs-post: __Clusters__
2121

22-
The resources on Alps are partitioned and configured into versatile software defined clusters (vClusters).
22+
The resources on Alps are partitioned and configured into versatile software defined clusters.
2323

24-
[:octicons-arrow-right-24: Alps vClusters][ref-alps-clusters]
24+
[:octicons-arrow-right-24: Alps Clusters][ref-alps-clusters]
2525

2626
- :fontawesome-solid-signs-post: __Hardware__
2727

docs/clusters/daint.md

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -160,13 +160,7 @@ Daint can also be accessed using [FirecREST][ref-firecrest] at the `https://api.
160160

161161
!!! change "2025-04-30"
162162
??? note "uenv is updated from v7.0.1 to v8.1.0"
163-
* improved uenv view management
164-
* automatic generation of default uenv repository the first time uenv is called
165-
* configuration files
166-
* bash completion
167-
* relative paths can be used for referring to squashfs images
168-
* support for `SLURM_UENV` and `SLURM_UENV_VIEW` environment variables (useful for using inside CI/CD pipelines)
169-
* better error messages and small bug fixes
163+
[Release notes][ref-uenv-release-notes-v8.1.0]
170164

171165
??? note "Pyxis is upgraded from v24.5.0 to v24.5.3"
172166
* Added image caching for Enroot

docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -125,7 +125,7 @@ If you cannot find the information that you need in the documentation, help is a
125125

126126
Find out how to use uenv and containers to access software
127127

128-
[:octicons-arrow-right-24: uenv](software/uenv.md)
128+
[:octicons-arrow-right-24: uenv][ref-uenv]
129129

130130
[:octicons-arrow-right-24: Container engine](software/container-engine.md)
131131

docs/software/uenv/build.md

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
[](){#ref-uenv-build}
2+
# Building uenv
3+
4+
## uenv build service
5+
6+
CSCS provides a build service for uenv that takes as its input a uenv recipe, and builds the uenv using the same pipeline used to build the officially supported uenv.
7+
8+
The command takes two arguments:
9+
10+
```
11+
uenv build <recipe> <label>
12+
```
13+
14+
* `recipe`: the path to the recipe
15+
* A uenv recipe is a description of the software to build in the uenv.
16+
See the [stackinator documentation](https://eth-cscs.github.io/stackinator/recipes/) for more information.
17+
* `label`: the label to attach, of the form `name/version@system%uarch` where:
18+
* `name` is the name, e.g. `prgenv-gnu`, `gromacs`, `vistools`.
19+
* `version` is a version string, e.g. `24.11`, `v1.2`, `2025-rc2`
20+
* `system` is the CSCS cluster to build on (e.g. `daint`, `santis`, `clariden`, `eiger`)
21+
* `uarch` is the [micro-architecture][ref-uenv-label-uarch].
22+
23+
!!! example "Building a uenv"
24+
The image will be built on `daint` for the `gh200` node type.
25+
```bash
26+
uenv build $SCRATCH/recipes/myapp myapp/v3@daint%gh200
27+
```
28+
29+
The output of the above command will print a url that links to a status page, for you to follow the progress of the build.
30+
After a successful build, the uenv can be pulled using an address from the status page:
31+
32+
```bash
33+
uenv image pull service::myapp/v3:1669479716
34+
```
35+
36+
Note that the image is given a unique numeric tag, provided on the status page for the build.
37+
38+
!!! info
39+
To use an existing uenv recipe as the starting point for a custom recipe, `uenv start` the uenv and take the contents of the `meta/recipe` path in the mounted image (this is the recipe that was used to build the uenv).
40+
41+
All uenv built by `uenv build` are pushed into the `service` namespace, where they **can be accessed by all users logged in to CSCS**.
42+
This makes it easy to share your uenv with other users, by giving them the name, version and tag of the image.
43+
44+
!!! danger
45+
**If, for whatever reason, your uenv can not be made publicly available, do not use the build service.**
46+
47+
!!! example "Search user-built uenv"
48+
To view all of the uenv on daint that have been built by the service:
49+
```
50+
uenv image find service::@daint
51+
```
52+
53+
## Building with Stackinator
54+
55+
CSCS develops and maintains the [Stackinator](https://eth-cscs.github.io/stackinator) tool that is used to configure and build uenv.
56+
57+
!!! note
58+
The tool is currently maintained for internal use, and is used by automated pipelines, including the one used by the `uenv build` command.
59+
As such, CSCS provide limited support for the tool.

docs/software/uenv/configure.md

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
[](){#ref-uenv-configure}
2+
# Configuring uenv
3+
4+
Uenv is designed to work out of the box, with zero configuration for most users.
5+
There is support for limited per-user configuration via a configuration file, which will be expanded as we add features that make it easier for groups and communities to manage their own environments.
6+
7+
## User configuration
8+
9+
Uenv is configured using a text configuration file.
10+
11+
The location of the configuration file follows the [XDG base directory specification](https://specifications.freedesktop.org/basedir-spec/latest/), with the location defined as follows:
12+
13+
* If the `XDG_CONFIG_HOME` environment variable is set, use `$XDG_CONFIG_HOME/uenv/config`.
14+
* Otherwise use the default location `$HOME/.config/uenv/config`.
15+
16+
### Syntax
17+
18+
The configuration file uses a simple `key = value` syntax, with comments starting with `#`:
19+
20+
```ini
21+
# this is a comment
22+
23+
# the following are equivalent
24+
color = true
25+
color=true
26+
```
27+
28+
Notes on the syntax:
29+
30+
* keys are case-sensitive: `color` and `Color` are not equivalent.
31+
* all keys are lower case
32+
* white space is trimmed from keys and values, e.g.: `color = true` will be parsed as `key='color'` and `value='true'`.
33+
34+
### Options
35+
36+
| key | description | default | values |
37+
| --- | ----------- | -------- | ------ |
38+
| [`color`][ref-uenv-configure-options-color] | Use color output | automatically chosen according to environment | `true`, `false` |
39+
| [`repo`][ref-uenv-configure-options-repo] | The default repo location for downloaded uenv images | `$SCRATCH/.uenv-images` | An absolute path |
40+
41+
[](){#ref-uenv-configure-options-color}
42+
#### `color`
43+
44+
By default, uenv will generate color output according to the following:
45+
46+
* if `--no-color` is passed, color output is disabled
47+
* else if `color` is set in the config file, use that setting
48+
* else if the `NO_COLOR` environment variable is defined color output is disabled
49+
* else if the terminal is not TTY disable color
50+
* else enable color output
51+
52+
[](){#ref-uenv-configure-options-repo}
53+
#### `repo`
54+
55+
The default repo location for downloaded uenv images.
56+
The repo is selected according to the following process:
57+
58+
* if the `--repo` CLI arguement overrides
59+
* else if `color` is set in the config file, use that setting
60+
* else use the default value of `$SCRATCH/.uenv-images`

docs/software/uenv/deploy.md

Lines changed: 235 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,235 @@
1+
[](){#ref-uenv-deploy}
2+
# Deploying uenv
3+
4+
[](){#ref-uenv-deploy-versions}
5+
## Versioning and Labeling
6+
7+
Uenv images have a **label** of the following form:
8+
9+
```
10+
name/version:tag@system%uarch
11+
```
12+
13+
for example:
14+
15+
```
16+
prgenv-gnu/24.11:v2@todi%gh200
17+
```
18+
19+
### uenv name
20+
21+
The name of the uenv. In this case `prgenv-gnu`.
22+
23+
### uenv version
24+
25+
The version of the uenv.
26+
27+
The format of `version` depends on the specific uenv.
28+
Often they use the `yy.mm` format, though they may also use the version of the software being packaged.
29+
For example the [`namd/3.0`][ref-uenv-namd] uenv packages version 3.0 of the popular [NAMD](https://www.ks.uiuc.edu/Research/namd/) simulation tool.
30+
31+
### uenv tag
32+
33+
Used to differentiate between _releases_ of a versioned uenv.
34+
Some examples of tags include:
35+
36+
* `rc1`, `rc2`: release candidates;
37+
* `v1`: a first release typically made after some release candidates;
38+
* `v2`: a second release, that fixes issues in `v1`
39+
40+
### uenv system
41+
42+
The name of the [Alps cluster][ref-alps-clusters] for which the uenv was built.
43+
44+
[](){#ref-uenv-label-uarch}
45+
### uenv uarch
46+
47+
The node type (microarchitecture) that the uenv is built for.
48+
49+
| uarch | CPU | GPU | comment |
50+
| ----- | --- | --- | ------ |
51+
|[gh200][ref-alps-gh200-node]| 4 72-core NVIDIA Grace (`aarch64`) | 4 NVIDIA H100 GPUs | |
52+
|[zen2][ref-alps-zen2-node] | 2 64-core AMD Rome (`zen2`) | - | used in Eiger|
53+
|[a100][ref-alps-a100-node] | 1 64-core AMD Milan (`zen3`) | 4 NVIDIA A100 GPUs | |
54+
|[mi200][ref-alps-mi200-node]| 1 64-core AMD Milan (`zen3`) | 4 AMD Mi250x GPUs | |
55+
|[mi300][ref-alps-mi300-node]| 4 24-core AMD Genoa (`zen4`) | 4 AMD Mi300 GPUs | |
56+
| zen3 | 2 64-core AMD Milan (`zen3`) | - | only in MCH system |
57+
58+
## Registries
59+
60+
The following naming scheme is employed in the OCI container artifactory for uenv images:
61+
62+
```text
63+
namespace/system/uarch/name/version:tag
64+
```
65+
66+
Where the fields `system`, `uarch`, `name`, `version` and `tag` are defined above.
67+
68+
The `namespace` is one of:
69+
70+
* `build`: where the CI/CD pipeline pushes uenv images.
71+
* `deploy`: where uenv images are copied by CSCS staff when they are officially provided to users.
72+
* `service`: where the uenv [build service][ref-uenv-build] pushes images.
73+
74+
!!! info "JFrog uenv registry"
75+
The OCI container registry used to host uenv is on JFrog, and can be browsed at [jfrog.svc.cscs.ch/artifactory/uenv/](https://jfrog.svc.cscs.ch/artifactory/uenv/) (you may have to log in with CSCS credentials from the a VPN/CSCS network).
76+
77+
The address of individual uenv images is of the form
78+
```
79+
https://jfrog.svc.cscs.ch/uenv/namespace/system/uarch/name/version:tag
80+
```
81+
For example:
82+
```
83+
https://jfrog.svc.cscs.ch/uenv/deploy/eiger/zen2/cp2k:2024.1
84+
```
85+
86+
## uenv recipes and definitions
87+
88+
The uenv recipes are maintained in a public GitHub repository: [eth-cscs/alps-uenv](https://github.com/eth-cscs/alps-uenv).
89+
90+
The recipes for each uenv version are stored in the `recipes` subdirectory.
91+
Specific uenv recipes are stored in `recipes/name/version/uarch/`.
92+
93+
The `cluster` is specified when building and deploying the uenv, while the `tag` is specified when deploying the uenv.
94+
95+
## uenv Deployment
96+
97+
### Deployment Rules
98+
99+
A recipe can be built for deployment on different vClusters, and for multiple targets.
100+
For example:
101+
102+
* A multicore recipe could be built for `zen2` or `zen3` nodes
103+
* A GROMACS recipe that is tuned for A100 GPUs can be built and deployed on any vCluster supporting the A100 architecture
104+
105+
However, it is not desirable to build every recipe on every possible target system.
106+
For example:
107+
108+
* An ICON development environment would only be deployed on the weather and climate platform
109+
* A GROMACS recipe would not be deployed on the weather and climate platrofm
110+
* Development builds only need to run on test and staging clusters
111+
112+
A YAML file `config.yaml` is maintained in the [github.com/eth-cscs/alps-uenv](https://github.com/eth-cscs/alps-uenv/blob/main/config.yaml) repository that maps
113+
recipes to deployed versions on mucroarchitectures.
114+
115+
### Permissions
116+
117+
!!! note "For CSCS staff"
118+
This information applies only to CSCS staff.
119+
120+
Deployment and deletion of uenv requires elevated permissions.
121+
Before you can modify the uenv registry, you need to set up credentials.
122+
123+
* Your CSCS username needs to be added to the `uenv-admin` group on JFrog, and
124+
* you need to generate a new token for the [JFrog](https://jfrog.svc.cscs.ch) registry.
125+
126+
Once you have the token, you can save it in a file.
127+
128+
!!! danger
129+
130+
Save the token file somwhere safe, for example in `~/.ssh/jfrog-token`.
131+
132+
133+
The token file can be passed to the `uenv` command line tool using the `--token` option.
134+
135+
```bash
136+
uenv image copy --token=${HOME}/.ssh/jfrog-token <SOURCE> <DESTINATION>
137+
```
138+
139+
### Deploying a uenv
140+
141+
!!! note "For CSCS staff"
142+
This information applies only to CSCS staff.
143+
144+
The CI/CD pipeline for [eth-cscs/alps-uenv](https://github.com/eth-cscs/alps-uenv) pushes images to the JFrog uenv registry in the `build::` namespace.
145+
146+
Deploying a uenv copies the uenv image from the `build::` namespace to the `deploy::` namespace. The Squashfs image itself is not copied;
147+
a new tag for the uenv is created in the `deploy::` namespace.
148+
149+
The deployment is performed using the `uenv` command line tool, as demonstrated below:
150+
151+
```bash
152+
uenv image copy build::<SOURCE> deploy::<DESTINATION> # (1)!
153+
```
154+
155+
1. `<DESTINATION>` must be fully qualified.
156+
157+
!!! example "Deploy Using Image ID"
158+
159+
Deploy a uenv from `build::` using the ID of the image:
160+
161+
```bash
162+
uenv image copy build::d2afc254383cef20 deploy::prgenv-nvfortran/24.11:v1@daint%gh200
163+
```
164+
165+
!!! example "Deploy Using Qualified Name"
166+
167+
Deploy a uenv using the qualified name:
168+
169+
```
170+
uenv image copy build::quantumespresso/v7.4:1653244229 deploy::quantumespresso/v7.4:v1@daint%gh200
171+
```
172+
173+
!!! note
174+
175+
The build image uses the CI/CD pipeline ID as the tag. You will need to choose an appropriate tag.
176+
177+
!!! example "Deploy a uenv from One vCluster to Another"
178+
179+
You can also deploy a uenv from one vCluster to another.
180+
For example, if the `uenv` for `prgenv-gnu` has been deployed on `daint`,
181+
to make it available on `santis`, you can use the following command:
182+
183+
```bash
184+
uenv image copy deploy::prgenv-gnu/24.11:v1@daint%gh200 deploy::prgenv-gny/24.11@santis%gh200
185+
```
186+
187+
### Removing a uenv
188+
189+
To remove a uenv, you can use the `uenv` command line tool:
190+
191+
```bash
192+
uenv image delete --token=${HOME}/.ssh/jfrog-token deploy::<IMAGE>
193+
```
194+
195+
!!! danger
196+
197+
Removing a uenv is disruptive.
198+
Please have a look at out [uenv removal policy][ref-uenv-removal] for more information.
199+
200+
## Source code access
201+
202+
Some source artifacts are stored in JFrog, including:
203+
204+
* source code for software that can't be downloaded directly from the internet directly;
205+
* and tar balls for custom software.
206+
207+
These artifacts are stored in a JFrog "generic repository" [uenv-sources].
208+
209+
Each software package has a sub-directory and all image paths are lower case (e.g. `uenv-sources/namd`).
210+
211+
By default, all packages in [uenv-sources] are anonymous read access
212+
to enable users to build uenv on vClusters without configuring access tokens.
213+
However,
214+
215+
* access to some packages is restricted by applying access rules to the package path
216+
* e.g. access to `uenv-sources/vasp` is restricted to members of the vasp6 group
217+
218+
Permissons to acces restricted resources is set on a per-pipeline basis
219+
220+
* For example, only the `alps-uenv` pipeline has access to the VASP source code, while the [`uenv build`][ref-uenv-build] pipeline does not.
221+
222+
| Package | Access | Path | Notes | Contact |
223+
|---------|--------|------|-------| ------- |
224+
| `cray-mpich` | anonymous | `uenv-sources/cray-mpich` | `cray-mpich`, `cray-gtl`, `cray-pals`, `cray-mpi` | Simon Pintarelli, Benjamin Comming|
225+
| `namd` | `uenv-sources-csstaff` | `uenv-sources/namd` | NAMD requires an account to download the source code | Rocco Meli |
226+
| `vasp` | `vasp6`, `cscs-uenv-admin` | `uenv-sources/vasp` | VASP requires a paid license to access source | Simon Frasch |
227+
| `vmd` | `uenv-sources-csstaff` | `uenv-sources/vmd` | VMD requires an account to download the source code | Alberto Invernizzi |
228+
229+
[](){#ref-uenv-removal}
230+
## Deprecation and removal of uenv
231+
232+
!!! todo "Finalise and document the deprecation process"
233+
234+
235+
[uenv-sources]: https://jfrog.svc.cscs.ch/artifactory/uenv-sources/

0 commit comments

Comments
 (0)