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