Add DnsServers param to network config templates
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / compute.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 compute 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: ''
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     type: string
37   InternalApiNetworkVlanID:
38     default: 20
39     description: Vlan ID for the internal_api network traffic.
40     type: number
41   StorageNetworkVlanID:
42     default: 30
43     description: Vlan ID for the storage network traffic.
44     type: number
45   TenantNetworkVlanID:
46     default: 50
47     description: Vlan ID for the tenant network traffic.
48     type: number
49   ControlPlaneSubnetCidr: # Override this via parameter_defaults
50     default: '24'
51     description: The subnet CIDR of the control plane network.
52     type: string
53   ControlPlaneDefaultRoute: # Override this via parameter_defaults
54     description: The default route of the control plane network.
55     type: string
56   DnsServers: # Override this via parameter_defaults
57     default: []
58     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
59     type: comma_delimited_list
60   EC2MetadataIp: # Override this via parameter_defaults
61     description: The IP address of the EC2 metadata server.
62     type: string
63
64 resources:
65   OsNetConfigImpl:
66     type: OS::Heat::StructuredConfig
67     properties:
68       group: os-apply-config
69       config:
70         os_net_config:
71           network_config:
72             -
73               type: interface
74               name: nic1
75               use_dhcp: false
76               dns_servers: {get_param: DnsServers}
77               addresses:
78                 -
79                   ip_netmask:
80                     list_join:
81                       - '/'
82                       - - {get_param: ControlPlaneIp}
83                         - {get_param: ControlPlaneSubnetCidr}
84               routes:
85                 -
86                   ip_netmask: 169.254.169.254/32
87                   next_hop: {get_param: EC2MetadataIp}
88                 -
89                   default: true
90                   next_hop: {get_param: ControlPlaneDefaultRoute}
91             -
92               type: ovs_bridge
93               name: {get_input: bridge_name}
94               members:
95                 -
96                   type: ovs_bond
97                   name: bond1
98                   ovs_options: {get_param: BondInterfaceOvsOptions}
99                   members:
100                     -
101                       type: interface
102                       name: nic2
103                       primary: true
104                     -
105                       type: interface
106                       name: nic3
107                 -
108                   type: vlan
109                   device: bond1
110                   vlan_id: {get_param: InternalApiNetworkVlanID}
111                   addresses:
112                     -
113                       ip_netmask: {get_param: InternalApiIpSubnet}
114                 -
115                   type: vlan
116                   device: bond1
117                   vlan_id: {get_param: StorageNetworkVlanID}
118                   addresses:
119                     -
120                       ip_netmask: {get_param: StorageIpSubnet}
121                 -
122                   type: vlan
123                   device: bond1
124                   vlan_id: {get_param: TenantNetworkVlanID}
125                   addresses:
126                     -
127                       ip_netmask: {get_param: TenantIpSubnet}
128
129 outputs:
130   OS::stack_id:
131     description: The OsNetConfigImpl resource.
132     value: {get_resource: OsNetConfigImpl}