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