Merge "Update the capabilities map file name to be more consistent"
[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   ExternalInterfaceDefaultRoute:
66     default: '10.0.0.1'
67     description: default route for the external network
68     type: string
69   ControlPlaneSubnetCidr: # Override this via parameter_defaults
70     default: '24'
71     description: The subnet CIDR of the control plane network.
72     type: string
73   DnsServers: # Override this via parameter_defaults
74     default: []
75     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
76     type: comma_delimited_list
77   EC2MetadataIp: # Override this via parameter_defaults
78     description: The IP address of the EC2 metadata server.
79     type: string
80
81 resources:
82   OsNetConfigImpl:
83     type: OS::Heat::StructuredConfig
84     properties:
85       group: os-apply-config
86       config:
87         os_net_config:
88           network_config:
89             -
90               type: interface
91               name: nic1
92               use_dhcp: false
93               addresses:
94                 -
95                   ip_netmask:
96                     list_join:
97                       - '/'
98                       - - {get_param: ControlPlaneIp}
99                         - {get_param: ControlPlaneSubnetCidr}
100               routes:
101                 -
102                   ip_netmask: 169.254.169.254/32
103                   next_hop: {get_param: EC2MetadataIp}
104             -
105               type: ovs_bridge
106               name: {get_input: bridge_name}
107               dns_servers: {get_param: DnsServers}
108               members:
109                 -
110                   type: ovs_bond
111                   name: bond1
112                   ovs_options: {get_param: BondInterfaceOvsOptions}
113                   members:
114                     -
115                       type: interface
116                       name: nic2
117                       primary: true
118                     -
119                       type: interface
120                       name: nic3
121                 -
122                   type: vlan
123                   device: bond1
124                   vlan_id: {get_param: ExternalNetworkVlanID}
125                   addresses:
126                     -
127                       ip_netmask: {get_param: ExternalIpSubnet}
128                   routes:
129                     -
130                       default: true
131                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
132                 -
133                   type: vlan
134                   device: bond1
135                   vlan_id: {get_param: InternalApiNetworkVlanID}
136                   addresses:
137                     -
138                       ip_netmask: {get_param: InternalApiIpSubnet}
139                 -
140                   type: vlan
141                   device: bond1
142                   vlan_id: {get_param: StorageNetworkVlanID}
143                   addresses:
144                     -
145                       ip_netmask: {get_param: StorageIpSubnet}
146                 -
147                   type: vlan
148                   device: bond1
149                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
150                   addresses:
151                     -
152                       ip_netmask: {get_param: StorageMgmtIpSubnet}
153                 -
154                   type: vlan
155                   device: bond1
156                   vlan_id: {get_param: TenantNetworkVlanID}
157                   addresses:
158                     -
159                       ip_netmask: {get_param: TenantIpSubnet}
160                 # Uncomment when including environments/network-management.yaml
161                 #-
162                 #  type: vlan
163                 #  device: bond1
164                 #  vlan_id: {get_param: ManagementNetworkVlanID}
165                 #  addresses:
166                 #    -
167                 #      ip_netmask: {get_param: ManagementIpSubnet}
168
169 outputs:
170   OS::stack_id:
171     description: The OsNetConfigImpl resource.
172     value: {get_resource: OsNetConfigImpl}