Merge "Make OVS ARP responder feature configurable"
[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   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: ''
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   ControlPlaneSubnetCidr: # Override this via parameter_defaults
66     default: '24'
67     description: The subnet CIDR of the control plane network.
68     type: string
69   ControlPlaneDefaultRoute: # Override this via parameter_defaults
70     description: The default route of the control plane network.
71     type: string
72   ExternalInterfaceDefaultRoute: # Not used by default in this template
73     default: '10.0.0.1'
74     description: The default route of the external network.
75     type: string
76   ManagementInterfaceDefaultRoute: # Commented out by default in this template
77     default: unset
78     description: The default route of the management 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               dns_servers: {get_param: DnsServers}
101               addresses:
102                 -
103                   ip_netmask:
104                     list_join:
105                       - '/'
106                       - - {get_param: ControlPlaneIp}
107                         - {get_param: ControlPlaneSubnetCidr}
108               routes:
109                 -
110                   ip_netmask: 169.254.169.254/32
111                   next_hop: {get_param: EC2MetadataIp}
112                 -
113                   default: true
114                   next_hop: {get_param: ControlPlaneDefaultRoute}
115             -
116               type: ovs_bridge
117               name: {get_input: bridge_name}
118               members:
119                 -
120                   type: ovs_bond
121                   name: bond1
122                   ovs_options: {get_param: BondInterfaceOvsOptions}
123                   members:
124                     -
125                       type: interface
126                       name: nic2
127                       primary: true
128                     -
129                       type: interface
130                       name: nic3
131                 -
132                   type: vlan
133                   device: bond1
134                   vlan_id: {get_param: InternalApiNetworkVlanID}
135                   addresses:
136                     -
137                       ip_netmask: {get_param: InternalApiIpSubnet}
138                 -
139                   type: vlan
140                   device: bond1
141                   vlan_id: {get_param: StorageNetworkVlanID}
142                   addresses:
143                     -
144                       ip_netmask: {get_param: StorageIpSubnet}
145                 -
146                   type: vlan
147                   device: bond1
148                   vlan_id: {get_param: TenantNetworkVlanID}
149                   addresses:
150                     -
151                       ip_netmask: {get_param: TenantIpSubnet}
152                 # Uncomment when including environments/network-management.yaml
153                 # If setting default route on the Management interface, comment
154                 # out the default route on the Control Plane.
155                 #-
156                 #  type: vlan
157                 #  device: bond1
158                 #  vlan_id: {get_param: ManagementNetworkVlanID}
159                 #  addresses:
160                 #    -
161                 #      ip_netmask: {get_param: ManagementIpSubnet}
162                 #  routes:
163                 #    -
164                 #      default: true
165                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
166
167 outputs:
168   OS::stack_id:
169     description: The OsNetConfigImpl resource.
170     value: {get_resource: OsNetConfigImpl}