Merge "Add release note for generated sample environments"
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / controller-no-external.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: ''
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                 - default: true
115                   next_hop:
116                     get_param: ControlPlaneDefaultRoute
117               - type: ovs_bridge
118                 name: bridge_name
119                 use_dhcp: true
120                 members:
121                 - type: ovs_bond
122                   name: bond1
123                   ovs_options:
124                     get_param: BondInterfaceOvsOptions
125                   members:
126                   - type: interface
127                     name: nic2
128                     primary: true
129                   - type: interface
130                     name: nic3
131                 - type: vlan
132                   device: bond1
133                   vlan_id:
134                     get_param: InternalApiNetworkVlanID
135                   addresses:
136                   - ip_netmask:
137                       get_param: InternalApiIpSubnet
138                 - type: vlan
139                   device: bond1
140                   vlan_id:
141                     get_param: StorageNetworkVlanID
142                   addresses:
143                   - ip_netmask:
144                       get_param: StorageIpSubnet
145                 - type: vlan
146                   device: bond1
147                   vlan_id:
148                     get_param: StorageMgmtNetworkVlanID
149                   addresses:
150                   - ip_netmask:
151                       get_param: StorageMgmtIpSubnet
152                 - type: vlan
153                   device: bond1
154                   vlan_id:
155                     get_param: TenantNetworkVlanID
156                   addresses:
157                   - ip_netmask:
158                       get_param: TenantIpSubnet
159                 # Uncomment when including environments/network-management.yaml
160                 # If setting default route on the Management interface, comment
161                 # out the default route on the Control Plane.
162                 #-
163                 #  type: vlan
164                 #  device: bond1
165                 #  vlan_id: {get_param: ManagementNetworkVlanID}
166                 #  addresses:
167                 #    -
168                 #      ip_netmask: {get_param: ManagementIpSubnet}
169                 #  routes:
170                 #    -
171                 #      default: true
172                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
173 outputs:
174   OS::stack_id:
175     description: The OsNetConfigImpl resource.
176     value:
177       get_resource: OsNetConfigImpl
178