1 heat_template_version: 2015-04-30
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::StructuredConfig
83 group: os-apply-config
88 {%- 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 %}
90 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
93 name: {get_input: bridge_name}
98 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
99 # force the MAC address of the bridge to this interface
101 {%- if nets['external'][0]['enabled'] and nets['external'][0]['nic_mapping'][role]['vlan'] is number %}
104 vlan_id: {get_param: ExternalNetworkVlanID}
107 ip_netmask: {get_param: ExternalIpSubnet}
111 next_hop: {get_param: ExternalInterfaceDefaultRoute}
113 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] is number %}
116 vlan_id: {get_param: TenantNetworkVlanID}
119 ip_netmask: {get_param: TenantIpSubnet}
121 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] is number %}
124 vlan_id: {get_param: StorageNetworkVlanID}
127 ip_netmask: {get_param: StorageIpSubnet}
129 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] is number %}
132 vlan_id: {get_param: InternalApiNetworkVlanID}
135 ip_netmask: {get_param: InternalApiIpSubnet}
138 type: {{ nets['admin']['nic_mapping'][role]['phys_type'] }}
139 {%- if nets['admin']['nic_mapping'][role]['phys_type'] == 'linux_bridge' %}
144 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
147 name: {{ nets['admin']['nic_mapping'][role]['members'][0] }}
151 dns_servers: {get_param: DnsServers}
157 - - {get_param: ControlPlaneIp}
158 - {get_param: ControlPlaneSubnetCidr}
161 ip_netmask: 169.254.169.254/32
162 next_hop: {get_param: EC2MetadataIp}
163 {%- if external_net_af == 6 or role == 'compute' or not nets['external'][0]['enabled'] %}
166 next_hop: {get_param: ControlPlaneDefaultRoute}
169 {%- if nets['tenant']['enabled'] and nets['tenant']['nic_mapping'][role]['vlan'] == 'native' %}
170 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
172 type: ovs_user_bridge
173 name: {{ ovs_dpdk_bridge }}
177 ip_netmask: {get_param: TenantIpSubnet}
182 driver: {{ nets['tenant']['nic_mapping'][role]['uio_driver'] }}
186 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
187 # force the MAC address of the bridge to this interface
191 type: {{ nets['tenant']['nic_mapping'][role]['phys_type'] }}
192 name: {{ nets['tenant']['nic_mapping'][role]['members'][0] }}
193 {%- if 'uio-driver' in nets['tenant']['nic_mapping'][role] %}
194 uio_driver: {{ nets['tenant']['nic_mapping'][role]['uio-driver'] }}
196 {%- if 'interface-options' in nets['tenant']['nic_mapping'][role] %}
197 options: '{{ nets['tenant']['nic_mapping'][role]['interface-options'] }}'
202 ip_netmask: {get_param: TenantIpSubnet}
205 {%- if nets['external'][0]['enabled'] and external_net_type != 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
207 type: {{ nets['external'][0]['nic_mapping'][role]['phys_type'] }}
208 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
209 {%- if 'uio-driver' in nets['external'][0]['nic_mapping'][role] %}
210 uio_driver: {{ nets['external'][0]['nic_mapping'][role]['uio-driver'] }}
212 {%- if role == 'controller' %}
213 dns_servers: {get_param: DnsServers}
218 ip_netmask: {get_param: ExternalIpSubnet}
221 {%- if role == 'controller' %}
224 ip_netmask: 0.0.0.0/0
225 next_hop: {get_param: ExternalInterfaceDefaultRoute}
226 {%- elif nets['external'][0]['enabled'] and external_net_type == 'br-ex' and nets['external'][0]['nic_mapping'][role]['vlan'] == 'native' %}
228 {%- if ovs_dpdk_bridge == 'br-phy' and role == 'compute' %}
229 type: ovs_user_bridge
233 name: {get_input: bridge_name}
238 name: {{ nets['external'][0]['nic_mapping'][role]['members'][0] }}
239 # force the MAC address of the bridge to this interface
241 {%- if role == 'controller' %}
242 dns_servers: {get_param: DnsServers}
245 ip_netmask: {get_param: ExternalIpSubnet}
249 ip_netmask: 0.0.0.0/0
250 next_hop: {get_param: ExternalInterfaceDefaultRoute}
253 {%- if nets['storage']['enabled'] and nets['storage']['nic_mapping'][role]['vlan'] == 'native' %}
256 name: {{ nets['storage']['nic_mapping'][role]['members'][0] }}
260 ip_netmask: {get_param: StorageIpSubnet}
262 {%- if nets['api']['enabled'] and nets['api']['nic_mapping'][role]['vlan'] == 'native' %}
265 name: {{ nets['api']['nic_mapping'][role]['members'][0] }}
269 ip_netmask: {get_param: InternalApiIpSubnet}
274 description: The OsNetConfigImpl resource.
275 value: {get_resource: OsNetConfigImpl}