Merge "Allow to enable fencing, pass through fencing config"
[apex-tripleo-heat-templates.git] / network / config / single-nic-vlans / controller.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   Software Config to drive os-net-config to configure VLANs for the
5   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   ExternalNetworkVlanID:
29     default: 10
30     description: Vlan ID for the external network traffic.
31     type: number
32   InternalApiNetworkVlanID:
33     default: 20
34     description: Vlan ID for the internal_api network traffic.
35     type: number
36   StorageNetworkVlanID:
37     default: 30
38     description: Vlan ID for the storage network traffic.
39     type: number
40   StorageMgmtNetworkVlanID:
41     default: 40
42     description: Vlan ID for the storage mgmt network traffic.
43     type: number
44   TenantNetworkVlanID:
45     default: 50
46     description: Vlan ID for the tenant network traffic.
47     type: number
48   ExternalInterfaceDefaultRoute:
49     default: '10.0.0.1'
50     description: default route for the external network
51     type: string
52
53 resources:
54   OsNetConfigImpl:
55     type: OS::Heat::StructuredConfig
56     properties:
57       group: os-apply-config
58       config:
59         os_net_config:
60           network_config:
61             -
62               type: ovs_bridge
63               name: {get_input: bridge_name}
64               use_dhcp: true
65               members:
66                 -
67                   type: interface
68                   name: nic1
69                   # force the MAC address of the bridge to this interface
70                   primary: true
71                 -
72                   type: vlan
73                   vlan_id: {get_param: ExternalNetworkVlanID}
74                   addresses:
75                   -
76                     ip_netmask: {get_param: ExternalIpSubnet}
77                   routes:
78                     -
79                       ip_netmask: 0.0.0.0/0
80                       next_hop: {get_param: ExternalInterfaceDefaultRoute}
81                 -
82                   type: vlan
83                   vlan_id: {get_param: InternalApiNetworkVlanID}
84                   addresses:
85                   -
86                     ip_netmask: {get_param: InternalApiIpSubnet}
87                 -
88                   type: vlan
89                   vlan_id: {get_param: StorageNetworkVlanID}
90                   addresses:
91                   -
92                     ip_netmask: {get_param: StorageIpSubnet}
93                 -
94                   type: vlan
95                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
96                   addresses:
97                   -
98                     ip_netmask: {get_param: StorageMgmtIpSubnet}
99                 -
100                   type: vlan
101                   vlan_id: {get_param: TenantNetworkVlanID}
102                   addresses:
103                   -
104                     ip_netmask: {get_param: TenantIpSubnet}
105
106 outputs:
107   OS::stack_id:
108     description: The OsNetConfigImpl resource.
109     value: {get_resource: OsNetConfigImpl}