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