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