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
14 description: IP address/subnet on the external network
18 description: IP address/subnet on the internal API network
22 description: IP address/subnet on the storage network
26 description: IP address/subnet on the storage mgmt network
30 description: IP address/subnet on the tenant network
32 ManagementIpSubnet: # Only populated when including environments/network-management.yaml
34 description: IP address/subnet on the management network
36 ExternalNetworkVlanID:
38 description: Vlan ID for the external network traffic.
40 InternalApiNetworkVlanID:
42 description: Vlan ID for the internal_api network traffic.
46 description: Vlan ID for the storage network traffic.
48 StorageMgmtNetworkVlanID:
50 description: Vlan ID for the storage mgmt network traffic.
54 description: Vlan ID for the tenant network traffic.
56 ManagementNetworkVlanID:
58 description: Vlan ID for the management network traffic.
60 ExternalInterfaceDefaultRoute:
62 description: default route for the external network
64 ControlPlaneSubnetCidr: # Override this via parameter_defaults
66 description: The subnet CIDR of the control plane network.
68 ControlPlaneDefaultRoute: # Override this via parameter_defaults
69 description: The default route of the control plane network.
71 DnsServers: # Override this via parameter_defaults
73 description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
74 type: comma_delimited_list
75 EC2MetadataIp: # Override this via parameter_defaults
76 description: The IP address of the EC2 metadata server.
81 type: OS::Heat::SoftwareConfig
87 get_file: /usr/share/openstack-tripleo-heat-templates/network/scripts/run-os-net-config.sh
92 {%- 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 %}
94 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
102 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
103 # force the MAC address of the bridge to this interface
105 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
108 vlan_id: {get_param: ExternalNetworkVlanID}
111 ip_netmask: {get_param: ExternalIpSubnet}
115 next_hop: {get_param: ExternalInterfaceDefaultRoute}
117 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
120 vlan_id: {get_param: TenantNetworkVlanID}
123 ip_netmask: {get_param: TenantIpSubnet}
125 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
128 vlan_id: {get_param: StorageNetworkVlanID}
131 ip_netmask: {get_param: StorageIpSubnet}
133 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
136 vlan_id: {get_param: InternalApiNetworkVlanID}
139 ip_netmask: {get_param: InternalApiIpSubnet}
142 type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }}
143 {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %}
148 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
151 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
155 dns_servers: {get_param: DnsServers}
161 - - {get_param: ControlPlaneIp}
162 - {get_param: ControlPlaneSubnetCidr}
165 ip_netmask: 169.254.169.254/32
166 next_hop: {get_param: EC2MetadataIp}
167 {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
170 next_hop: {get_param: ControlPlaneDefaultRoute}
173 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
174 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
176 type: ovs_user_bridge
177 name: {{ ovs_dpdk_bridge }}
181 ip_netmask: {get_param: TenantIpSubnet}
186 driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
190 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
191 # force the MAC address of the bridge to this interface
193 {%- elif nets['tenant']['segmentation_type'] == 'vlan' %}
199 ip_netmask: {get_param: TenantIpSubnet}
203 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
207 type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
208 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
209 {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
210 uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
212 {%- if 'interface-options' in nets['tenant']['nic_mapping'][role] %}
213 options: '{{ nets['tenant']['nic_mapping'][role]['interface-options'] }}'
218 ip_netmask: {get_param: TenantIpSubnet}
221 {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
223 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
224 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
225 {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
226 uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
228 {%- if role == 'controller' %}
229 dns_servers: {get_param: DnsServers}
234 ip_netmask: {get_param: ExternalIpSubnet}
237 {%- if role == 'controller' %}
240 ip_netmask: 0.0.0.0/0
241 next_hop: {get_param: ExternalInterfaceDefaultRoute}
242 {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
244 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
245 type: ovs_user_bridge
247 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
254 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
255 # force the MAC address of the bridge to this interface
257 dns_servers: {get_param: DnsServers}
260 ip_netmask: {get_param: ExternalIpSubnet}
264 ip_netmask: 0.0.0.0/0
265 next_hop: {get_param: ExternalInterfaceDefaultRoute}
267 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
270 name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
274 ip_netmask: {get_param: StorageIpSubnet}
276 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
279 name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
283 ip_netmask: {get_param: InternalApiIpSubnet}
288 description: The OsNetConfigImpl resource.
289 value: {get_resource: OsNetConfigImpl}