Browse Source

Render NIC config templates with jinja2

This change converts the existing NIC templates to jinja2 in
order to dynamically render the ports and networks according
to the network_data.yaml. If networks are added to the
network_data.yaml file, parameters will be added to all
NIC templates. The YAML files (as output from jinja with
the default network_data.yaml) are present as an example.

The roles in roles_data.yaml are used to produce NIC configs
for the standard and custom composable roles. In order to
keep the ordering of NICs the same in the multiple-nics
templates, the order of networks was changed in the
network_data.yaml file. This is reflected in the network
templates, and in some of the files that is the only
change.

The roles and roles_data.yaml were modified to include
a legacy name for the NIC config templates for the
built-in roles Controller, Compute, Object Storage,
Block Storage, Ceph Storage, Compute-DPDK, and
Networker roles. There will now be a file produced
with the legacy name, but also one produced with the
<role>-role.j2.yaml format (along with environment
files to help use the new filenames).

Note this change also fixes some typos as well as
a number of templates that had VLANs with device:
entries which were ignored.

Closes-Bug: 1737041
Depends-On: I49c0245c36de3103671080fd1c8cfb3432856f35
Change-Id: I3bdb7d00dab5a023dd8b9c94c0f89f84357ae7a4
changes/38/523638/32
Dan Sneddon 4 years ago
parent
commit
1dec175241
  1. 2
      ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml
  2. 2
      ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml
  3. 2
      ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml
  4. 2
      ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml
  5. 2
      ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml
  6. 2
      ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml
  7. 2
      ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml
  8. 2
      ci/environments/network/multiple-nics/nic-configs/compute.yaml
  9. 2
      ci/environments/network/multiple-nics/nic-configs/controller.yaml
  10. 2
      ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml
  11. 2
      ci/environments/network/public-bond/nic-configs/ceph-storage.yaml
  12. 2
      ci/environments/network/public-bond/nic-configs/cinder-storage.yaml
  13. 2
      ci/environments/network/public-bond/nic-configs/compute.yaml
  14. 2
      ci/environments/network/public-bond/nic-configs/controller.yaml
  15. 2
      ci/environments/network/public-bond/nic-configs/swift-storage.yaml
  16. 11
      environments/net-bond-with-vlans-no-external.j2.yaml
  17. 10
      environments/net-bond-with-vlans-v6.j2.yaml
  18. 12
      environments/net-bond-with-vlans.j2.yaml
  19. 13
      environments/net-bond-with-vlans.yaml
  20. 12
      environments/net-dpdkbond-with-vlans.j2.yaml
  21. 10
      environments/net-multiple-nics-v6.j2.yaml
  22. 12
      environments/net-multiple-nics.j2.yaml
  23. 13
      environments/net-multiple-nics.yaml
  24. 12
      environments/net-single-nic-linux-bridge-with-vlans.j2.yaml
  25. 13
      environments/net-single-nic-linux-bridge-with-vlans.yaml
  26. 10
      environments/net-single-nic-with-vlans-no-external.j2.yaml
  27. 10
      environments/net-single-nic-with-vlans-v6.j2.yaml
  28. 12
      environments/net-single-nic-with-vlans.j2.yaml
  29. 13
      environments/net-single-nic-with-vlans.yaml
  30. 64
      environments/network-environment-v6.j2.yaml
  31. 60
      environments/network-environment-v6.yaml
  32. 61
      environments/network-environment.j2.yaml
  33. 59
      environments/network-environment.yaml
  34. 5
      environments/network-isolation-v6.j2.yaml
  35. 27
      net-config-bond.j2.yaml
  36. 28
      net-config-bridge.j2.yaml
  37. 28
      net-config-linux-bridge.j2.yaml
  38. 29
      net-config-noop.j2.yaml
  39. 47
      net-config-noop.yaml
  40. 30
      net-config-static-bridge-with-external-dhcp.j2.yaml
  41. 29
      net-config-static-bridge.j2.yaml
  42. 28
      net-config-static.j2.yaml
  43. 29
      net-config-undercloud.j2.yaml
  44. 14
      network/config/bond-with-vlans/README.md
  45. 165
      network/config/bond-with-vlans/ceph-storage.yaml
  46. 172
      network/config/bond-with-vlans/cinder-storage.yaml
  47. 82
      network/config/bond-with-vlans/compute-dpdk.j2.yaml
  48. 175
      network/config/bond-with-vlans/compute.yaml
  49. 79
      network/config/bond-with-vlans/controller-no-external.j2.yaml
  50. 77
      network/config/bond-with-vlans/controller-v6.j2.yaml
  51. 188
      network/config/bond-with-vlans/controller.yaml
  52. 166
      network/config/bond-with-vlans/networker.yaml
  53. 179
      network/config/bond-with-vlans/role.role.j2.yaml
  54. 172
      network/config/bond-with-vlans/swift-storage.yaml
  55. 12
      network/config/multiple-nics/README.md
  56. 140
      network/config/multiple-nics/ceph-storage.yaml
  57. 146
      network/config/multiple-nics/cinder-storage.yaml
  58. 72
      network/config/multiple-nics/compute-dvr.j2.yaml
  59. 154
      network/config/multiple-nics/compute.yaml
  60. 71
      network/config/multiple-nics/controller-v6.j2.yaml
  61. 171
      network/config/multiple-nics/controller.yaml
  62. 152
      network/config/multiple-nics/networker.yaml
  63. 152
      network/config/multiple-nics/role.role.j2.yaml
  64. 146
      network/config/multiple-nics/swift-storage.yaml
  65. 147
      network/config/single-nic-linux-bridge-vlans/ceph-storage.yaml
  66. 154
      network/config/single-nic-linux-bridge-vlans/cinder-storage.yaml
  67. 157
      network/config/single-nic-linux-bridge-vlans/compute.yaml
  68. 71
      network/config/single-nic-linux-bridge-vlans/controller-v6.j2.yaml
  69. 172
      network/config/single-nic-linux-bridge-vlans/controller.yaml
  70. 148
      network/config/single-nic-linux-bridge-vlans/networker.yaml
  71. 103
      network/config/single-nic-linux-bridge-vlans/role.role.j2.yaml
  72. 154
      network/config/single-nic-linux-bridge-vlans/swift-storage.yaml
  73. 13
      network/config/single-nic-vlans/README.md
  74. 132
      network/config/single-nic-vlans/ceph-storage.yaml
  75. 142
      network/config/single-nic-vlans/cinder-storage.yaml
  76. 148
      network/config/single-nic-vlans/compute.yaml
  77. 100
      network/config/single-nic-vlans/controller-no-external.j2.yaml
  78. 156
      network/config/single-nic-vlans/controller-no-external.yaml
  79. 71
      network/config/single-nic-vlans/controller-v6.j2.yaml
  80. 164
      network/config/single-nic-vlans/controller.yaml
  81. 144
      network/config/single-nic-vlans/networker.yaml
  82. 103
      network/config/single-nic-vlans/role.role.j2.yaml
  83. 142
      network/config/single-nic-vlans/swift-storage.yaml
  84. 4
      network/network.j2
  85. 65
      network_data.yaml
  86. 71
      network_data_ganesha.yaml
  87. 2
      roles/BlockStorage.yaml
  88. 2
      roles/CephStorage.yaml
  89. 1
      roles/Compute.yaml
  90. 2
      roles/ComputeOvsDpdk.yaml
  91. 4
      roles/Controller.yaml
  92. 1
      roles/ControllerAllNovaStandalone.yaml
  93. 1
      roles/ControllerNoCeph.yaml
  94. 1
      roles/ControllerNovaStandalone.yaml
  95. 1
      roles/ControllerOpenstack.yaml
  96. 1
      roles/ObjectStorage.yaml
  97. 10
      roles_data.yaml
  98. 10
      tools/process-templates.py

