Merge "Add gateway_ip in OS::Neutron::Subnet"
[apex-tripleo-heat-templates.git] / network / config / multiple-nics / controller-v6.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure multiple interfaces
5   for the controller role with IPv6 on the External network. The IPv6
6   default route is on the External network, and the IPv4 default route
7   is on the Control Plane.
8
9 parameters:
10   ControlPlaneIp:
11     default: ''
12     description: IP address/subnet on the ctlplane network
13     type: string
14   ExternalIpSubnet:
15     default: ''
16     description: IP address/subnet on the external network
17     type: string
18   InternalApiIpSubnet:
19     default: ''
20     description: IP address/subnet on the internal API network
21     type: string
22   StorageIpSubnet:
23     default: ''
24     description: IP address/subnet on the storage network
25     type: string
26   StorageMgmtIpSubnet:
27     default: ''
28     description: IP address/subnet on the storage mgmt network
29     type: string
30   TenantIpSubnet:
31     default: ''
32     description: IP address/subnet on the tenant network
33     type: string
34   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
35     default: ''
36     description: IP address/subnet on the management network
37     type: string
38   ExternalNetworkVlanID:
39     default: 10
40     description: Vlan ID for the external network traffic.
41     type: number
42   InternalApiNetworkVlanID:
43     default: 20
44     description: Vlan ID for the internal_api network traffic.
45     type: number
46   StorageNetworkVlanID:
47     default: 30
48     description: Vlan ID for the storage network traffic.
49     type: number
50   StorageMgmtNetworkVlanID:
51     default: 40
52     description: Vlan ID for the storage mgmt network traffic.
53     type: number
54   TenantNetworkVlanID:
55     default: 50
56     description: Vlan ID for the tenant network traffic.
57     type: number
58   ManagementNetworkVlanID:
59     default: 60
60     description: Vlan ID for the management network traffic.
61     type: number
62   ControlPlaneSubnetCidr: # Override this via parameter_defaults
63     default: '24'
64     description: The subnet CIDR of the control plane network.
65     type: string
66   ControlPlaneDefaultRoute: # Override this via parameter_defaults
67     description: The default route of the control plane network.
68     type: string
69   ExternalInterfaceDefaultRoute:
70     default: '10.0.0.1'
71     description: default route for the external network
72     type: string
73   ManagementInterfaceDefaultRoute: # Commented out by default in this template
74     default: unset
75     description: The default route of the management network.
76     type: string
77   DnsServers: # Override this via parameter_defaults
78     default: []
79     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
80     type: comma_delimited_list
81   EC2MetadataIp: # Override this via parameter_defaults
82     description: The IP address of the EC2 metadata server.
83     type: string
84
85 resources:
86   OsNetConfigImpl:
87     type: OS::Heat::StructuredConfig
88     properties:
89       group: os-apply-config
90       config:
91         os_net_config:
92           network_config:
93             -
94               type: interface
95               name: nic1
96               use_dhcp: false
97               dns_servers: {get_param: DnsServers}
98               addresses:
99                 -
100                   ip_netmask:
101                     list_join:
102                       - '/'
103                       - - {get_param: ControlPlaneIp}
104                         - {get_param: ControlPlaneSubnetCidr}
105               routes:
106                 -
107                   ip_netmask: 169.254.169.254/32
108                   next_hop: {get_param: EC2MetadataIp}
109                 # IPv4 Default Route
110                 -
111                   default: true
112                   next_hop: {get_param: ControlPlaneDefaultRoute}
113             -
114               type: interface
115               name: nic2
116               use_dhcp: false
117               addresses:
118                 -
119                   ip_netmask: {get_param: StorageIpSubnet}
120             -
121               type: interface
122               name: nic3
123               use_dhcp: false
124               addresses:
125                 -
126                   ip_netmask: {get_param: StorageMgmtIpSubnet}
127             -
128               type: interface
129               name: nic4
130               use_dhcp: false
131               addresses:
132                 -
133                   ip_netmask: {get_param: InternalApiIpSubnet}
134             -
135               # Create a bridge which can also be used for VLAN-mode bridge mapping
136               type: ovs_bridge
137               name: br-tenant
138               use_dhcp: false
139               addresses:
140                 -
141                   ip_netmask: {get_param: TenantIpSubnet}
142               members:
143                 -
144                   type: interface
145                   name: nic5
146                   use_dhcp: false
147                   # force the MAC address of the bridge to this interface
148                   primary: true
149             -
150               type: ovs_bridge
151               name: {get_input: bridge_name}
152               dns_servers: {get_param: DnsServers}
153               use_dhcp: false
154               addresses:
155                 -
156                   ip_netmask: {get_param: ExternalIpSubnet}
157               routes:
158                 # IPv6 Default Route
159                 -
160                   default: true
161                   next_hop: {get_param: ExternalInterfaceDefaultRoute}
162               members:
163                 -
164                   type: interface
165                   name: nic6
166                   # force the MAC address of the bridge to this interface
167                   primary: true
168             # Uncomment when including environments/network-management.yaml
169             # If setting default route on the Management interface, comment
170             # out the default route on the External interface. This will
171             # make the External API unreachable from remote subnets.
172             #-
173             #  type: interface
174             #  name: nic7
175             #  use_dhcp: false
176             #  addresses:
177             #    -
178             #      ip_netmask: {get_param: ManagementIpSubnet}
179             #  routes:
180             #    -
181             #      default: true
182             #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
183
184 outputs:
185   OS::stack_id:
186     description: The OsNetConfigImpl resource.
187     value: {get_resource: OsNetConfigImpl}