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
33
44Templates out /etc/slurm/topology.conf file based on an Openstack project for use by
55Slurm'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:
77
8- Project -> Availability Zones -> Hypervisors -> VMs
8+ Top-level inter-rack Switch -> Availability Zones -> Hypervisors -> VMs
99
1010Role Variables
1111--------------
1212
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 11# Nodes to be included in topology tree, must include all Slurm compute nodes
22topology_topology_nodes : []
33
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 1212short_description: Creates map of OpenStack VM network topology
1313description:
1414 - 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
1616options:
1717 compute_vms:
1818 description:
Original file line number Diff line number Diff line change 99- name : Template topology.conf
1010 become : true
1111 ansible.builtin.template :
12- src : templates/topology.conf.j2
12+ src : " {{ topology_conf_template }} "
1313 dest : /etc/slurm/topology.conf
1414 owner : root
1515 group : root
Original file line number Diff line number Diff line change 11# topology.conf
22# Switch Configuration
3- {% if topology_topology_override is defined %}
4- {{ topology_topology_override }}
5- {% else %}
63{% for az in _topology .topology .keys () %}
74{% for instance_host in _topology .topology [az ].keys () %}
85SwitchName={{ instance_host }} Nodes={{ _topology.topology[az] [instance_host] | join(",") }}
96{% endfor %}
107SwitchName={{ az }} Switches={{ _topology.topology[az] .keys() | join(",") }}
118{% endfor %}
129SwitchName=master Switches={{ _topology.topology.keys() | join(",") }}
13- {% endif %}
Original file line number Diff line number Diff line change 6565 name : topology
6666 # Gated on topology group having compute nodes but role also
6767 # 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
6971 - include_role :
7072 name : stackhpc.openhpc
7173 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
2525# Do not add hosts here manually - used as part of Packer image build pipeline. See packer/README.md.
2626
2727[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
2929# Should be set to `compute` if enabled
3030# Note that this feature currently assumes all compute nodes are VMs, enabling
3131# 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
137137compute
138138
139139[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
140144compute
Original file line number Diff line number Diff line change @@ -150,7 +150,7 @@ variable "match_ironic_node" {
150150
151151variable "availability_zone" {
152152 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"
154154 default = null
155155}
156156
Original file line number Diff line number Diff line change @@ -79,8 +79,8 @@ variable "login" {
7979 For any networks not specified here the cloud will
8080 select addresses.
8181 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
8484 gateway_ip: Address to add default route via
8585 nodename_template: Overrides variable cluster_nodename_template
8686 EOF
@@ -123,8 +123,8 @@ variable "compute" {
123123 For any networks not specified here the cloud will
124124 select addresses.
125125 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
128128 gateway_ip: Address to add default route via
129129 nodename_template: Overrides variable cluster_nodename_template
130130
You can’t perform that action at this time.
0 commit comments