1 heat_template_version: 2016-10-14
4 Software Config to drive os-net-config to configure multiple interfaces
5 for the {{ role }} role.
10 description: IP address/subnet on the ctlplane network
12 ControlPlaneStaticRoutes:
15 Routes for the ctlplane network traffic.
16 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
17 Unless the default is changed, the parameter is automatically resolved
18 from the subnet host_routes attribute.
20 ExternalNetworkVlanID:
22 description: Vlan ID for the external network traffic.
24 InternalApiNetworkVlanID:
26 description: Vlan ID for the internal_api network traffic.
30 description: Vlan ID for the storage network traffic.
32 StorageMgmtNetworkVlanID:
34 description: Vlan ID for the storage mgmt network traffic.
38 description: Vlan ID for the tenant network traffic.
40 ManagementNetworkVlanID:
42 description: Vlan ID for the management network traffic.
44 ExternalInterfaceDefaultRoute:
46 description: default route for the external network
48 ControlPlaneSubnetCidr: # Override this via parameter_defaults
50 description: The subnet CIDR of the control plane network.
52 ControlPlaneDefaultRoute: # Override this via parameter_defaults
53 description: The default route of the control plane network.
55 DnsServers: # Override this via parameter_defaults
57 description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
58 type: comma_delimited_list
59 EC2MetadataIp: # Override this via parameter_defaults
60 description: The IP address of the EC2 metadata server.
64 description: IP address/subnet on the external network
66 ExternalInterfaceRoutes:
69 Routes for the external network traffic.
70 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
71 Unless the default is changed, the parameter is automatically resolved
72 from the subnet host_routes attribute.
76 description: IP address/subnet on the internal_api network
78 InternalApiInterfaceRoutes:
81 Routes for the internal_api network traffic.
82 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
83 Unless the default is changed, the parameter is automatically resolved
84 from the subnet host_routes attribute.
88 description: IP address/subnet on the storage network
90 StorageInterfaceRoutes:
93 Routes for the storage network traffic.
94 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
95 Unless the default is changed, the parameter is automatically resolved
96 from the subnet host_routes attribute.
100 description: IP address/subnet on the storage_mgmt network
102 StorageMgmtInterfaceRoutes:
105 Routes for the storage_mgmt network traffic.
106 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
107 Unless the default is changed, the parameter is automatically resolved
108 from the subnet host_routes attribute.
112 description: IP address/subnet on the storage_nfs network
117 Routes for the storage_nfs network traffic.
118 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
119 Unless the default is changed, the parameter is automatically resolved
120 from the subnet host_routes attribute.
124 description: IP address/subnet on the tenant network
126 TenantInterfaceRoutes:
129 Routes for the tenant network traffic.
130 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
131 Unless the default is changed, the parameter is automatically resolved
132 from the subnet host_routes attribute.
136 description: IP address/subnet on the management network
138 ManagementInterfaceRoutes:
141 Routes for the management network traffic.
142 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
143 Unless the default is changed, the parameter is automatically resolved
144 from the subnet host_routes attribute.
149 type: OS::Heat::SoftwareConfig
155 get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
160 {%- if not nets['external'][0]['enabled'] or nets['tenant']['nic_mapping'][role]['vlan'] is number or nets['storage']['nic_mapping'][role]['vlan'] is number or nets['api']['nic_mapping'][role]['vlan'] is number or nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
162 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
170 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
171 # force the MAC address of the bridge to this interface
173 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
176 vlan_id: {get_param: ExternalNetworkVlanID}
179 ip_netmask: {get_param: ExternalIpSubnet}
183 next_hop: {get_param: ExternalInterfaceDefaultRoute}
185 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
188 vlan_id: {get_param: TenantNetworkVlanID}
191 ip_netmask: {get_param: TenantIpSubnet}
193 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
196 vlan_id: {get_param: StorageNetworkVlanID}
199 ip_netmask: {get_param: StorageIpSubnet}
201 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
204 vlan_id: {get_param: InternalApiNetworkVlanID}
207 ip_netmask: {get_param: InternalApiIpSubnet}
210 type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }}
211 {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %}
216 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
219 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
223 dns_servers: {get_param: DnsServers}
229 - - {get_param: ControlPlaneIp}
230 - {get_param: ControlPlaneSubnetCidr}
233 ip_netmask: 169.254.169.254/32
234 next_hop: {get_param: EC2MetadataIp}
235 {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
238 next_hop: {get_param: ControlPlaneDefaultRoute}
241 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
242 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
244 type: ovs_user_bridge
245 name: {{ ovs_dpdk_bridge }}
249 ip_netmask: {get_param: TenantIpSubnet}
254 driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
258 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
259 # force the MAC address of the bridge to this interface
261 {%- elif nets['tenant']['segmentation_type'] == 'vlan' %}
267 ip_netmask: {get_param: TenantIpSubnet}
271 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
275 type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
276 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
277 {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
278 uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
280 {%- if 'interface-options' in nets['tenant']['nic_mapping'][role] %}
281 options: '{{ nets['tenant']['nic_mapping'][role]['interface-options'] }}'
286 ip_netmask: {get_param: TenantIpSubnet}
289 {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
291 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
292 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
293 {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
294 uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
296 {%- if role == 'controller' %}
297 dns_servers: {get_param: DnsServers}
302 ip_netmask: {get_param: ExternalIpSubnet}
305 {%- if role == 'controller' %}
308 ip_netmask: 0.0.0.0/0
309 next_hop: {get_param: ExternalInterfaceDefaultRoute}
310 {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
312 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
313 type: ovs_user_bridge
315 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
322 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
323 # force the MAC address of the bridge to this interface
325 dns_servers: {get_param: DnsServers}
328 ip_netmask: {get_param: ExternalIpSubnet}
332 ip_netmask: 0.0.0.0/0
333 next_hop: {get_param: ExternalInterfaceDefaultRoute}
335 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
338 name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
342 ip_netmask: {get_param: StorageIpSubnet}
344 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
347 name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
351 ip_netmask: {get_param: InternalApiIpSubnet}
356 description: The OsNetConfigImpl resource.
357 value: {get_resource: OsNetConfigImpl}