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