Change flat network name for nosdn fdio scenario
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / cinder-storage.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 cinder storage 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   ControlPlaneSubnetCidr: # Override this via parameter_defaults
68     default: '24'
69     description: The subnet CIDR of the control plane network.
70     type: string
71   ControlPlaneDefaultRoute: # Override this via parameter_defaults
72     description: The default route of the control plane network.
73     type: string
74   ExternalInterfaceDefaultRoute: # Not used by default in this template
75     default: 10.0.0.1
76     description: The default route of the external network.
77     type: string
78   ManagementInterfaceDefaultRoute: # Commented out by default in this template
79     default: unset
80     description: The default route of the management 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                 dns_servers:
105                   get_param: DnsServers
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: br-bond
121                 members:
122                 - type: ovs_bond
123                   name: bond1
124                   ovs_options:
125                     get_param: BondInterfaceOvsOptions
126                   members:
127                   - type: interface
128                     name: nic2
129                     primary: true
130                   - type: interface
131                     name: nic3
132                 - type: vlan
133                   device: bond1
134                   vlan_id:
135                     get_param: InternalApiNetworkVlanID
136                   addresses:
137                   - ip_netmask:
138                       get_param: InternalApiIpSubnet
139                 - type: vlan
140                   device: bond1
141                   vlan_id:
142                     get_param: StorageNetworkVlanID
143                   addresses:
144                   - ip_netmask:
145                       get_param: StorageIpSubnet
146                 - type: vlan
147                   device: bond1
148                   vlan_id:
149                     get_param: StorageMgmtNetworkVlanID
150                   addresses:
151                   - ip_netmask:
152                       get_param: StorageMgmtIpSubnet
153                 # Uncomment when including environments/network-management.yaml
154                 # If setting default route on the Management interface, comment
155                 # out the default route on the Control Plane.
156                 #-
157                 #  type: vlan
158                 #  device: bond1
159                 #  vlan_id: {get_param: ManagementNetworkVlanID}
160                 #  addresses:
161                 #    -
162                 #      ip_netmask: {get_param: ManagementIpSubnet}
163                 #  routes:
164                 #    -
165                 #      default: true
166                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
167 outputs:
168   OS::stack_id:
169     description: The OsNetConfigImpl resource.
170     value:
171       get_resource: OsNetConfigImpl
172