2f92f4b52e5587ac1fb8b951af45ae289a0bd419
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / ceph-storage.yaml
1 heat_template_version: '2016-10-14'
2 description: >
3   Software Config to drive os-net-config with 2 bonded nics on a bridge with VLANs attached for the ceph 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 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   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: # Not used by default in this template
77     default: 10.0.0.1
78     description: The default route of 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                 dns_servers:
107                   get_param: DnsServers
108                 addresses:
109                 - ip_netmask:
110                     list_join:
111                     - /
112                     - - get_param: ControlPlaneIp
113                       - get_param: ControlPlaneSubnetCidr
114                 routes:
115                 - ip_netmask: 169.254.169.254/32
116                   next_hop:
117                     get_param: EC2MetadataIp
118                 - default: true
119                   next_hop:
120                     get_param: ControlPlaneDefaultRoute
121               - type: ovs_bridge
122                 name: br-bond
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: StorageNetworkVlanID
138                   addresses:
139                   - ip_netmask:
140                       get_param: StorageIpSubnet
141                 - type: vlan
142                   device: bond1
143                   vlan_id:
144                     get_param: StorageMgmtNetworkVlanID
145                   addresses:
146                   - ip_netmask:
147                       get_param: StorageMgmtIpSubnet
148                 # Uncomment when including environments/network-management.yaml
149                 # If setting default route on the Management interface, comment
150                 # out the default route on the Control Plane.
151                 #-
152                 #  type: vlan
153                 #  device: bond1
154                 #  vlan_id: {get_param: ManagementNetworkVlanID}
155                 #  addresses:
156                 #    -
157                 #      ip_netmask: {get_param: ManagementIpSubnet}
158                 #  routes:
159                 #    -
160                 #      default: true
161                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
162 outputs:
163   OS::stack_id:
164     description: The OsNetConfigImpl resource.
165     value:
166       get_resource: OsNetConfigImpl
167