Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion ansible/playbooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@ all functionality for installing the EESSI compatibility layer. It performs the
- add a given overlay to the installation;
- use the Portage configuration files from that overlay, if applicable, by making symlinks to them;
- install a given list of package sets;
- install a given list of additional packages.
- install a given list of additional packages;
- test the installation using ReFrame.

The playbook `install.yml` will execute this role on a given server.
Note that if you want the role to install Gentoo Prefix, this particular task currently only supports Linux distributions based on RHEL 8 on the installation host.
Expand Down Expand Up @@ -55,6 +56,7 @@ Before running the playbook, make sure the following settings are correct, and o
| prefix_locales | List of locales to be generated |
| package_sets | List of package sets to be installed |
| prefix_packages | List of additional packages to be installed |
| reframe_venv | Path where a virtual environment will be created for the ReFrame installation |
| symlinks_to_host | List of paths that should get a symlink to the corresponding host path |

### Logging
Expand Down
2 changes: 2 additions & 0 deletions ansible/playbooks/roles/compatibility_layer/defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,8 @@ package_sets:

prefix_packages:

reframe_venv_dir: /tmp/reframe_venv

# List of locations that should get a symlink $EPREFIX/$LOCATION -> $LOCATION.
# This ensures that things like user/group ids are correct/looked up in the right way in the Prefix environment.
symlinks_to_host:
Expand Down
20 changes: 18 additions & 2 deletions ansible/playbooks/roles/compatibility_layer/tasks/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,32 @@
# of the compatibility layer installation.
---

- name: Check if ReFrame is installed
ansible.builtin.command: reframe --version >/dev/null 2>&1
register: reframe_exists
ignore_errors: true
changed_when: false
tags:
- test

- name: Install Reframe using pip if it's not installed yet
ansible.builtin.pip:
name: ReFrame-HPC
virtualenv: "{{ reframe_venv_dir }}"
virtualenv_command: python3 -m venv
when: reframe_exists.rc != 0

- name: Copy ReFrame test file
ansible.builtin.copy:
src: "{{ playbook_dir }}/../../test/compat_layer.py"
dest: /tmp/compat_layer.py
dest: "{{ reframe_venv_dir }}/compat_layer.py"
mode: 0644
tags:
- test

- name: Run ReFrame tests
ansible.builtin.command: reframe -r -v -c /tmp/compat_layer.py
ansible.builtin.command:
cmd: "{{ reframe_venv_dir + '/bin/' if reframe_exists.rc != 0 else '' }}reframe -r -v -c {{ reframe_venv_dir }}/compat_layer.py"
environment:
EESSI_VERSION: "{{ eessi_version }}"
EESSI_OS: "{{ eessi_host_os }}"
Expand Down