Merge "Update VNI and TunnelID ranges."
[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   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   TenantNetworkVlanID:
50     default: 50
51     description: Vlan ID for the tenant network traffic.
52     type: number
53   ManagementNetworkVlanID:
54     default: 60
55     description: Vlan ID for the management network traffic.
56     type: number
57   ControlPlaneSubnetCidr: # Override this via parameter_defaults
58     default: '24'
59     description: The subnet CIDR of the control plane network.
60     type: string
61   ControlPlaneDefaultRoute: # Override this via parameter_defaults
62     description: The default route of the control plane network.
63     type: string
64   DnsServers: # Override this via parameter_defaults
65     default: []
66     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
67     type: comma_delimited_list
68   EC2MetadataIp: # Override this via parameter_defaults
69     description: The IP address of the EC2 metadata server.
70     type: string
71
72 resources:
73   OsNetConfigImpl:
74     type: OS::Heat::StructuredConfig
75     properties:
76       group: os-apply-config
77       config:
78         os_net_config:
79           network_config:
80             -
81               type: interface
82               name: nic1
83               use_dhcp: false
84               dns_servers: {get_param: DnsServers}
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                   default: true
98                   next_hop: {get_param: ControlPlaneDefaultRoute}
99             -
100               type: ovs_bridge
101               name: {get_input: bridge_name}
102               members:
103                 -
104                   type: ovs_bond
105                   name: bond1
106                   ovs_options: {get_param: BondInterfaceOvsOptions}
107                   members:
108                     -
109                       type: interface
110                       name: nic2
111                       primary: true
112                     -
113                       type: interface
114                       name: nic3
115                 -
116                   type: vlan
117                   device: bond1
118                   vlan_id: {get_param: InternalApiNetworkVlanID}
119                   addresses:
120                     -
121                       ip_netmask: {get_param: InternalApiIpSubnet}
122                 -
123                   type: vlan
124                   device: bond1
125                   vlan_id: {get_param: StorageNetworkVlanID}
126                   addresses:
127                     -
128                       ip_netmask: {get_param: StorageIpSubnet}
129                 -
130                   type: vlan
131                   device: bond1
132                   vlan_id: {get_param: TenantNetworkVlanID}
133                   addresses:
134                     -
135                       ip_netmask: {get_param: TenantIpSubnet}
136                 # Uncomment when including environments/network-management.yaml
137                 #-
138                 #  type: vlan
139                 #  device: bond1
140                 #  vlan_id: {get_param: ManagementNetworkVlanID}
141                 #  addresses:
142                 #    -
143                 #      ip_netmask: {get_param: ManagementIpSubnet}
144
145 outputs:
146   OS::stack_id:
147     description: The OsNetConfigImpl resource.
148     value: {get_resource: OsNetConfigImpl}