Merge "Make puppet-applying *Post resources depend on hieradata"
[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: ''
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     type: string
33   ExternalNetworkVlanID:
34     default: 10
35     description: Vlan ID for the external network traffic.
36     type: number
37   InternalApiNetworkVlanID:
38     default: 20
39     description: Vlan ID for the internal_api network traffic.
40     type: number
41   StorageNetworkVlanID:
42     default: 30
43     description: Vlan ID for the storage network traffic.
44     type: number
45   StorageMgmtNetworkVlanID:
46     default: 40
47     description: Vlan ID for the storage mgmt network traffic.
48     type: number
49   TenantNetworkVlanID:
50     default: 50
51     description: Vlan ID for the tenant network traffic.
52     type: number
53
54 resources:
55   OsNetConfigImpl:
56     type: OS::Heat::StructuredConfig
57     properties:
58       group: os-apply-config
59       config:
60         os_net_config:
61           network_config:
62             -
63               type: ovs_bridge
64               name: {get_input: bridge_name}
65               use_dhcp: true
66               members:
67                 -
68                   type: interface
69                   name: nic1
70                   # force the MAC address of the bridge to this interface
71                   primary: true
72             -
73               type: ovs_bridge
74               name: br-bond
75               members:
76                 -
77                   type: ovs_bond
78                   name: bond1
79                   ovs_options: {get_param: BondInterfaceOvsOptions}
80                   members:
81                     -
82                       type: interface
83                       name: nic2
84                       primary: true
85                     -
86                       type: interface
87                       name: nic3
88                 -
89                   type: vlan
90                   device: bond1
91                   vlan_id: {get_param: ExternalNetworkVlanID}
92                   addresses:
93                   -
94                     ip_netmask: {get_param: ExternalIpSubnet}
95                 -
96                   type: vlan
97                   device: bond1
98                   vlan_id: {get_param: InternalApiNetworkVlanID}
99                   addresses:
100                   -
101                     ip_netmask: {get_param: InternalApiIpSubnet}
102                 -
103                   type: vlan
104                   device: bond1
105                   vlan_id: {get_param: StorageNetworkVlanID}
106                   addresses:
107                   -
108                     ip_netmask: {get_param: StorageIpSubnet}
109                 -
110                   type: vlan
111                   device: bond1
112                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
113                   addresses:
114                   -
115                     ip_netmask: {get_param: StorageMgmtIpSubnet}
116                 -
117                   type: vlan
118                   device: bond1
119                   vlan_id: {get_param: TenantNetworkVlanID}
120                   addresses:
121                   -
122                     ip_netmask: {get_param: TenantIpSubnet}
123
124 outputs:
125   OS::stack_id:
126     description: The OsNetConfigImpl resource.
127     value: {get_resource: OsNetConfigImpl}