Skip to content

Commit e0c18bd

Browse files
committed
Merge branch 'main' into feat/custom-terraform-template-dir
2 parents 3b5bc59 + 29a9a6a commit e0c18bd

File tree

3 files changed

+16
-4
lines changed

3 files changed

+16
-4
lines changed

.github/CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
* @stackhpc/batch

group_vars/openhpc.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,9 @@
11
openhpc_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"

roles/cluster_infra/templates/resources.tf.j2

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)