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