Add DnsServers param to network config templates
[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   BondInterfaceOvsOptions:
33     default: 'bond_mode=balance-tcp lacp=active other-config:lacp-fallback-ab=true'
34     description: The ovs_options string for the bond interface. Set things like
35                  lacp=active and/or bond_mode=balance-slb using this option.
36                  Default wil attempt LACP, but will fall back to active-backup.
37     type: string
38   ExternalNetworkVlanID:
39     default: 10
40     description: Vlan ID for the external network traffic.
41     type: number
42   InternalApiNetworkVlanID:
43     default: 20
44     description: Vlan ID for the internal_api network traffic.
45     type: number
46   StorageNetworkVlanID:
47     default: 30
48     description: Vlan ID for the storage network traffic.
49     type: number
50   StorageMgmtNetworkVlanID:
51     default: 40
52     description: Vlan ID for the storage mgmt network traffic.
53     type: number
54   TenantNetworkVlanID:
55     default: 50
56     description: Vlan ID for the tenant network traffic.
57     type: number
58   ExternalInterfaceDefaultRoute:
59     default: '10.0.0.1'
60     description: default route for the external network
61     type: string
62   ControlPlaneSubnetCidr: # Override this via parameter_defaults
63     default: '24'
64     description: The subnet CIDR of the control plane network.
65     type: string
66   DnsServers: # Override this via parameter_defaults
67     default: []
68     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
69     type: comma_delimited_list
70   EC2MetadataIp: # Override this via parameter_defaults
71     description: The IP address of the EC2 metadata server.
72     type: string
73
74 resources:
75   OsNetConfigImpl:
76     type: OS::Heat::StructuredConfig
77     properties:
78       group: os-apply-config
79       config:
80         os_net_config:
81           network_config:
82             -
83               type: interface
84               name: nic1
85               use_dhcp: false
86               addresses:
87                 -
88                   ip_netmask:
89                     list_join:
90                       - '/'
91                       - - {get_param: ControlPlaneIp}
92                         - {get_param: ControlPlaneSubnetCidr}
93               routes:
94                 -
95                   ip_netmask: 169.254.169.254/32
96                   next_hop: {get_param: EC2MetadataIp}
97             -
98               type: ovs_bridge
99               name: {get_input: bridge_name}
100               dns_servers: {get_param: DnsServers}
101               members:
102                 -
103                   type: ovs_bond
104                   name: bond1
105                   ovs_options: {get_param: BondInterfaceOvsOptions}
106                   members:
107                     -
108                       type: interface
109                       name: nic2
110                       primary: true
111                     -
112                       type: interface
113                       name: nic3
114                 -
115                   type: vlan
116                   device: bond1
117                   vlan_id: {get_param: ExternalNetworkVlanID}
118                   addresses:
119                     -
120                       ip_netmask: {get_param: ExternalIpSubnet}
121                   routes:
122                     -
123                       ip_netmask: 0.0.0.0/0
124                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
125                 -
126                   type: vlan
127                   device: bond1
128                   vlan_id: {get_param: InternalApiNetworkVlanID}
129                   addresses:
130                     -
131                       ip_netmask: {get_param: InternalApiIpSubnet}
132                 -
133                   type: vlan
134                   device: bond1
135                   vlan_id: {get_param: StorageNetworkVlanID}
136                   addresses:
137                     -
138                       ip_netmask: {get_param: StorageIpSubnet}
139                 -
140                   type: vlan
141                   device: bond1
142                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
143                   addresses:
144                     -
145                       ip_netmask: {get_param: StorageMgmtIpSubnet}
146                 -
147                   type: vlan
148                   device: bond1
149                   vlan_id: {get_param: TenantNetworkVlanID}
150                   addresses:
151                     -
152                       ip_netmask: {get_param: TenantIpSubnet}
153
154 outputs:
155   OS::stack_id:
156     description: The OsNetConfigImpl resource.
157     value: {get_resource: OsNetConfigImpl}