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