Merge "Customize "supported_pci_vendor_devs" for SR-IOV"
[apex-tripleo-heat-templates.git] / network / config / single-nic-linux-bridge-vlans / controller.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure VLANs for the
5   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   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
33     default: ''
34     description: IP address/subnet on the management network
35     type: string
36   ExternalNetworkVlanID:
37     default: 10
38     description: Vlan ID for the external network traffic.
39     type: number
40   InternalApiNetworkVlanID:
41     default: 20
42     description: Vlan ID for the internal_api network traffic.
43     type: number
44   StorageNetworkVlanID:
45     default: 30
46     description: Vlan ID for the storage network traffic.
47     type: number
48   StorageMgmtNetworkVlanID:
49     default: 40
50     description: Vlan ID for the storage mgmt network traffic.
51     type: number
52   TenantNetworkVlanID:
53     default: 50
54     description: Vlan ID for the tenant network traffic.
55     type: number
56   ManagementNetworkVlanID:
57     default: 60
58     description: Vlan ID for the management network traffic.
59     type: number
60   ControlPlaneDefaultRoute: # Override this via parameter_defaults
61     description: The default route of the control plane network.
62     type: string
63   ExternalInterfaceDefaultRoute:
64     default: '10.0.0.1'
65     description: default route for the external network
66     type: string
67   ManagementInterfaceDefaultRoute: # Commented out by default in this template
68     default: unset
69     description: The default route of the management network.
70     type: string
71   ControlPlaneSubnetCidr: # Override this via parameter_defaults
72     default: '24'
73     description: The subnet CIDR of the control plane network.
74     type: string
75   DnsServers: # Override this via parameter_defaults
76     default: []
77     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
78     type: comma_delimited_list
79   EC2MetadataIp: # Override this via parameter_defaults
80     description: The IP address of the EC2 metadata server.
81     type: string
82
83 resources:
84   OsNetConfigImpl:
85     type: OS::Heat::StructuredConfig
86     properties:
87       group: os-apply-config
88       config:
89         os_net_config:
90           network_config:
91             -
92               type: linux_bridge
93               name: {get_input: bridge_name}
94               use_dhcp: false
95               dns_servers: {get_param: DnsServers}
96               addresses:
97                 -
98                   ip_netmask:
99                     list_join:
100                       - '/'
101                       - - {get_param: ControlPlaneIp}
102                         - {get_param: ControlPlaneSubnetCidr}
103               routes:
104                 -
105                   ip_netmask: 169.254.169.254/32
106                   next_hop: {get_param: EC2MetadataIp}
107                 # IPv4 Default Route
108                 -
109                   default: true
110                   next_hop: {get_param: ControlPlaneDefaultRoute}
111               members:
112                 -
113                   type: interface
114                   name: {get_input: interface_name}
115                   # force the MAC address of the bridge to this interface
116                   primary: true
117             -
118               type: vlan
119               vlan_id: {get_param: ExternalNetworkVlanID}
120               device: {get_input: bridge_name}
121               addresses:
122                 -
123                   ip_netmask: {get_param: ExternalIpSubnet}
124               routes:
125                 # IPv6 Default Route
126                 -
127                   default: true
128                   next_hop: {get_param: ExternalInterfaceDefaultRoute}
129             -
130               type: vlan
131               vlan_id: {get_param: InternalApiNetworkVlanID}
132               device: {get_input: bridge_name}
133               addresses:
134                 -
135                   ip_netmask: {get_param: InternalApiIpSubnet}
136             -
137               type: vlan
138               vlan_id: {get_param: StorageNetworkVlanID}
139               device: {get_input: bridge_name}
140               addresses:
141                 -
142                   ip_netmask: {get_param: StorageIpSubnet}
143             -
144               type: vlan
145               vlan_id: {get_param: StorageMgmtNetworkVlanID}
146               device: {get_input: bridge_name}
147               addresses:
148                 -
149                   ip_netmask: {get_param: StorageMgmtIpSubnet}
150             -
151               type: vlan
152               vlan_id: {get_param: TenantNetworkVlanID}
153               device: {get_input: bridge_name}
154               addresses:
155                 -
156                   ip_netmask: {get_param: TenantIpSubnet}
157               # Uncomment when including environments/network-management.yaml
158               # If setting default route on the Management interface, comment
159               # out the default route on the External interface. This will
160               # make the External API unreachable from remote subnets.
161               #-
162               #  type: vlan
163               #  vlan_id: {get_param: ManagementNetworkVlanID}
164               #  device: {get_input: bridge_name}
165               #  addresses:
166               #    -
167               #      ip_netmask: {get_param: ManagementIpSubnet}
168               #  routes:
169               #    -
170               #      default: true
171               #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
172
173 outputs:
174   OS::stack_id:
175     description: The OsNetConfigImpl resource.
176     value: {get_resource: OsNetConfigImpl}