File tree Expand file tree Collapse file tree 10 files changed +22
-19
lines changed
skeleton/{{cookiecutter.environment}}/tofu Expand file tree Collapse file tree 10 files changed +22
-19
lines changed Original file line number Diff line number Diff line change @@ -3,12 +3,13 @@ topology
3
3
4
4
Templates out /etc/slurm/topology.conf file based on an Openstack project for use by
5
5
Slurm's [ topology/tree plugin.] ( https://slurm.schedmd.com/topology.html ) Models
6
- project as tree with a heirarchy of:
6
+ cluster as tree with a heirarchy of:
7
7
8
- Project -> Availability Zones -> Hypervisors -> VMs
8
+ Top-level inter-rack Switch -> Availability Zones -> Hypervisors -> VMs
9
9
10
10
Role Variables
11
11
--------------
12
12
13
- - ` topology_topology_nodes: [] ` : Required list[ str] . List of nodes to include in topology tree. Must be set to include all compute nodes in Slurm cluster. Default ` [] ` .
14
- - ` topology_topology_override: ` : Optional str. If set, will override templating and be provided as custom topology.conf content. Undefined by default.
13
+ - ` topology_topology_nodes: ` : Required list of strs. List of inventory hostnames of nodes to include in topology tree. Must be set to include all compute nodes in Slurm cluster. Default ` [] ` .
14
+ - ` topology_conf_template ` : Optional str. Path to Jinja2 template of topology.conf file. Default
15
+ ` templates/topology.conf.j2 `
Original file line number Diff line number Diff line change 1
1
# Nodes to be included in topology tree, must include all Slurm compute nodes
2
2
topology_topology_nodes : []
3
3
4
- # If set, will override topology.conf file auto-detected from OpenStack project
5
- # topology_topology_override:
4
+ # Override to use custom topology.conf template
5
+ topology_conf_template : templates/topology.conf.j2
Original file line number Diff line number Diff line change 12
12
short_description: Creates map of OpenStack VM network topology
13
13
description:
14
14
- Creates map representing the network topology tree of an OpenStack project with a heirarchy
15
- of: Availability Zone -> Hypervisors/Baremetal nodes -> VMs/Baremetal instances
15
+ of: Availability Zone -> Hypervisors -> VMs/Baremetal instances
16
16
options:
17
17
compute_vms:
18
18
description:
Original file line number Diff line number Diff line change 9
9
- name : Template topology.conf
10
10
become : true
11
11
ansible.builtin.template :
12
- src : templates/topology.conf.j2
12
+ src : " {{ topology_conf_template }} "
13
13
dest : /etc/slurm/topology.conf
14
14
owner : root
15
15
group : root
Original file line number Diff line number Diff line change 1
1
# topology.conf
2
2
# Switch Configuration
3
- {% if topology_topology_override is defined %}
4
- {{ topology_topology_override }}
5
- {% else %}
6
3
{% for az in _topology .topology .keys () %}
7
4
{% for instance_host in _topology .topology [az ].keys () %}
8
5
SwitchName={{ instance_host }} Nodes={{ _topology.topology[az] [instance_host] | join(",") }}
9
6
{% endfor %}
10
7
SwitchName={{ az }} Switches={{ _topology.topology[az] .keys() | join(",") }}
11
8
{% endfor %}
12
9
SwitchName=master Switches={{ _topology.topology.keys() | join(",") }}
13
- {% endif %}
Original file line number Diff line number Diff line change 65
65
name : topology
66
66
# Gated on topology group having compute nodes but role also
67
67
# needs to run on control and login nodes
68
- when : appliances_mode == 'configure' and (groups['topology'] | length) > 0
68
+ when :
69
+ - appliances_mode == 'configure'
70
+ - groups['topology'] | length > 0
69
71
- include_role :
70
72
name : stackhpc.openhpc
71
73
tasks_from : " {{ 'runtime.yml' if appliances_mode == 'configure' else 'main.yml' }}"
Original file line number Diff line number Diff line change @@ -25,7 +25,7 @@ openhpc
25
25
# Do not add hosts here manually - used as part of Packer image build pipeline. See packer/README.md.
26
26
27
27
[topology]
28
- # Compute nodes to be included in the Slurm topology plugin's topology tree
28
+ # Compute nodes to be included in the Slurm topology plugin's topology tree. See ansible/roles/topology
29
29
# Should be set to `compute` if enabled
30
30
# Note that this feature currently assumes all compute nodes are VMs, enabling
31
31
# when the cluster contains baremetal compute nodes may lead to unexpected scheduling behaviour
Original file line number Diff line number Diff line change @@ -137,4 +137,8 @@ builder
137
137
compute
138
138
139
139
[topology:children]
140
+ # Compute nodes to be included in the Slurm topology plugin's topology tree. See ansible/roles/topology
141
+ # Should be set to `compute` if enabled
142
+ # Note that this feature currently assumes all compute nodes are VMs, enabling
143
+ # when the cluster contains baremetal compute nodes may lead to unexpected scheduling behaviour
140
144
compute
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ variable "match_ironic_node" {
150
150
151
151
variable "availability_zone" {
152
152
type = string
153
- description = " Name of availability zone. If undefined, defaults to 'nova' if match_ironic_node is true, defered to OpenStack otherwise"
153
+ description = " Name of availability zone. If undefined, defaults to 'nova' if match_ironic_node is true, deferred to OpenStack otherwise"
154
154
default = null
155
155
}
156
156
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ variable "login" {
79
79
For any networks not specified here the cloud will
80
80
select addresses.
81
81
match_ironic_node: Set true to launch instances on the Ironic node of the same name as each cluster node
82
- availability_zone: Name of availability zone"Name of availability zone . If undefined, defaults to 'nova'
83
- if match_ironic_node is true, defered to OpenStack otherwise"
82
+ availability_zone: Name of availability zone. If undefined, defaults to 'nova'
83
+ if match_ironic_node is true, defered to OpenStack otherwise
84
84
gateway_ip: Address to add default route via
85
85
nodename_template: Overrides variable cluster_nodename_template
86
86
EOF
@@ -123,8 +123,8 @@ variable "compute" {
123
123
For any networks not specified here the cloud will
124
124
select addresses.
125
125
match_ironic_node: Set true to launch instances on the Ironic node of the same name as each cluster node
126
- availability_zone: Name of availability zone. "Name of availability zone. If undefined, defaults to 'nova'
127
- if match_ironic_node is true, defered to OpenStack otherwise"
126
+ availability_zone: Name of availability zone. If undefined, defaults to 'nova'
127
+ if match_ironic_node is true, defered to OpenStack otherwise
128
128
gateway_ip: Address to add default route via
129
129
nodename_template: Overrides variable cluster_nodename_template
130
130
You can’t perform that action at this time.
0 commit comments