Skip to content

Commit c978681

Browse files
authored
Merge pull request #259 from diedpigs/feat-global-partition
Feat global partition
2 parents acd7165 + edcf3b7 commit c978681

File tree

7 files changed

+19
-8
lines changed

7 files changed

+19
-8
lines changed

group_vars/all

+3
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@
2424
cluster_host: "login001"
2525
slurm_bin_path: "/cm/shared/apps/slurm/current/bin"
2626
slurm_conf_path: "/cm/shared/apps/slurm/var/etc/slurm/slurm.conf"
27+
slurm_partitions:
28+
- { name: "defq", hours: 1, max_nodes: 0, priority: 2 }
29+
- { name: "low", hours: 1, max_nodes: 0, priority: 2 }
2730
# gres_types: "gpu"
2831

2932
# sacct user list

roles/ood/tasks/main.yaml

+3-3
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@
5252

5353
- name: Add cluster configuration files
5454
template:
55-
src: cluster.yml
55+
src: cluster.yml.j2
5656
dest: /etc/ood/config/clusters.d/{{ cluster_name }}.yml
5757

5858
- name: Create interactive desktop settings directory
@@ -62,7 +62,7 @@
6262

6363
- name: Add interactive desktop settings
6464
template:
65-
src: bc_desktop/cluster.yml
65+
src: bc_desktop/cluster.yml.j2
6666
dest: /etc/ood/config/apps/bc_desktop/{{ cluster_name }}.yml
6767

6868
- name: Create interactive desktop job submit script directory
@@ -71,7 +71,7 @@
7171
state: directory
7272

7373
- name: Add interactive desktop job submit script
74-
template:
74+
copy:
7575
src: bc_desktop/submit.yml.erb
7676
dest: /etc/ood/config/apps/bc_desktop/submit/submit.yml.erb
7777

roles/ood/templates/cluster.yml roles/ood/templates/cluster.yml.j2

+5-1
Original file line numberDiff line numberDiff line change
@@ -22,4 +22,8 @@ v2:
2222
export WEBSOCKIFY_CMD="/bin/websockify"
2323
%s
2424
set_host: "host=$(hostname -s)"
25-
25+
custom:
26+
partitions:
27+
{% for p in slurm_partitions %}
28+
- "{{ p.name }}"
29+
{% endfor %}

roles/ood_vnc_form/tasks/main.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
---
22
- name: Put custom cluster.yml in place
33
template:
4-
src: cluster.yml
5-
dest: /etc/ood/config/apps/bc_desktop/{{ cluster_name }}.yml
4+
src: cluster.yml.erb.j2
5+
dest: /etc/ood/config/apps/bc_desktop/{{ cluster_name }}.yml.erb
66
backup: yes
77

88
- name: Put submit.yml.erb in place

roles/ood_vnc_form/templates/cluster.yml roles/ood_vnc_form/templates/cluster.yml.erb.j2

+6-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
<%-
2+
partitions = OodAppkit.clusters[:{{ cluster_name }}].custom_config[:partitions]
3+
-%>
14
---
25
title: "HPC Desktop"
36
cluster: {{ cluster_name }}
@@ -23,8 +26,9 @@ attributes:
2326
widget: select
2427
label: Partition
2528
options:
26-
- [ "defq", "defq" ]
27-
- [ "low", "low" ]
29+
<%- partitions.each do |p| -%>
30+
- [ "<%= p %>", "<%= p %>" ]
31+
<%- end -%>
2832

2933
form:
3034
- desktop

0 commit comments

Comments
 (0)