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