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