-
Notifications
You must be signed in to change notification settings - Fork 35
HOWTOs
Hooks from parent environments don't get run by default as site.yml relies on APPLIANCES_ENVIRONMENT_ROOT
to find them. But you can explicitly run them using :
# environments/child/hooks/pre/yml
- name: Import parent hook
vars:
appliances_environment_root: "{{ lookup('env', 'APPLIANCES_ENVIRONMENT_ROOT') }}"
import_playbook: "{{ appliances_environment_root }}/../parent/hooks/pre.yml"
where child
and parent
are the environment names.
-
Create a group
control
containing just the first compute node, and add that group intohpctests
, e.g. inenvironments/<myenv>/inventory/groups
:[control] combined-compute-0 [hpctests:children] control
-
Do NOT create a group
login
(that is for login-only nodes) -
Create a post-hook like this:
- hosts: control become: true tasks: - name: Prevent ansible_user's processes being killed on compute nodes at job completion replace: path: /etc/slurm/slurm.epilog.clean regexp: 'if \[ \$SLURM_UID -lt 100 \] ; then' replace: "if [[ $SLURM_UID -lt 100 || $SLURM_JOB_USER -eq {{ ansible_user }} ]] ; then"
You can rerun the slurm setup (e.g. for partition/node changes, slurm template debugging) faster using:
$ ansible-playbook ansible/slurm.yml --tags openhpc --skip-tags install
Github won't (by default) inject secrets into forked repos, so the OpenStack-based CI won't run as the runner won't have access to the credentials needed to access our OpenStack. In addition, the repo is configured to require approval on workflows from forked repos (which should therefore be denied, because they can't do anything useful).
The proposed approach is therefore as follows:
- Review the PR for correctness.
- Review the PR for safety, i.e. no changes which could leak the repository secrets, provide access to or leak information about our infrastructure
- Get changes made until happy.
- Create a new branch and change the merge target for that PR to that new branch.
- Merge the PR into the new branch - this will run CI.
- Make tweaks as necessary.
- Go through normal (internal) review to merge new branch into
main
. - Merge new branch into main.