3c19f515ac96538fab5c0f595ca85110e0bac730
[apex-tripleo-heat-templates.git] / network / config / bond-with-vlans / controller.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config with 2 bonded nics on a bridge
5   with VLANs attached for the controller role.
6
7 parameters:
8   ExternalIpSubnet:
9     default: ''
10     description: IP address/subnet on the external network
11     type: string
12   InternalApiIpSubnet:
13     default: ''
14     description: IP address/subnet on the internal API network
15     type: string
16   StorageIpSubnet:
17     default: ''
18     description: IP address/subnet on the storage network
19     type: string
20   StorageMgmtIpSubnet:
21     default: ''
22     description: IP address/subnet on the storage mgmt network
23     type: string
24   TenantIpSubnet:
25     default: ''
26     description: IP address/subnet on the tenant network
27     type: string
28   BondInterfaceOvsOptions:
29     default: 'bond_mode=balance-tcp lacp=active other-config:lacp-fallback-ab=true'
30     description: The ovs_options string for the bond interface. Set things like
31                  lacp=active and/or bond_mode=balance-slb using this option.
32                  Default wil attempt LACP, but will fall back to active-backup.
33     type: string
34   ExternalNetworkVlanID:
35     default: 10
36     description: Vlan ID for the external network traffic.
37     type: number
38   InternalApiNetworkVlanID:
39     default: 20
40     description: Vlan ID for the internal_api network traffic.
41     type: number
42   StorageNetworkVlanID:
43     default: 30
44     description: Vlan ID for the storage network traffic.
45     type: number
46   StorageMgmtNetworkVlanID:
47     default: 40
48     description: Vlan ID for the storage mgmt network traffic.
49     type: number
50   TenantNetworkVlanID:
51     default: 50
52     description: Vlan ID for the tenant network traffic.
53     type: number
54   ExternalInterfaceDefaultRoute:
55     default: '10.0.0.1'
56     description: default route for the external network
57     type: string
58
59 resources:
60   OsNetConfigImpl:
61     type: OS::Heat::StructuredConfig
62     properties:
63       group: os-apply-config
64       config:
65         os_net_config:
66           network_config:
67             -
68               type: ovs_bridge
69               name: {get_input: bridge_name}
70               members:
71                 -
72                   type: ovs_bond
73                   name: bond1
74                   ovs_options: {get_param: BondInterfaceOvsOptions}
75                   members:
76                     -
77                       type: interface
78                       name: nic2
79                       primary: true
80                     -
81                       type: interface
82                       name: nic3
83                 -
84                   type: vlan
85                   device: bond1
86                   vlan_id: {get_param: ExternalNetworkVlanID}
87                   addresses:
88                     -
89                       ip_netmask: {get_param: ExternalIpSubnet}
90                   routes:
91                     -
92                       ip_netmask: 0.0.0.0/0
93                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
94                 -
95                   type: vlan
96                   device: bond1
97                   vlan_id: {get_param: InternalApiNetworkVlanID}
98                   addresses:
99                   -
100                     ip_netmask: {get_param: InternalApiIpSubnet}
101                 -
102                   type: vlan
103                   device: bond1
104                   vlan_id: {get_param: StorageNetworkVlanID}
105                   addresses:
106                   -
107                     ip_netmask: {get_param: StorageIpSubnet}
108                 -
109                   type: vlan
110                   device: bond1
111                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
112                   addresses:
113                   -
114                     ip_netmask: {get_param: StorageMgmtIpSubnet}
115                 -
116                   type: vlan
117                   device: bond1
118                   vlan_id: {get_param: TenantNetworkVlanID}
119                   addresses:
120                   -
121                     ip_netmask: {get_param: TenantIpSubnet}
122
123 outputs:
124   OS::stack_id:
125     description: The OsNetConfigImpl resource.
126     value: {get_resource: OsNetConfigImpl}