aboutsummaryrefslogtreecommitdiff
path: root/tests/templates
diff options
context:
space:
mode:
authorDoug Szumski <doug@stackhpc.com>2026-01-26 11:25:34 +0000
committerDoug Szumski <doug@stackhpc.com>2026-04-24 14:47:26 +0100
commit0f4c8544d8b822bd0d97da75b47b1244d147bef3 (patch)
tree174d9bef4550904d7bad6e89e25424de3daf90e0 /tests/templates
parentf0f9810b67afb7531e89cd683d44e49b9980d00f (diff)
downloadkolla-ansible-0f4c8544d8b822bd0d97da75b47b1244d147bef3.tar.gz
kolla-ansible-0f4c8544d8b822bd0d97da75b47b1244d147bef3.zip
Support multiple Nova Compute Ironic instances
Adds support for deploying multiple instances of the Nova Compute Ironic service on the same host. This is useful in large baremetal deployments, where the sharding and/or conductor group feature is used to scale out the service. A further patch to support deploying multiple Ironic conductor instances will follow. Co-Authored-By: Bartosz Bezak <bartosz@stackhpc.com> Co-Authored-By: Bertrand Lanson <bertrand.lanson@protonmail.com> Change-Id: Ibbddfd87e831a3775c3ed66c80b18e5070cedc90 Signed-off-by: Doug Szumski <doug@stackhpc.com>
Diffstat (limited to 'tests/templates')
-rw-r--r--tests/templates/globals-default.j216
-rw-r--r--tests/templates/inventory.j219
-rw-r--r--tests/templates/ironic-overrides.j210
3 files changed, 44 insertions, 1 deletions
diff --git a/tests/templates/globals-default.j2 b/tests/templates/globals-default.j2
index f5f005acd..ca2ad562e 100644
--- a/tests/templates/globals-default.j2
+++ b/tests/templates/globals-default.j2
@@ -138,6 +138,22 @@ enable_proxysql: "yes"
enable_prometheus_proxysql_exporter: "yes"
{% endif %}
+{% if scenario == "multi-compute-ironic" %}
+nova_multi_compute_ironic_config:
+ - {}
+ - "shard_key": "shard_1"
+ "conductor_group": "location_1"
+ - "shard_key": "shard_2"
+ "conductor_group": "location_1"
+ - "conductor_group": "location_2"
+
+enable_ironic: "yes"
+enable_ironic_pxe_filter: "yes"
+ironic_dnsmasq_dhcp_ranges:
+ - range: "10.42.0.2,10.42.0.254,255.255.255.0"
+ironic_internal_endpoint: http://192.0.2.1:6385
+{% endif %}
+
{% if scenario == "mariadb" %}
enable_fluentd: "yes"
enable_mariadb: "yes"
diff --git a/tests/templates/inventory.j2 b/tests/templates/inventory.j2
index 2991518ce..a3bea7213 100644
--- a/tests/templates/inventory.j2
+++ b/tests/templates/inventory.j2
@@ -6,7 +6,7 @@
# primary and secondary while the parent group (control) uses only primary.
[control]
-{% if scenario == 'masakari' %}
+{% if scenario in ['masakari', 'multi-compute-ironic'] %}
{% for host in hostvars if host in ['primary'] %}
{{ host }} ansible_host={{ hostvars[host]['ansible_host'] }}
{% endfor %}
@@ -299,8 +299,25 @@ nova
[nova-spicehtml5proxy:children]
nova
+{% if scenario == 'multi-compute-ironic' %}
+[nova-compute-ironic-1]
+primary
+[nova-compute-ironic-2]
+secondary1
+[nova-compute-ironic-3]
+secondary2
+[nova-compute-ironic-4]
+secondary2
+
+[nova-compute-ironic:children]
+nova-compute-ironic-1
+nova-compute-ironic-2
+nova-compute-ironic-3
+nova-compute-ironic-4
+{% else %}
[nova-compute-ironic:children]
nova
+{% endif %}
[nova-serialproxy:children]
nova
diff --git a/tests/templates/ironic-overrides.j2 b/tests/templates/ironic-overrides.j2
index be944b307..9603d6b2c 100644
--- a/tests/templates/ironic-overrides.j2
+++ b/tests/templates/ironic-overrides.j2
@@ -2,6 +2,16 @@
enabled_inspect_interfaces = no-inspect, agent
default_inspect_interface = agent
+{% if scenario == "multi-compute-ironic" %}
+{% raw %}
+{% set cg = 'location_1' if inventory_hostname == 'secondary1' else 'location_2' if inventory_hostname == 'secondary2' %}
+{% if cg %}
+[conductor]
+conductor_group = {{ cg }}
+{% endif %}
+{% endraw %}
+{% endif %}
+
[neutron]
cleaning_network = public1
inspection_network = public1