Skip to content

Commit 9ea50a5

Browse files
committed
[build] Enable insertion of snippets from URL
- Useful for inserting scripts from online git repositories. - Enable `check_paths` to fail on 404 errors.
1 parent 52691ff commit 9ea50a5

2 files changed

Lines changed: 6 additions & 70 deletions

File tree

docs/environment/eessi.md

Lines changed: 4 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -157,82 +157,16 @@ cd Installing-EESSI-in-G5K-nodes
157157

158158
The first column of the output contains the job ID.
159159

160-
!!! info "Installation scripts"
160+
??? info "Installation scripts"
161161

162-
The installation uses a couple of installation scripts. The main script extracts the nodes of the job, and then lunches an installation script to all nodes of the job with cluster shell (`clush`).
162+
The [installation repository](https://github.com/ULHPC/Installing-EESSI-in-G5K-nodes.git) is composed by a couple of installation scripts. The main script extracts the nodes of the job, and then lunches an installation script to all nodes of the job with [cluster shell (`clush`)](/jobs/submit/#clush).
163163

164164
??? info "`install-eessi-in-g5k-job-nodes`"
165165
```bash
166-
#!/usr/bin/bash
167-
168-
set -euo pipefail
169-
170-
declare node_list=""
171-
declare job_id="${1}"
172-
173-
while [ -z "${node_list}" ]; do
174-
node_list=$(oarstat --full --job "${job_id}" | awk 'BEGIN {FS="="} $1 ~ /assigned_hostnames/ {gsub(" ", "", $2); gsub(".luxembourg.grid5000.fr", "", $2); gsub("+", ",", $2); print $2}')
175-
[ -z "${node_list}" ] && sleep 5
176-
done
177-
178-
clush --dshbak -w "${node_list}" "${PWD}/setup-eessi-in-g5k"
166+
--8<-- "https://raw.githubusercontent.com/ULHPC/Installing-EESSI-in-G5K-nodes/refs/heads/main/install-eessi-in-g5k-job-nodes"
179167
```
180168

181169
??? info "`install-eessi-in-g5k`"
182170
```bash
183-
#!/usr/bin/bash
184-
185-
set -euo pipefail
186-
187-
declare DEBIAN_FRONTEND=noninteractive
188-
189-
main() {
190-
sudo-g5k
191-
install_cvmfs
192-
install_eessi
193-
}
194-
195-
install_cvmfs() {
196-
# Install CMFS keys
197-
if [ ! -f /tmp/cvmfs-release-latest_all.deb ]; then
198-
wget --output-document=/tmp/cvmfs-release-latest_all.deb https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest_all.deb
199-
fi
200-
dpkg-deb --raw-extract /tmp/cvmfs-release-latest_all.deb /tmp/cvmfs-release
201-
sudo cp /tmp/cvmfs-release/etc/apt/trusted.gpg.d/cernvm.gpg /etc/apt/trusted.gpg.d/cernvm.gpg
202-
203-
# Add CVMFS sources
204-
sudo cp /tmp/cvmfs-release/usr/share/cvmfs-release/cernvm.list.$(lsb_release --codename | awk '{print $2}') /etc/apt/sources.list.d/cernvm.list
205-
206-
# Install CVMFS
207-
sudo apt --assume-yes update
208-
sudo apt --assume-yes install cvmfs
209-
210-
cleaup_cvmfs_installation_files
211-
}
212-
213-
cleaup_cvmfs_installation_files() {
214-
rm /tmp/cvmfs-release-latest_all.deb
215-
rm -r /tmp/cvmfs-release
216-
}
217-
218-
install_eessi() {
219-
# Install EESSI package
220-
if [ ! -f /tmp/cvmfs-config-eessi_latest_all.deb ]; then
221-
wget --output-document=/tmp/cvmfs-config-eessi_latest_all.deb https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi_latest_all.deb
222-
fi
223-
sudo dpkg -i /tmp/cvmfs-config-eessi_latest_all.deb
224-
# create client configuration file for CernVM-FS (no squid proxy, 10GB local CernVM-FS client cache)
225-
sudo bash -c "echo 'CVMFS_CLIENT_PROFILE="single"' > /etc/cvmfs/default.local"
226-
sudo bash -c "echo 'CVMFS_QUOTA_LIMIT=10000' >> /etc/cvmfs/default.local"
227-
# make sure that EESSI CernVM-FS repository is accessible
228-
sudo cvmfs_config setup
229-
230-
cleanup_eessi_installation_files
231-
}
232-
233-
cleanup_eessi_installation_files() {
234-
rm /tmp/cvmfs-config-eessi_latest_all.deb
235-
}
236-
237-
main
171+
--8<-- "https://raw.githubusercontent.com/ULHPC/Installing-EESSI-in-G5K-nodes/refs/heads/main/install-eessi-in-g5k"
238172
```

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -422,6 +422,8 @@ markdown_extensions:
422422
- mdx_truly_sane_lists
423423
- pymdownx.snippets:
424424
base_path: snippets
425+
check_paths: true
426+
url_download: true # This enables remote URL fetching
425427
- pymdownx.tabbed:
426428
alternate_style: true
427429
- pymdownx.smartsymbols

0 commit comments

Comments
 (0)