Bump template version for all templates to "ocata"
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / controller-no-external.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.
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: ''
35     description: The ovs_options string for the bond interface. Set things like lacp=active and/or bond_mode=balance-slb using
36       this option.
37     type: string
38     constraints:
39     - allowed_pattern: ^((?!balance.tcp).)*$
40       description: 'The balance-tcp bond mode is known to cause packet loss and
41
42         should not be used in BondInterfaceOvsOptions.
43
44         '
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   ControlPlaneDefaultRoute: # Override this via parameter_defaults
70     description: The default route of the control plane network.
71     type: string
72   ExternalInterfaceDefaultRoute:
73     default: 10.0.0.1
74     description: default route for the external network
75     type: string
76   ManagementInterfaceDefaultRoute: # Commented out by default in this template
77     default: unset
78     description: The default route of the management network.
79     type: string
80   ControlPlaneSubnetCidr: # Override this via parameter_defaults
81     default: '24'
82     description: The subnet CIDR of the control plane 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                 use_dhcp: true
122                 members:
123                 - type: ovs_bond
124                   name: bond1
125                   ovs_options:
126                     get_param: BondInterfaceOvsOptions
127                   members:
128                   - type: interface
129                     name: nic2
130                     primary: true
131                   - type: interface
132                     name: nic3
133                 - type: vlan
134                   device: bond1
135                   vlan_id:
136                     get_param: InternalApiNetworkVlanID
137                   addresses:
138                   - ip_netmask:
139                       get_param: InternalApiIpSubnet
140                 - type: vlan
141                   device: bond1
142                   vlan_id:
143                     get_param: StorageNetworkVlanID
144                   addresses:
145                   - ip_netmask:
146                       get_param: StorageIpSubnet
147                 - type: vlan
148                   device: bond1
149                   vlan_id:
150                     get_param: StorageMgmtNetworkVlanID
151                   addresses:
152                   - ip_netmask:
153                       get_param: StorageMgmtIpSubnet
154                 - type: vlan
155                   device: bond1
156                   vlan_id:
157                     get_param: TenantNetworkVlanID
158                   addresses:
159                   - ip_netmask:
160                       get_param: TenantIpSubnet
161                 # Uncomment when including environments/network-management.yaml
162                 # If setting default route on the Management interface, comment
163                 # out the default route on the Control Plane.
164                 #-
165                 #  type: vlan
166                 #  device: bond1
167                 #  vlan_id: {get_param: ManagementNetworkVlanID}
168                 #  addresses:
169                 #    -
170                 #      ip_netmask: {get_param: ManagementIpSubnet}
171                 #  routes:
172                 #    -
173                 #      default: true
174                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
175 outputs:
176   OS::stack_id:
177     description: The OsNetConfigImpl resource.
178     value:
179       get_resource: OsNetConfigImpl
180