2
ci/environments/network/multiple-nics-ipv6/nic-configs/ceph-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics-ipv6/nic-configs/cinder-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics-ipv6/nic-configs/compute.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics-ipv6/nic-configs/controller.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics-ipv6/nic-configs/swift-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics/nic-configs/ceph-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics/nic-configs/cinder-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics/nic-configs/compute.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics/nic-configs/controller.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/multiple-nics/nic-configs/swift-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/public-bond/nic-configs/ceph-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/public-bond/nic-configs/cinder-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/public-bond/nic-configs/compute.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/public-bond/nic-configs/controller.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

2
ci/environments/network/public-bond/nic-configs/swift-storage.yaml

@ -48,7 +48,7 @@ parameters:
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
description: Vlan ID for the storage_mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50

11
environments/net-bond-with-vlans-no-external.yaml → environments/net-bond-with-vlans-no-external.j2.yaml

@ -10,13 +10,14 @@
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
# Set external ports to noop
OS::TripleO::Network::External: OS::Heat::None
OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/noop.yaml
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute.yaml
{%- for role in roles if role.name != "Controller" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/bond-with-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this should really be handled via enabled networks in roles_data not overriding here.
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller-no-external.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml

10
environments/net-bond-with-vlans-v6.yaml → environments/net-bond-with-vlans-v6.j2.yaml

@ -7,8 +7,10 @@
# environment files we should think about using it here to automatically
# include network-isolation-v6.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute.yaml
{%- for role in roles if role != "Controller" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/bond-with-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this should really be handled via setting ipv6:true in network_data not overriding here.
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller-v6.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml

12
environments/net-bond-with-vlans.j2.yaml

@ -0,0 +1,12 @@
# This template configures each role to use a pair of bonded nics (nic2 and
# nic3) and configures an IP address on each relevant isolated network
# for each role. This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/bond-with-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}

13
environments/net-bond-with-vlans.yaml

@ -1,13 +0,0 @@
# This template configures each role to use a pair of bonded nics (nic2 and
# nic3) and configures an IP address on each relevant isolated network
# for each role. This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml

12
environments/net-dpdkbond-with-vlans.yaml → environments/net-dpdkbond-with-vlans.j2.yaml

@ -1,3 +1,5 @@
# NOTE: This environment file uses the compute-dpdk
#
# This template configures each role to use a pair of bonded nics (nic2 and
# nic3) and configures an IP address on each relevant isolated network
# for each role. The nic4 and nic5 are configured for dpdkbond and a provider
@ -8,8 +10,10 @@
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/cinder-storage.yaml
{%- for role in roles if role.name != "Compute" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/bond-with-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this won't handle any custom compute roles, instead we should have a generic way to override this
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/bond-with-vlans/compute-dpdk.yaml
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/bond-with-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/bond-with-vlans/ceph-storage.yaml

10
environments/net-multiple-nics-v6.yaml → environments/net-multiple-nics-v6.j2.yaml

@ -6,8 +6,10 @@
# environment files we should think about using it here to automatically
# include network-isolation-v6.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/multiple-nics/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/multiple-nics/compute.yaml
{%- for role in roles if role.name != "Controller" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/multiple-nics/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this should really be handled via setting ipv6:true in network_data not overriding here.
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/multiple-nics/controller-v6.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/multiple-nics/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/multiple-nics/ceph-storage.yaml

12
environments/net-multiple-nics.j2.yaml

@ -0,0 +1,12 @@
# This template configures each role to use a separate NIC for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/multiple-nics/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}

13
environments/net-multiple-nics.yaml

@ -1,13 +0,0 @@
# This template configures each role to use a separate NIC for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/multiple-nics/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/multiple-nics/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/multiple-nics/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/multiple-nics/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/multiple-nics/ceph-storage.yaml

12
environments/net-single-nic-linux-bridge-with-vlans.j2.yaml

@ -0,0 +1,12 @@
# This template configures each role to use Vlans on a single nic for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}

13
environments/net-single-nic-linux-bridge-with-vlans.yaml

@ -1,13 +0,0 @@
# This template configures each role to use Vlans on a single nic for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-linux-bridge-vlans/ceph-storage.yaml

10
environments/net-single-nic-with-vlans-no-external.yaml → environments/net-single-nic-with-vlans-no-external.j2.yaml

@ -14,8 +14,10 @@ resource_registry:
OS::TripleO::Controller::Ports::ExternalPort: ../network/ports/noop.yaml
# Configure other ports as normal
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-vlans/compute.yaml
{%- for role in roles if role.name != "Controller" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this should really be handled via enabled networks in roles_data not overriding here.
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-vlans/controller-no-external.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml

10
environments/net-single-nic-with-vlans-v6.yaml → environments/net-single-nic-with-vlans-v6.j2.yaml

@ -6,8 +6,10 @@
# environment files we should think about using it here to automatically
# include network-isolation-v6.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-vlans/compute.yaml
{%- for role in roles if role.name != "Controller" %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
# FIXME this should really be handled via setting ipv6:true in network_data not overriding here.
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-vlans/controller-v6.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml

12
environments/net-single-nic-with-vlans.j2.yaml

@ -0,0 +1,12 @@
# This template configures each role to use Vlans on a single nic for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig: ../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}

13
environments/net-single-nic-with-vlans.yaml

@ -1,13 +0,0 @@
# This template configures each role to use Vlans on a single nic for
# each isolated network.
# This template assumes use of network-isolation.yaml.
#
# FIXME: if/when we add functionality to heatclient to include heat
# environment files we should think about using it here to automatically
# include network-isolation.yaml.
resource_registry:
OS::TripleO::BlockStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig: ../network/config/single-nic-vlans/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig: ../network/config/single-nic-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig: ../network/config/single-nic-vlans/ceph-storage.yaml

64
environments/network-environment-v6.j2.yaml

@ -0,0 +1,64 @@
# NOTE: This file is deprecated, and is included for backwards-compatibility
# for use in upgrades. For new deployments, set ipv6: true for isolated
# networks using IPv6 (Tenant network should use IPv4 for tunneling),
# and set the default_route_networks to "['ControlPlane', 'External']"
# on the Controller role to use ControlPlane for IPv4 and External for IPv6
# default routes, and include network-environment.yaml instead of this file.
resource_registry:
# Network Interface templates to use (these files must exist). You can
# override these by including one of the net-*.yaml environment files,
# such as net-bond-with-vlans-v6.yaml, or modifying the list here.
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig:
../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
parameter_defaults:
# This section is where deployment-specific configuration is done
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.168.24.254
EC2MetadataIp: 192.168.24.1 # Generally the IP of the Undercloud
# Customize the IP subnets to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{%- if network.name != 'Tenant' %}
{{network.name}}NetCidr: '{{network.ipv6_subnet}}'
{%- else %}
# Tenant tunneling network is IPv4 until IPv6 is fully supported
{{network.name}}NetCidr: '{{network.ip_subnet}}'
{%- endif %}
{%- endfor %}
# Customize the VLAN IDs to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endfor %}
# Customize the IP ranges on each network to use for static IPs and VIPs
{%- for network in networks if network.enabled|default(true) %}
{%- if network.name == 'External' %}
# Leave room if the external network is also used for floating IPs
{%- endif %}
{%- if network.name != 'Tenant' %}
{{network.name}}AllocationPools: {{network.ipv6_allocation_pools}}
{%- else %}
# Tenant tunneling network should be IPv4
{{network.name}}AllocationPools: {{network.ip_allocation_pools}}
{%- endif %}
{%- endfor %}
# Gateway routers for routable networks
{%- for network in networks if network.enabled|default(true) and network.gateway_ipv6|default(false) %}
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ipv6}}'
{%- endfor %}
{#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #}
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["8.8.8.8","8.8.4.4"]
# List of Neutron network types for tenant networks (will be used in order)
NeutronNetworkType: 'vxlan,vlan'
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: 'vxlan'
# Neutron VLAN ranges per network, for example 'datacentre:1:499,tenant:500:1000':
NeutronNetworkVLANRanges: 'datacentre:1:1000'
# Customize bonding options, e.g. "mode=4 lacp_rate=1 updelay=1000 miimon=100"
# for Linux bonds w/LACP, or "bond_mode=active-backup" for OVS active/backup.
BondInterfaceOvsOptions: "bond_mode=active-backup"

60
environments/network-environment-v6.yaml

@ -1,60 +0,0 @@
#This file is an example of an environment file for defining the isolated
#networks and related parameters.
resource_registry:
# Network Interface templates to use (these files must exist)
OS::TripleO::BlockStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig:
../network/config/single-nic-vlans/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig:
../network/config/single-nic-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/ceph-storage.yaml
parameter_defaults:
# This section is where deployment-specific configuration is done
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.168.24.254
EC2MetadataIp: 192.168.24.1 # Generally the IP of the Undercloud
# Customize the IP subnets to match the local environment
InternalApiNetCidr: 'fd00:fd00:fd00:2000::/64'
StorageNetCidr: 'fd00:fd00:fd00:3000::/64'
StorageMgmtNetCidr: 'fd00:fd00:fd00:4000::/64'
# Tenant tunneling network is IPv4 until IPv6 is fully supported
TenantNetCidr: 172.16.0.0/24
ExternalNetCidr: '2001:db8:fd00:1000::/64'
# Customize the VLAN IDs to match the local environment
InternalApiNetworkVlanID: 20
StorageNetworkVlanID: 30
StorageMgmtNetworkVlanID: 40
TenantNetworkVlanID: 50
ExternalNetworkVlanID: 10
# Customize the IP ranges on each network to use for static IPs and VIPs
InternalApiAllocationPools: [{'start': 'fd00:fd00:fd00:2000::10', 'end': 'fd00:fd00:fd00:2000:ffff:ffff:ffff:fffe'}]
StorageAllocationPools: [{'start': 'fd00:fd00:fd00:3000::10', 'end': 'fd00:fd00:fd00:3000:ffff:ffff:ffff:fffe'}]
StorageMgmtAllocationPools: [{'start': 'fd00:fd00:fd00:4000::10', 'end': 'fd00:fd00:fd00:4000:ffff:ffff:ffff:fffe'}]
TenantAllocationPools: [{'start': '172.16.0.10', 'end': '172.16.0.200'}]
# Leave room if the external network is also used for floating IPs
ExternalAllocationPools: [{'start': '2001:db8:fd00:1000::10', 'end': '2001:db8:fd00:1000:ffff:ffff:ffff:fffe'}]
# Gateway router for the external network
ExternalInterfaceDefaultRoute: '2001:db8:fd00:1000::1'
# Uncomment if using the Management Network (see network-management-v6.yaml)
# ManagementNetCidr: 'fd00:fd00:fd00:6000::/64'
# ManagementAllocationPools: [{'start': 'fd00:fd00:fd00:6000::10', 'end': 'fd00:fd00:fd00:6000:ffff:ffff:ffff:fffe'}]
# Use either this parameter or ControlPlaneDefaultRoute in the NIC templates
# ManagementInterfaceDefaultRoute: 'fd00:fd00:fd00:6000::1'
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["8.8.8.8","8.8.4.4"]
# List of Neutron network types for tenant networks (will be used in order)
NeutronNetworkType: 'vxlan,vlan'
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: 'vxlan'
# Neutron VLAN ranges per network, for example 'datacentre:1:499,tenant:500:1000':
NeutronNetworkVLANRanges: 'datacentre:1:1000'
# Customize bonding options, e.g. "mode=4 lacp_rate=1 updelay=1000 miimon=100"
# for Linux bonds w/LACP, or "bond_mode=active-backup" for OVS active/backup.
BondInterfaceOvsOptions: "bond_mode=active-backup"

61
environments/network-environment.j2.yaml

@ -0,0 +1,61 @@
#This file is an example of an environment file for defining the isolated
#networks and related parameters.
resource_registry:
# Network Interface templates to use (these files must exist). You can
# override these by including one of the net-*.yaml environment files,
# such as net-bond-with-vlans.yaml, or modifying the list here.
{%- for role in roles %}
# Port assignments for the {{role.name}}
OS::TripleO::{{role.name}}::Net::SoftwareConfig:
../network/config/single-nic-vlans/{{role.deprecated_nic_config_name|default(role.name.lower().yaml)}}
{%- endfor %}
parameter_defaults:
# This section is where deployment-specific configuration is done
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.168.24.254
EC2MetadataIp: 192.168.24.1 # Generally the IP of the Undercloud
# Customize the IP subnets to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{%- if network.ipv6|default(false) %}
{{network.name}}NetCidr: '{{network.ipv6_subnet}}'
{%- else %}
{{network.name}}NetCidr: '{{network.ip_subnet}}'
{%- endif %}
{%- endfor %}
# Customize the VLAN IDs to match the local environment
{%- for network in networks if network.enabled|default(true) %}
{{network.name}}NetworkVlanID: {{network.vlan}}
{%- endfor %}
{%- for network in networks if network.enabled|default(true) %}
{%- if network.name == 'External' %}
# Leave room if the external network is also used for floating IPs
{%- endif %}
{%- if network.ipv6|default(false) %}
{{network.name}}AllocationPools: {{network.ipv6_allocation_pools}}
{%- else %}
{{network.name}}AllocationPools: {{network.allocation_pools}}
{%- endif %}
{%- endfor %}
# Gateway routers for routable networks
{%- for network in networks if network.enabled|default(true) %}
{%- if network.ipv6|default(false) and network.gateway_ipv6|default(false) %}
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ipv6}}'
{%- elif network.gateway_ip|default(false) %}
{{network.name}}InterfaceDefaultRoute: '{{network.gateway_ip}}'
{%- endif %}
{%- endfor %}
{#- FIXME: These global parameters should be defined in a YAML file, e.g. network_data.yaml. #}
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["8.8.8.8","8.8.4.4"]
# List of Neutron network types for tenant networks (will be used in order)
NeutronNetworkType: 'vxlan,vlan'
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: 'vxlan'
# Neutron VLAN ranges per network, for example 'datacentre:1:499,tenant:500:1000':
NeutronNetworkVLANRanges: 'datacentre:1:1000'
# Customize bonding options, e.g. "mode=4 lacp_rate=1 updelay=1000 miimon=100"
# for Linux bonds w/LACP, or "bond_mode=active-backup" for OVS active/backup.
BondInterfaceOvsOptions: "bond_mode=active-backup"

59
environments/network-environment.yaml

@ -1,59 +0,0 @@
#This file is an example of an environment file for defining the isolated
#networks and related parameters.
resource_registry:
# Network Interface templates to use (these files must exist)
OS::TripleO::BlockStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/cinder-storage.yaml
OS::TripleO::Compute::Net::SoftwareConfig:
../network/config/single-nic-vlans/compute.yaml
OS::TripleO::Controller::Net::SoftwareConfig:
../network/config/single-nic-vlans/controller.yaml
OS::TripleO::ObjectStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/swift-storage.yaml
OS::TripleO::CephStorage::Net::SoftwareConfig:
../network/config/single-nic-vlans/ceph-storage.yaml
parameter_defaults:
# This section is where deployment-specific configuration is done
# CIDR subnet mask length for provisioning network
ControlPlaneSubnetCidr: '24'
# Gateway router for the provisioning network (or Undercloud IP)
ControlPlaneDefaultRoute: 192.168.24.254
EC2MetadataIp: 192.168.24.1 # Generally the IP of the Undercloud
# Customize the IP subnets to match the local environment
InternalApiNetCidr: 172.17.0.0/24
StorageNetCidr: 172.18.0.0/24
StorageMgmtNetCidr: 172.19.0.0/24
TenantNetCidr: 172.16.0.0/24
ExternalNetCidr: 10.0.0.0/24
# Customize the VLAN IDs to match the local environment
InternalApiNetworkVlanID: 20
StorageNetworkVlanID: 30
StorageMgmtNetworkVlanID: 40
TenantNetworkVlanID: 50
ExternalNetworkVlanID: 10
# Customize the IP ranges on each network to use for static IPs and VIPs
InternalApiAllocationPools: [{'start': '172.17.0.10', 'end': '172.17.0.200'}]
StorageAllocationPools: [{'start': '172.18.0.10', 'end': '172.18.0.200'}]
StorageMgmtAllocationPools: [{'start': '172.19.0.10', 'end': '172.19.0.200'}]
TenantAllocationPools: [{'start': '172.16.0.10', 'end': '172.16.0.200'}]
# Leave room if the external network is also used for floating IPs
ExternalAllocationPools: [{'start': '10.0.0.10', 'end': '10.0.0.50'}]
# Gateway router for the external network
ExternalInterfaceDefaultRoute: 10.0.0.1
# Uncomment if using the Management Network (see network-management.yaml)
# ManagementNetCidr: 10.0.1.0/24
# ManagementAllocationPools: [{'start': '10.0.1.10', 'end': '10.0.1.50'}]
# Use either this parameter or ControlPlaneDefaultRoute in the NIC templates
# ManagementInterfaceDefaultRoute: 10.0.1.1
# Define the DNS servers (maximum 2) for the overcloud nodes
DnsServers: ["8.8.8.8","8.8.4.4"]
# List of Neutron network types for tenant networks (will be used in order)
NeutronNetworkType: 'vxlan,vlan'
# The tunnel type for the tenant network (vxlan or gre). Set to '' to disable tunneling.
NeutronTunnelTypes: 'vxlan'
# Neutron VLAN ranges per network, for example 'datacentre:1:499,tenant:500:1000':
NeutronNetworkVLANRanges: 'datacentre:1:1000'
# Customize bonding options, e.g. "mode=4 lacp_rate=1 updelay=1000 miimon=100"
# for Linux bonds w/LACP, or "bond_mode=active-backup" for OVS active/backup.
BondInterfaceOvsOptions: "bond_mode=active-backup"

5
environments/network-isolation-v6.j2.yaml

@ -6,6 +6,11 @@
{%- endif -%}
{%- endfor -%}
{%- set primary_role_name = primary_role[0].name -%}
# NOTE: This template is now deprecated, and is only included for compatibility
# when upgrading a deployment where this template was originally used. For new
# deployments, set "ipv6: true" on desired networks in network_data.yaml, and
# include network-isolation.yaml.
#
# Enable the creation of Neutron networks for isolated Overcloud
# traffic and configure each role to assign ports (related
# to that role) on these networks.

27
net-config-bond.yaml → net-config-bond.j2.yaml

@ -16,30 +16,12 @@ parameters:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
@ -71,4 +53,3 @@ outputs:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl

28
net-config-bridge.yaml → net-config-bridge.j2.yaml

@ -1,35 +1,17 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge.
Software Config to drive os-net-config for a simple interface on a bridge.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig

28
net-config-linux-bridge.yaml → net-config-linux-bridge.j2.yaml

@ -1,35 +1,17 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge.
Software Config to drive os-net-config for a simple linux bridge.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
ControlPlaneDefaultRoute: # Override this via parameter_defaults
description: The default route of the control plane network.
type: string

29
net-config-noop.j2.yaml

@ -0,0 +1,29 @@
heat_template_version: queens
description: >
Software Config to no-op for os-net-config. Using this will allow you
to use the parameter driven (init-neutron-ovs) configuration instead.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: apply-config
config: {}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}

47
net-config-noop.yaml

@ -1,47 +0,0 @@
heat_template_version: queens
description: >
Software Config to no-op for os-net-config. Using this will allow you
to use the parameter driven (init-neutron-ovs) configuration instead.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::StructuredConfig
properties:
group: apply-config
config: {}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value: {get_resource: OsNetConfigImpl}

30
net-config-static-bridge-with-external-dhcp.yaml → net-config-static-bridge-with-external-dhcp.j2.yaml

@ -1,35 +1,18 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge configured with a static IP address for the ctlplane network.
Software Config to drive os-net-config for a simple bridge configured with
external DHCP and a static IP address for the ctlplane network.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
@ -84,4 +67,3 @@ outputs:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl

29
net-config-static-bridge.yaml → net-config-static-bridge.j2.yaml

@ -1,35 +1,18 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge configured with a static IP address for the ctlplane network.
Software Config to drive os-net-config for a simple bridge configured with a
static IP address for the ctlplane network.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.

28
net-config-static.yaml → net-config-static.j2.yaml

@ -1,35 +1,17 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge.
Software Config to drive os-net-config for a simple interface with DHCP.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.

29
net-config-undercloud.yaml → net-config-undercloud.j2.yaml

@ -1,35 +1,18 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config for a simple bridge configured with a static IP address for the ctlplane network.
Software Config to drive os-net-config for a simple bridge configured with a
static IP address for the ctlplane network.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet:
default: ''
description: IP address/subnet on the management network
description: IP address/subnet on the {{network.name_lower}} network
type: string
{%- endfor %}
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.

14
network/config/bond-with-vlans/README.md

@ -1,5 +1,5 @@
This directory contains Heat templates to help configure
Vlans on a bonded pair of NICs for each Overcloud role.
VLANs on a bonded pair of NICs for each Overcloud role.
There are two versions of the controller role template, one with
an external network interface, and another without. If the
@ -33,8 +33,10 @@ Same as above except set the following value for the controller role:
Configuration with System Management Network
--------------------------------------------
To enable the optional System Management network, create a Heat environment
that looks something like this:
The Management network is included for upgrade compatibility with
previous versions, but disabled. To enable the optional System
Management network, create a Heat environment that looks something like
this:
resource\_registry:
OS::TripleO::Network::Management: ../network/management.yaml
@ -47,3 +49,9 @@ that looks something like this:
Or use this Heat environment file:
environments/network-management.yaml
Or, enable the Management network in network_data.yaml, and add the network
to the list of networks used by each role in the role definition file
(e.g. roles_data.yaml). Refer to installation documentation for procedure
to generate a role file for custom roles.

165
network/config/bond-with-vlans/ceph-storage.yaml

@ -1,165 +0,0 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config with 2 bonded nics on a bridge with VLANs attached for the ceph storage role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
BondInterfaceOvsOptions:
default: ''
description: 'The ovs_options or bonding_options string for the bond
interface. Set things like lacp=active and/or bond_mode=balance-slb
for OVS bonds or like mode=4 for Linux bonds using this option.'
type: string
constraints:
- allowed_pattern: ^((?!balance.tcp).)*$
description: 'The balance-tcp bond mode is known to cause packet loss and
should not be used in BondInterfaceOvsOptions.'
ExternalNetworkVlanID:
default: 10
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: 20
description: Vlan ID for the internal_api network traffic.
type: number
StorageNetworkVlanID:
default: 30
description: Vlan ID for the storage network traffic.
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
ControlPlaneDefaultRoute: # Override this via parameter_defaults
description: The default route of the control plane network.
type: string
ExternalInterfaceDefaultRoute: # Not used by default in this template
default: 10.0.0.1
description: The default route of the external network.
type: string
ManagementInterfaceDefaultRoute: # Commented out by default in this template
default: unset
description: The default route of the management network.
type: string
DnsServers: # Override this via parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this via parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: ../../scripts/run-os-net-config.sh
params:
$network_config:
network_config:
- type: interface
name: nic1
use_dhcp: false
dns_servers:
get_param: DnsServers
addresses:
- ip_netmask:
list_join:
- /
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes:
- ip_netmask: 169.254.169.254/32
next_hop:
get_param: EC2MetadataIp
- default: true
next_hop:
get_param: ControlPlaneDefaultRoute
- type: ovs_bridge
name: br-bond
members:
- type: ovs_bond
name: bond1
ovs_options:
get_param: BondInterfaceOvsOptions
members:
- type: interface
name: nic2
primary: true
- type: interface
name: nic3
- type: vlan
device: bond1
vlan_id:
get_param: StorageNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: vlan
device: bond1
vlan_id:
get_param: StorageMgmtNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageMgmtIpSubnet
# Uncomment when including environments/network-management.yaml
# If setting default route on the Management interface, comment
# out the default route on the Control Plane.
#-
# type: vlan
# device: bond1
# vlan_id: {get_param: ManagementNetworkVlanID}
# addresses:
# -
# ip_netmask: {get_param: ManagementIpSubnet}
# routes:
# -
# default: true
# next_hop: {get_param: ManagementInterfaceDefaultRoute}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl

172
network/config/bond-with-vlans/cinder-storage.yaml

@ -1,172 +0,0 @@
heat_template_version: queens
description: >
Software Config to drive os-net-config with 2 bonded nics on a bridge with VLANs attached for the cinder storage role.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
default: ''
description: IP address/subnet on the external network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
BondInterfaceOvsOptions:
default: ''
description: 'The ovs_options or bonding_options string for the bond
interface. Set things like lacp=active and/or bond_mode=balance-slb
for OVS bonds or like mode=4 for Linux bonds using this option.'
type: string
constraints:
- allowed_pattern: ^((?!balance.tcp).)*$
description: 'The balance-tcp bond mode is known to cause packet loss and
should not be used in BondInterfaceOvsOptions.'
ExternalNetworkVlanID:
default: 10
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: 20
description: Vlan ID for the internal_api network traffic.
type: number
StorageNetworkVlanID:
default: 30
description: Vlan ID for the storage network traffic.
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID:
default: 60
description: Vlan ID for the management network traffic.
type: number
ControlPlaneSubnetCidr: # Override this via parameter_defaults
default: '24'
description: The subnet CIDR of the control plane network.
type: string
ControlPlaneDefaultRoute: # Override this via parameter_defaults
description: The default route of the control plane network.
type: string
ExternalInterfaceDefaultRoute: # Not used by default in this template
default: 10.0.0.1
description: The default route of the external network.
type: string
ManagementInterfaceDefaultRoute: # Commented out by default in this template
default: unset
description: The default route of the management network.
type: string
DnsServers: # Override this via parameter_defaults
default: []
description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
type: comma_delimited_list
EC2MetadataIp: # Override this via parameter_defaults
description: The IP address of the EC2 metadata server.
type: string
resources:
OsNetConfigImpl:
type: OS::Heat::SoftwareConfig
properties:
group: script
config:
str_replace:
template:
get_file: ../../scripts/run-os-net-config.sh
params:
$network_config:
network_config:
- type: interface
name: nic1
use_dhcp: false
dns_servers:
get_param: DnsServers
addresses:
- ip_netmask:
list_join:
- /
- - get_param: ControlPlaneIp
- get_param: ControlPlaneSubnetCidr
routes:
- ip_netmask: 169.254.169.254/32
next_hop:
get_param: EC2MetadataIp
- default: true
next_hop:
get_param: ControlPlaneDefaultRoute
- type: ovs_bridge
name: br-bond
members:
- type: ovs_bond
name: bond1
ovs_options:
get_param: BondInterfaceOvsOptions
members:
- type: interface
name: nic2
primary: true
- type: interface
name: nic3
- type: vlan
device: bond1
vlan_id:
get_param: InternalApiNetworkVlanID
addresses:
- ip_netmask:
get_param: InternalApiIpSubnet
- type: vlan
device: bond1
vlan_id:
get_param: StorageNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageIpSubnet
- type: vlan
device: bond1
vlan_id:
get_param: StorageMgmtNetworkVlanID
addresses:
- ip_netmask:
get_param: StorageMgmtIpSubnet
# Uncomment when including environments/network-management.yaml
# If setting default route on the Management interface, comment
# out the default route on the Control Plane.
#-
# type: vlan
# device: bond1
# vlan_id: {get_param: ManagementNetworkVlanID}
# addresses:
# -
# ip_netmask: {get_param: ManagementIpSubnet}
# routes:
# -
# default: true
# next_hop: {get_param: ManagementInterfaceDefaultRoute}
outputs:
OS::stack_id:
description: The OsNetConfigImpl resource.
value:
get_resource: OsNetConfigImpl

82
network/config/bond-with-vlans/compute-dpdk.yaml → network/config/bond-with-vlans/compute-dpdk.j2.yaml

@ -1,64 +1,27 @@
# NOTE: This legacy template configures the Compute role for using OVS DPDK.
# This template is included for upgrades that originally used this file.
# If you are deploying a new installation, you should enable the ComputeOvsDpdk
# role and use compute-ovs-dpdk.yaml instead.
heat_template_version: queens
description: >
Software Config to drive os-net-config with OVS-DPDK bond in addition to the 2 bonded NICs with VLANs attached for the compute role.
Software Config to drive os-net-config to configure VLANs for the compute role with DPDK.
parameters:
ControlPlaneIp:
default: ''
description: IP address/subnet on the ctlplane network
type: string
ExternalIpSubnet:
{%- for network in networks %}
{{network.name}}IpSubnet:
default: ''
description: IP address/subnet on the external network
description: IP address/subnet on the {{network.name_lower}} network
type: string
InternalApiIpSubnet:
default: ''
description: IP address/subnet on the internal_api network
type: string
StorageIpSubnet:
default: ''
description: IP address/subnet on the storage network
type: string
StorageMgmtIpSubnet:
default: ''
description: IP address/subnet on the storage_mgmt network
type: string
TenantIpSubnet:
default: ''
description: IP address/subnet on the tenant network
type: string
ManagementIpSubnet: # Only populated when including environments/network-management.yaml
default: ''
description: IP address/subnet on the management network
type: string
BondInterfaceOvsOptions:
default: ''
description: The bonding_options string for the bond interface. Set things like lacp=active and/or bond_mode=balance-slb using
this option. The default mode is active-backup.
type: string
ExternalNetworkVlanID:
default: 10
description: Vlan ID for the external network traffic.
type: number
InternalApiNetworkVlanID:
default: 20
description: Vlan ID for the internal_api network traffic.
type: number
StorageNetworkVlanID:
default: 30
description: Vlan ID for the storage network traffic.
type: number
StorageMgmtNetworkVlanID:
default: 40
description: Vlan ID for the storage mgmt network traffic.
type: number
TenantNetworkVlanID:
default: 50
description: Vlan ID for the tenant network traffic.
type: number
ManagementNetworkVlanID: