Merge "Use Redis VIP when deploying with keepalived"
[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                 # IPv4 Default Route
119                 -
120                   default: true
121                   next_hop: {get_param: ControlPlaneDefaultRoute}
122             -
123               type: ovs_bridge
124               name: {get_input: bridge_name}
125               dns_servers: {get_param: DnsServers}
126               members:
127                 -
128                   type: ovs_bond
129                   name: bond1
130                   ovs_options: {get_param: BondInterfaceOvsOptions}
131                   members:
132                     -
133                       type: interface
134                       name: nic2
135                       primary: true
136                     -
137                       type: interface
138                       name: nic3
139                 -
140                   type: vlan
141                   device: bond1
142                   vlan_id: {get_param: ExternalNetworkVlanID}
143                   addresses:
144                     -
145                       ip_netmask: {get_param: ExternalIpSubnet}
146                   routes:
147                     # IPv6 Default Route
148                     -
149                       default: true
150                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
151                 -
152                   type: vlan
153                   device: bond1
154                   vlan_id: {get_param: InternalApiNetworkVlanID}
155                   addresses:
156                     -
157                       ip_netmask: {get_param: InternalApiIpSubnet}
158                 -
159                   type: vlan
160                   device: bond1
161                   vlan_id: {get_param: StorageNetworkVlanID}
162                   addresses:
163                     -
164                       ip_netmask: {get_param: StorageIpSubnet}
165                 -
166                   type: vlan
167                   device: bond1
168                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
169                   addresses:
170                     -
171                       ip_netmask: {get_param: StorageMgmtIpSubnet}
172                 -
173                   type: vlan
174                   device: bond1
175                   vlan_id: {get_param: TenantNetworkVlanID}
176                   addresses:
177                     -
178                       ip_netmask: {get_param: TenantIpSubnet}
179                 # Uncomment when including environments/network-management.yaml
180                 # If setting default route on the Management interface, comment
181                 # out the default route on the External interface. This will
182                 # make the External API unreachable from remote subnets.
183                 #-
184                 #  type: vlan
185                 #  device: bond1
186                 #  vlan_id: {get_param: ManagementNetworkVlanID}
187                 #  addresses:
188                 #    -
189                 #      ip_netmask: {get_param: ManagementIpSubnet}
190                 #  routes:
191                 #    -
192                 #      default: true
193                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
194
195 outputs:
196   OS::stack_id:
197     description: The OsNetConfigImpl resource.
198     value: {get_resource: OsNetConfigImpl}