File tree Expand file tree Collapse file tree 3 files changed +16
-4
lines changed
roles/cluster_infra/templates Expand file tree Collapse file tree 3 files changed +16
-4
lines changed Original file line number Diff line number Diff line change 1+ * @ stackhpc/batch
Original file line number Diff line number Diff line change 11openhpc_cluster_name : " {{ cluster_name }}"
2+
3+ # Provision a single "standard" compute partition using the supplied
4+ # node count and flavor
5+ openhpc_slurm_partitions :
6+ - name : " standard"
7+ count : " {{ compute_count }}"
8+ flavor_name : " {{ compute_flavor }}"
9+ default : " YES"
Original file line number Diff line number Diff line change @@ -179,16 +179,18 @@ resource "openstack_compute_instance_v2" "control" {
179179 EOF
180180}
181181
182- resource " openstack_compute_instance_v2" " compute" {
183- count = {{ compute_count }}
182+ {% for partition in openhpc_slurm_partitions %}
183+ resource " openstack_compute_instance_v2" " {{ partition.name }}" {
184+ count = {{ partition.count }}
184185
185- name = " {{ cluster_name }}-compute-${count.index}"
186+ name = " {{ cluster_name }}-compute-{{ partition.name }}- ${count.index}"
186187 image_id = " {{ cluster_previous_image | default(cluster_image) }}"
187- flavor_id = " {{ compute_flavor }}"
188+ flavor_name = " {{ partition.flavor_name }}"
188189
189190 network {
190191 name = " {{ cluster_network }}"
191192 }
193+
192194 security_groups = [ " ${openstack_networking_secgroup_v2.secgroup_slurm_cluster.name}" ]
193195 # Use cloud-init to inject the SSH keys
194196 user_data = <<-EOF
@@ -198,6 +200,7 @@ resource "openstack_compute_instance_v2" "compute" {
198200 - {{ cluster_user_ssh_public_key }}
199201 EOF
200202}
203+ {% endfor %}
201204
202205#####
203206##### Floating IP association for login node
You can’t perform that action at this time.
0 commit comments