Skip to content
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

Add role to install lua job submit plugin #476

Merged
merged 3 commits into from
Oct 22, 2024
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 cod.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,6 @@
- { name: 'enable_lmod', tags: 'enable_lmod_image', vars: [{ enable_lmod_prefix: "{{ cm_def_img_path }}" }] }
- { name: 'cod_rabbitmq_agents_cloud', tags: 'cod_rabbitmq_agents_cloud' }
- { name: 'cod_login_node', tags: 'cod_login_node' }
- { name: 'cod_compute_node', tags: 'cod_compute_node' }
- { name: 'cod_compute_node', tags: 'cod_compute_node' }
- { name: 'job_submit_plugin', tags: 'job_submit_plugin', when: enable_job_submit_plugin}

5 changes: 5 additions & 0 deletions group_vars/all
Original file line number Diff line number Diff line change
Expand Up @@ -351,3 +351,8 @@
gpfs_groups:
- {"name": "gpfs4", "authorized_keys":"/gpfs4/data/user/home/$DOWNSTREAM_USER/.ssh/authorized_keys", "host": "login001", "private_key":"/gpfs4/data/user/home/$DOWNSTREAM_USER/.ssh/id_ecdsa"}
- {"name": "gpfs5", "authorized_keys":"/gpfs5/data/user/home/$DOWNSTREAM_USER/.ssh/authorized_keys", "host": "login002", "private_key":"/gpfs5/data/user/home/$DOWNSTREAM_USER/.ssh/id_ecdsa"}

# job_submit_plugin
enable_job_submit_plugin: true
job_submit_lua_url: "https://gitlab.rc.uab.edu/rc/slurm-factory/-/raw/main/etc/slurm/job_submit.lua"
job_submit_lua_dest: "/etc/slurm/job_submit.lua"
18 changes: 18 additions & 0 deletions roles/job_submit_plugin/tasks/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
---
- name: Add JobSubmitPlugins=lua if not present in Slurm.conf
ansible.builtin.lineinfile:
path: "{{ slurm_conf_path }}"
regexp: '^JobSubmitPlugins=lua'
line: 'JobSubmitPlugins=lua'
state: present
create: no
backup: yes

- name: Download job_submit.lua from GitHub Slurm repository
ansible.builtin.get_url:
url: "{{ job_submit_lua_url }}"
dest: "{{ job_submit_lua_dest }}"
mode: '0644'

- name: reconfigure compute nodes with new config
ansible.builtin.command: scontrol reconfigure
eesaanatluri marked this conversation as resolved.
Show resolved Hide resolved
Loading