-
Notifications
You must be signed in to change notification settings - Fork 34
Support EESSI #252
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Support EESSI #252
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
615b222
Add EESSI to the fat image
JohnGarbutt a4ebf5a
Fix eessi install
059dab8
Make eessi optional but installed by default
c0e35de
Add EESSI test job playbook
a95a6fb
Add EESSI test to CI workflow
f6311b6
Use testuser to run job
47aa9e9
Relax sacct state assertion
f1f6aba
Create home dir instead of using become_user
d60fbf8
Don't gather facts
a5e5674
Import GPG key & allow config overrides
034f460
Fix typo
9512a28
Add readme
a92c58d
Fix typos
sd109 fcba19e
Merge branch 'main' into eessi
sd109 bf8c3f6
Use get_url instead of wget
fa07ec5
bump fat image in stackhpc env
sjpb File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
--- | ||
- name: Run EESSI test job | ||
hosts: login[0] | ||
vars: | ||
eessi_test_rootdir: /home/eessi_test | ||
tasks: | ||
- name: Create test root directory | ||
file: | ||
path: "{{ eessi_test_rootdir }}" | ||
state: directory | ||
owner: "{{ ansible_user }}" | ||
group: "{{ ansible_user }}" | ||
become: true | ||
|
||
- name: Clone eessi-demo repo | ||
ansible.builtin.git: | ||
repo: "https://github.com/eessi/eessi-demo.git" | ||
dest: "{{ eessi_test_rootdir }}/eessi-demo" | ||
|
||
- name: Run test job | ||
ansible.builtin.shell: | ||
cmd: | | ||
source /cvmfs/pilot.eessi-hpc.org/latest/init/bash | ||
srun ./run.sh | ||
chdir: "{{ eessi_test_rootdir }}/eessi-demo/TensorFlow" | ||
executable: /bin/bash | ||
register: job_output | ||
|
||
- name: Fail if job output contains error | ||
fail: | ||
# Note: Job prints live progress bar to terminal, so use regex filter to remove this from stdout | ||
msg: "Test job using EESSI modules failed. Job output was: {{ job_output.stdout | regex_replace('\b', '') }}" | ||
when: '"Epoch 5/5" not in job_output.stdout' | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
EESSI | ||
===== | ||
|
||
Configure the EESSI pilot respository for use on given hosts. | ||
|
||
Requirements | ||
------------ | ||
|
||
None. | ||
|
||
Role Variables | ||
-------------- | ||
|
||
- `cvmfs_quota_limit_mb`: Optional int. Maximum size of local package cache on each node in MB. | ||
- `cvmfs_config_overrides`: Optional dict. Set of key-value pairs for additional CernVM-FS settings see [official docs](https://cvmfs.readthedocs.io/en/stable/cpt-configure.html) for list of options. Each dict key should correspond to a valid config variable (e.g. `CVMFS_HTTP_PROXY`) and the corresponding dict value will be set as the variable value (e.g. `https://my-proxy.com`). These configuration parameters will be written to the `/etc/cvmfs/default.local` config file on each host in the form `KEY=VALUE`. | ||
|
||
Dependencies | ||
------------ | ||
|
||
None. | ||
|
||
Example Playbook | ||
---------------- | ||
|
||
```yaml | ||
- name: Setup EESSI | ||
hosts: eessi | ||
tags: eessi | ||
become: true | ||
tasks: | ||
- name: Install and configure EESSI | ||
import_role: | ||
name: eessi | ||
``` |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
--- | ||
# Default to 10GB | ||
cvmfs_quota_limit_mb: 10000 | ||
|
||
cvmfs_config_default: | ||
CVMFS_CLIENT_PROFILE: single | ||
CVMFS_QUOTA_LIMIT: "{{ cvmfs_quota_limit_mb }}" | ||
|
||
cvmfs_config_overrides: {} | ||
|
||
cvmfs_config: "{{ cvmfs_config_default | combine(cvmfs_config_overrides) }}" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
--- | ||
- name: Download Cern GPG key | ||
ansible.builtin.get_url: | ||
url: http://cvmrepo.web.cern.ch/cvmrepo/yum/RPM-GPG-KEY-CernVM | ||
dest: ./cvmfs-key.gpg | ||
|
||
- name: Import downloaded GPG key | ||
command: rpm --import cvmfs-key.gpg | ||
|
||
- name: Add CVMFS repo | ||
dnf: | ||
name: https://ecsft.cern.ch/dist/cvmfs/cvmfs-release/cvmfs-release-latest.noarch.rpm | ||
|
||
- name: Install CVMFS | ||
sd109 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
dnf: | ||
name: cvmfs | ||
|
||
- name: Install EESSI CVMFS config | ||
dnf: | ||
name: https://github.com/EESSI/filesystem-layer/releases/download/latest/cvmfs-config-eessi-latest.noarch.rpm | ||
# NOTE: Can't find any docs on obtaining gpg key - maybe downloading directly from github is ok? | ||
disable_gpg_check: true | ||
|
||
# Alternative version using official repo - still no GPG key :( | ||
# - name: Add EESSI repo | ||
# dnf: | ||
# name: http://repo.eessi-infra.org/eessi/rhel/8/noarch/eessi-release-0-1.noarch.rpm | ||
|
||
# - name: Install EESSI CVMFS config | ||
# dnf: | ||
# name: cvmfs-config-eessi | ||
|
||
- name: Add base CVMFS config | ||
sd109 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
community.general.ini_file: | ||
dest: /etc/cvmfs/default.local | ||
section: null | ||
option: "{{ item.key }}" | ||
value: "{{ item.value }}" | ||
no_extra_spaces: true | ||
loop: "{{ cvmfs_config | dict2items }}" | ||
|
||
|
||
# NOTE: Not clear how to make this idempotent | ||
sd109 marked this conversation as resolved.
Show resolved
Hide resolved
|
||
- name: Ensure CVMFS config is setup | ||
command: | ||
cmd: "cvmfs_config setup" |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.