Provision AIO network interfaces conditionally
There is no real reason to always provision all network interfaces. Having only required interfaces by scenario makes deployment less bloated and also systemd_networkd role will execute faster. Change-Id: I4135a30b7c684bbbbf0f5dbf20ec1da8aa1c6d09 Signed-off-by: Dmitriy Rabotyagov <dmitriy.rabotyagov@cleura.com>
This commit is contained in:
@@ -19,67 +19,74 @@ aio_systemd_networkd_devices_bootstrap:
|
|||||||
- NetDev:
|
- NetDev:
|
||||||
Name: dummy-mgmt
|
Name: dummy-mgmt
|
||||||
Kind: dummy
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-mgmt
|
||||||
|
Kind: bridge
|
||||||
|
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: dummy-vxlan
|
Name: dummy-vxlan
|
||||||
Kind: dummy
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-vxlan
|
||||||
|
Kind: bridge
|
||||||
|
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: dummy-storage
|
Name: dummy-storage
|
||||||
Kind: dummy
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-storage
|
||||||
|
Kind: bridge
|
||||||
|
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: dummy-vlan
|
Name: dummy-vlan
|
||||||
Kind: dummy
|
Kind: dummy
|
||||||
- NetDev:
|
|
||||||
Name: dummy-dbaas
|
|
||||||
Kind: dummy
|
|
||||||
- NetDev:
|
|
||||||
Name: dummy-lbaas
|
|
||||||
Kind: dummy
|
|
||||||
- NetDev:
|
|
||||||
Name: dummy-bmaas
|
|
||||||
Kind: dummy
|
|
||||||
|
|
||||||
- NetDev:
|
|
||||||
Name: br-mgmt
|
|
||||||
Kind: bridge
|
|
||||||
- NetDev:
|
|
||||||
Name: br-vxlan
|
|
||||||
Kind: bridge
|
|
||||||
- NetDev:
|
|
||||||
Name: br-storage
|
|
||||||
Kind: bridge
|
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: br-vlan
|
Name: br-vlan
|
||||||
Kind: bridge
|
Kind: bridge
|
||||||
- NetDev:
|
|
||||||
Name: br-dbaas
|
|
||||||
Kind: bridge
|
|
||||||
- NetDev:
|
|
||||||
Name: br-lbaas
|
|
||||||
Kind: bridge
|
|
||||||
- NetDev:
|
|
||||||
Name: br-bmaas
|
|
||||||
Kind: bridge
|
|
||||||
|
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: br-vlan-veth
|
Name: br-vlan-veth
|
||||||
Kind: veth
|
Kind: veth
|
||||||
Peer:
|
Peer:
|
||||||
Name: eth12
|
Name: eth12
|
||||||
|
{% if 'trove' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- NetDev:
|
||||||
|
Name: dummy-dbaas
|
||||||
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-dbaas
|
||||||
|
Kind: bridge
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: br-dbaas-veth
|
Name: br-dbaas-veth
|
||||||
Kind: veth
|
Kind: veth
|
||||||
Peer:
|
Peer:
|
||||||
Name: eth13
|
Name: eth13
|
||||||
|
{% endif %}
|
||||||
|
{% if 'octavia' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- NetDev:
|
||||||
|
Name: dummy-lbaas
|
||||||
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-lbaas
|
||||||
|
Kind: bridge
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: br-lbaas-veth
|
Name: br-lbaas-veth
|
||||||
Kind: veth
|
Kind: veth
|
||||||
Peer:
|
Peer:
|
||||||
Name: eth14
|
Name: eth14
|
||||||
|
{% endif %}
|
||||||
|
{% if 'ironic' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- NetDev:
|
||||||
|
Name: dummy-bmaas
|
||||||
|
Kind: dummy
|
||||||
|
- NetDev:
|
||||||
|
Name: br-bmaas
|
||||||
|
Kind: bridge
|
||||||
- NetDev:
|
- NetDev:
|
||||||
Name: br-bmaas-veth
|
Name: br-bmaas-veth
|
||||||
Kind: veth
|
Kind: veth
|
||||||
Peer:
|
Peer:
|
||||||
Name: eth15
|
Name: eth15
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
aio_systemd_networkd_networks_bootstrap:
|
aio_systemd_networkd_networks_bootstrap:
|
||||||
- interface: "dummy-mgmt"
|
- interface: "dummy-mgmt"
|
||||||
@@ -99,36 +106,6 @@ aio_systemd_networkd_networks_bootstrap:
|
|||||||
address: "{{ storage_network | ansible.utils.nthhost('100') }}"
|
address: "{{ storage_network | ansible.utils.nthhost('100') }}"
|
||||||
netmask: "{{ storage_network | ansible.utils.ipaddr('netmask') }}"
|
netmask: "{{ storage_network | ansible.utils.ipaddr('netmask') }}"
|
||||||
|
|
||||||
- interface: "dummy-dbaas"
|
|
||||||
bridge: "br-dbaas"
|
|
||||||
mtu: 9000
|
|
||||||
- interface: "br-dbaas"
|
|
||||||
address: "{{ dbaas_network | ansible.utils.nthhost('100') }}"
|
|
||||||
netmask: "{{ dbaas_network | ansible.utils.ipaddr('netmask') }}"
|
|
||||||
- interface: "br-dbaas-veth"
|
|
||||||
bridge: "br-dbaas"
|
|
||||||
mtu: 9000
|
|
||||||
|
|
||||||
- interface: "dummy-lbaas"
|
|
||||||
bridge: "br-lbaas"
|
|
||||||
mtu: 9000
|
|
||||||
- interface: "br-lbaas"
|
|
||||||
address: "{{ lbaas_network | ansible.utils.nthhost('100') }}"
|
|
||||||
netmask: "{{ lbaas_network | ansible.utils.ipaddr('netmask') }}"
|
|
||||||
- interface: "br-lbaas-veth"
|
|
||||||
bridge: "br-lbaas"
|
|
||||||
mtu: 9000
|
|
||||||
|
|
||||||
- interface: "dummy-bmaas"
|
|
||||||
bridge: "br-bmaas"
|
|
||||||
mtu: 1500
|
|
||||||
- interface: "br-bmaas"
|
|
||||||
address: "{{ bmaas_network | ansible.utils.nthhost('100') }}"
|
|
||||||
netmask: "{{ bmaas_network | ansible.utils.ipaddr('netmask') }}"
|
|
||||||
- interface: "br-bmaas-veth"
|
|
||||||
bridge: "br-bmaas"
|
|
||||||
mtu: 1500
|
|
||||||
|
|
||||||
- interface: "dummy-vxlan"
|
- interface: "dummy-vxlan"
|
||||||
bridge: "br-vxlan"
|
bridge: "br-vxlan"
|
||||||
mtu: 9000
|
mtu: 9000
|
||||||
@@ -149,6 +126,40 @@ aio_systemd_networkd_networks_bootstrap:
|
|||||||
bridge: "br-vlan"
|
bridge: "br-vlan"
|
||||||
mtu: 9000
|
mtu: 9000
|
||||||
|
|
||||||
|
{% if 'trove' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- interface: "dummy-dbaas"
|
||||||
|
bridge: "br-dbaas"
|
||||||
|
mtu: 9000
|
||||||
|
- interface: "br-dbaas"
|
||||||
|
address: "{{ dbaas_network | ansible.utils.nthhost('100') }}"
|
||||||
|
netmask: "{{ dbaas_network | ansible.utils.ipaddr('netmask') }}"
|
||||||
|
- interface: "br-dbaas-veth"
|
||||||
|
bridge: "br-dbaas"
|
||||||
|
mtu: 9000
|
||||||
|
{% endif %}
|
||||||
|
{% if 'octavia' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- interface: "dummy-lbaas"
|
||||||
|
bridge: "br-lbaas"
|
||||||
|
mtu: 9000
|
||||||
|
- interface: "br-lbaas"
|
||||||
|
address: "{{ lbaas_network | ansible.utils.nthhost('100') }}"
|
||||||
|
netmask: "{{ lbaas_network | ansible.utils.ipaddr('netmask') }}"
|
||||||
|
- interface: "br-lbaas-veth"
|
||||||
|
bridge: "br-lbaas"
|
||||||
|
mtu: 9000
|
||||||
|
{% endif %}
|
||||||
|
{% if 'ironic' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- interface: "dummy-bmaas"
|
||||||
|
bridge: "br-bmaas"
|
||||||
|
mtu: 1500
|
||||||
|
- interface: "br-bmaas"
|
||||||
|
address: "{{ bmaas_network | ansible.utils.nthhost('100') }}"
|
||||||
|
netmask: "{{ bmaas_network | ansible.utils.ipaddr('netmask') }}"
|
||||||
|
- interface: "br-bmaas-veth"
|
||||||
|
bridge: "br-bmaas"
|
||||||
|
mtu: 1500
|
||||||
|
{% endif %}
|
||||||
|
|
||||||
aio_systemd_services_postnetwork:
|
aio_systemd_services_postnetwork:
|
||||||
- service_name: "networking-post-up"
|
- service_name: "networking-post-up"
|
||||||
config_overrides:
|
config_overrides:
|
||||||
@@ -165,21 +176,27 @@ aio_systemd_services_postnetwork:
|
|||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-vxlan gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-vxlan gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-storage gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-storage gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-vlan gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K br-vlan gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-dbaas gso off sg off tso off tx off"
|
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-lbaas gso off sg off tso off tx off"
|
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K br-bmaas gso off sg off tso off tx off"
|
|
||||||
- "-{{ bootstrap_host_ip_path }} link set eth12 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth12 up"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set br-vlan-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-vlan-veth up"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K eth12 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth12 gso off sg off tso off tx off"
|
||||||
|
{% if 'trove' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- "-{{ bootstrap_host_ethtool_path }} -K br-dbaas gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set eth13 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth13 up"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set br-dbaas-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-dbaas-veth up"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K eth13 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth13 gso off sg off tso off tx off"
|
||||||
|
{% endif %}
|
||||||
|
{% if 'octavia' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- "-{{ bootstrap_host_ethtool_path }} -K br-lbaas gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set eth14 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth14 up"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set br-lbaas-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-lbaas-veth up"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K eth14 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth14 gso off sg off tso off tx off"
|
||||||
|
{% endif %}
|
||||||
|
{% if 'ironic' in bootstrap_host_scenarios_expanded %}
|
||||||
|
- "-{{ bootstrap_host_ethtool_path }} -K br-bmaas gso off sg off tso off tx off"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set eth15 up"
|
- "-{{ bootstrap_host_ip_path }} link set eth15 up"
|
||||||
- "-{{ bootstrap_host_ip_path }} link set br-bmaas-veth up"
|
- "-{{ bootstrap_host_ip_path }} link set br-bmaas-veth up"
|
||||||
- "-{{ bootstrap_host_ethtool_path }} -K eth15 gso off sg off tso off tx off"
|
- "-{{ bootstrap_host_ethtool_path }} -K eth15 gso off sg off tso off tx off"
|
||||||
|
{% endif %}
|
||||||
execstops:
|
execstops:
|
||||||
- "{{ bootstrap_host_iptables_path }} -t nat -D POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE"
|
- "{{ bootstrap_host_iptables_path }} -t nat -D POSTROUTING -o {{ bootstrap_host_public_interface }} -j MASQUERADE"
|
||||||
enabled: true
|
enabled: true
|
||||||
|
|||||||
Reference in New Issue
Block a user