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 ExternalNetworkVlanID:
14 description: Vlan ID for the external network traffic.
16 InternalApiNetworkVlanID:
18 description: Vlan ID for the internal_api network traffic.
22 description: Vlan ID for the storage network traffic.
24 StorageMgmtNetworkVlanID:
26 description: Vlan ID for the storage mgmt network traffic.
30 description: Vlan ID for the tenant network traffic.
32 ManagementNetworkVlanID:
34 description: Vlan ID for the management network traffic.
36 ExternalInterfaceDefaultRoute:
38 description: default route for the external network
40 ControlPlaneSubnetCidr: # Override this via parameter_defaults
42 description: The subnet CIDR of the control plane network.
44 ControlPlaneDefaultRoute: # Override this via parameter_defaults
45 description: The default route of the control plane network.
47 DnsServers: # Override this via parameter_defaults
49 description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
50 type: comma_delimited_list
51 EC2MetadataIp: # Override this via parameter_defaults
52 description: The IP address of the EC2 metadata server.
56 description: IP address/subnet on the external network
58 ExternalInterfaceRoutes:
61 Routes for the external network traffic.
62 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
63 Unless the default is changed, the parameter is automatically resolved
64 from the subnet host_routes attribute.
68 description: IP address/subnet on the internal_api network
70 InternalApiInterfaceRoutes:
73 Routes for the internal_api network traffic.
74 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
75 Unless the default is changed, the parameter is automatically resolved
76 from the subnet host_routes attribute.
80 description: IP address/subnet on the storage network
82 StorageInterfaceRoutes:
85 Routes for the storage network traffic.
86 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
87 Unless the default is changed, the parameter is automatically resolved
88 from the subnet host_routes attribute.
92 description: IP address/subnet on the storage_mgmt network
94 StorageMgmtInterfaceRoutes:
97 Routes for the storage_mgmt network traffic.
98 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
99 Unless the default is changed, the parameter is automatically resolved
100 from the subnet host_routes attribute.
104 description: IP address/subnet on the storage_nfs network
109 Routes for the storage_nfs network traffic.
110 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
111 Unless the default is changed, the parameter is automatically resolved
112 from the subnet host_routes attribute.
116 description: IP address/subnet on the tenant network
118 TenantInterfaceRoutes:
121 Routes for the tenant network traffic.
122 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
123 Unless the default is changed, the parameter is automatically resolved
124 from the subnet host_routes attribute.
128 description: IP address/subnet on the management network
130 ManagementInterfaceRoutes:
133 Routes for the management network traffic.
134 JSON route e.g. [{'destination':'10.0.0.0/16', 'nexthop':'10.0.0.1'}]
135 Unless the default is changed, the parameter is automatically resolved
136 from the subnet host_routes attribute.
141 type: OS::Heat::SoftwareConfig
147 get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
152 {%- 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 %}
154 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
162 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
163 # force the MAC address of the bridge to this interface
165 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
168 vlan_id: {get_param: ExternalNetworkVlanID}
171 ip_netmask: {get_param: ExternalIpSubnet}
175 next_hop: {get_param: ExternalInterfaceDefaultRoute}
177 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
180 vlan_id: {get_param: TenantNetworkVlanID}
183 ip_netmask: {get_param: TenantIpSubnet}
185 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
188 vlan_id: {get_param: StorageNetworkVlanID}
191 ip_netmask: {get_param: StorageIpSubnet}
193 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
196 vlan_id: {get_param: InternalApiNetworkVlanID}
199 ip_netmask: {get_param: InternalApiIpSubnet}
202 type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }}
203 {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %}
208 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
211 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
215 dns_servers: {get_param: DnsServers}
221 - - {get_param: ControlPlaneIp}
222 - {get_param: ControlPlaneSubnetCidr}
225 ip_netmask: 169.254.169.254/32
226 next_hop: {get_param: EC2MetadataIp}
227 {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
230 next_hop: {get_param: ControlPlaneDefaultRoute}
233 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
234 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
236 type: ovs_user_bridge
237 name: {{ ovs_dpdk_bridge }}
241 ip_netmask: {get_param: TenantIpSubnet}
246 driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
250 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
251 # force the MAC address of the bridge to this interface
253 {%- elif nets['tenant']['segmentation_type'] == 'vlan' %}
259 ip_netmask: {get_param: TenantIpSubnet}
263 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
267 type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
268 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
269 {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
270 uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
272 {%- if 'interface-options' in nets['tenant']['nic_mapping'][role] %}
273 options: '{{ nets['tenant']['nic_mapping'][role]['interface-options'] }}'
278 ip_netmask: {get_param: TenantIpSubnet}
281 {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
283 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
284 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
285 {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
286 uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
288 {%- if role == 'controller' %}
289 dns_servers: {get_param: DnsServers}
294 ip_netmask: {get_param: ExternalIpSubnet}
297 {%- if role == 'controller' %}
300 ip_netmask: 0.0.0.0/0
301 next_hop: {get_param: ExternalInterfaceDefaultRoute}
302 {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
304 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
305 type: ovs_user_bridge
307 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
314 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
315 # force the MAC address of the bridge to this interface
317 dns_servers: {get_param: DnsServers}
320 ip_netmask: {get_param: ExternalIpSubnet}
324 ip_netmask: 0.0.0.0/0
325 next_hop: {get_param: ExternalInterfaceDefaultRoute}
327 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
330 name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
334 ip_netmask: {get_param: StorageIpSubnet}
336 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
339 name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
343 ip_netmask: {get_param: InternalApiIpSubnet}
348 description: The OsNetConfigImpl resource.
349 value: {get_resource: OsNetConfigImpl}