Merge "adding swift middleware that is typically enabled by default"
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / controller-v6.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config with 2 bonded nics on a bridge
5   with VLANs attached for the controller role with IPv6 on the External
6   network. The IPv6 default route is on the External network, and the
7   IPv4 default route 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   BondInterfaceOvsOptions:
39     default: 'bond_mode=active-backup'
40     description: The ovs_options string for the bond interface. Set things like
41                  lacp=active and/or bond_mode=balance-slb using this option.
42     type: string
43     constraints:
44       - allowed_pattern: "^((?!balance.tcp).)*$"
45         description: |
46           The balance-tcp bond mode is known to cause packet loss and
47           should not be used in BondInterfaceOvsOptions.
48   ExternalNetworkVlanID:
49     default: 10
50     description: Vlan ID for the external network traffic.
51     type: number
52   InternalApiNetworkVlanID:
53     default: 20
54     description: Vlan ID for the internal_api network traffic.
55     type: number
56   StorageNetworkVlanID:
57     default: 30
58     description: Vlan ID for the storage network traffic.
59     type: number
60   StorageMgmtNetworkVlanID:
61     default: 40
62     description: Vlan ID for the storage mgmt network traffic.
63     type: number
64   TenantNetworkVlanID:
65     default: 50
66     description: Vlan ID for the tenant network traffic.
67     type: number
68   ManagementNetworkVlanID:
69     default: 60
70     description: Vlan ID for the management network traffic.
71     type: number
72   ControlPlaneSubnetCidr: # Override this via parameter_defaults
73     default: '24'
74     description: The subnet CIDR of the control plane network.
75     type: string
76   ControlPlaneDefaultRoute: # Override this via parameter_defaults
77     description: The default route of the control plane network.
78     type: string
79   ExternalInterfaceDefaultRoute:
80     default: '10.0.0.1'
81     description: default route for the external network
82     type: string
83   ManagementInterfaceDefaultRoute: # Commented out by default in this template
84     default: unset
85     description: The default route of the management network.
86     type: string
87   DnsServers: # Override this via parameter_defaults
88     default: []
89     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
90     type: comma_delimited_list
91   EC2MetadataIp: # Override this via parameter_defaults
92     description: The IP address of the EC2 metadata server.
93     type: string
94
95 resources:
96   OsNetConfigImpl:
97     type: OS::Heat::StructuredConfig
98     properties:
99       group: os-apply-config
100       config:
101         os_net_config:
102           network_config:
103             -
104               type: interface
105               name: nic1
106               use_dhcp: false
107               addresses:
108                 -
109                   ip_netmask:
110                     list_join:
111                       - '/'
112                       - - {get_param: ControlPlaneIp}
113                         - {get_param: ControlPlaneSubnetCidr}
114               routes:
115                 -
116                   ip_netmask: 169.254.169.254/32
117                   next_hop: {get_param: EC2MetadataIp}
118                 -
119                   default: true
120                   next_hop: {get_param: ControlPlaneDefaultRoute}
121             -
122               type: ovs_bridge
123               name: {get_input: bridge_name}
124               dns_servers: {get_param: DnsServers}
125               members:
126                 -
127                   type: ovs_bond
128                   name: bond1
129                   ovs_options: {get_param: BondInterfaceOvsOptions}
130                   members:
131                     -
132                       type: interface
133                       name: nic2
134                       primary: true
135                     -
136                       type: interface
137                       name: nic3
138                 -
139                   type: vlan
140                   device: bond1
141                   vlan_id: {get_param: ExternalNetworkVlanID}
142                   addresses:
143                     -
144                       ip_netmask: {get_param: ExternalIpSubnet}
145                   routes:
146                     -
147                       default: true
148                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
149                 -
150                   type: vlan
151                   device: bond1
152                   vlan_id: {get_param: InternalApiNetworkVlanID}
153                   addresses:
154                     -
155                       ip_netmask: {get_param: InternalApiIpSubnet}
156                 -
157                   type: vlan
158                   device: bond1
159                   vlan_id: {get_param: StorageNetworkVlanID}
160                   addresses:
161                     -
162                       ip_netmask: {get_param: StorageIpSubnet}
163                 -
164                   type: vlan
165                   device: bond1
166                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
167                   addresses:
168                     -
169                       ip_netmask: {get_param: StorageMgmtIpSubnet}
170                 -
171                   type: vlan
172                   device: bond1
173                   vlan_id: {get_param: TenantNetworkVlanID}
174                   addresses:
175                     -
176                       ip_netmask: {get_param: TenantIpSubnet}
177                 # Uncomment when including environments/network-management.yaml
178                 # If setting default route on the Management interface, comment
179                 # out the default route on the External interface. This will
180                 # make the External API unreachable from remote subnets.
181                 #-
182                 #  type: vlan
183                 #  device: bond1
184                 #  vlan_id: {get_param: ManagementNetworkVlanID}
185                 #  addresses:
186                 #    -
187                 #      ip_netmask: {get_param: ManagementIpSubnet}
188                 #  routes:
189                 #    -
190                 #      default: true
191                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
192
193 outputs:
194   OS::stack_id:
195     description: The OsNetConfigImpl resource.
196     value: {get_resource: OsNetConfigImpl}