Merge "Add an environment to use a swap partition"
[apex-tripleo-heat-templates.git] / network / config / single-nic-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   ExternalInterfaceDefaultRoute:
61     default: '10.0.0.1'
62     description: default route for the external network
63     type: string
64   ControlPlaneSubnetCidr: # Override this via parameter_defaults
65     default: '24'
66     description: The subnet CIDR of the control plane network.
67     type: string
68   DnsServers: # Override this via parameter_defaults
69     default: []
70     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
71     type: comma_delimited_list
72   EC2MetadataIp: # Override this via parameter_defaults
73     description: The IP address of the EC2 metadata server.
74     type: string
75
76 resources:
77   OsNetConfigImpl:
78     type: OS::Heat::StructuredConfig
79     properties:
80       group: os-apply-config
81       config:
82         os_net_config:
83           network_config:
84             -
85               type: ovs_bridge
86               name: {get_input: bridge_name}
87               use_dhcp: false
88               dns_servers: {get_param: DnsServers}
89               addresses:
90                 -
91                   ip_netmask:
92                     list_join:
93                       - '/'
94                       - - {get_param: ControlPlaneIp}
95                         - {get_param: ControlPlaneSubnetCidr}
96               routes:
97                 -
98                   ip_netmask: 169.254.169.254/32
99                   next_hop: {get_param: EC2MetadataIp}
100               members:
101                 -
102                   type: interface
103                   name: nic1
104                   # force the MAC address of the bridge to this interface
105                   primary: true
106                 -
107                   type: vlan
108                   vlan_id: {get_param: ExternalNetworkVlanID}
109                   addresses:
110                   -
111                     ip_netmask: {get_param: ExternalIpSubnet}
112                   routes:
113                     -
114                       default: true
115                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
116                 -
117                   type: vlan
118                   vlan_id: {get_param: InternalApiNetworkVlanID}
119                   addresses:
120                     -
121                       ip_netmask: {get_param: InternalApiIpSubnet}
122                 -
123                   type: vlan
124                   vlan_id: {get_param: StorageNetworkVlanID}
125                   addresses:
126                     -
127                       ip_netmask: {get_param: StorageIpSubnet}
128                 -
129                   type: vlan
130                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
131                   addresses:
132                     -
133                       ip_netmask: {get_param: StorageMgmtIpSubnet}
134                 -
135                   type: vlan
136                   vlan_id: {get_param: TenantNetworkVlanID}
137                   addresses:
138                     -
139                       ip_netmask: {get_param: TenantIpSubnet}
140                 #-  # Uncomment when including environments/network-management.yaml
141                 #  type: vlan
142                 #  vlan_id: {get_param: ManagementNetworkVlanID}
143                 #  addresses:
144                 #    -
145                 #      ip_netmask: {get_param: ManagementIpSubnet}
146
147 outputs:
148   OS::stack_id:
149     description: The OsNetConfigImpl resource.
150     value: {get_resource: OsNetConfigImpl}