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