4b2a5753be43d2629fc8fe43f9a921229cf88787
[apex-tripleo-heat-templates.git] / network / config / single-nic-vlans / cinder-storage.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   cinder storage role.
6
7 parameters:
8   ControlPlaneIp:
9     default: ''
10     description: IP address/subnet on the ctlplane network
11     type: string
12   ExternalIpSubnet:
13     default: ''
14     description: IP address/subnet on the external network
15     type: string
16   InternalApiIpSubnet:
17     default: ''
18     description: IP address/subnet on the internal API network
19     type: string
20   StorageIpSubnet:
21     default: ''
22     description: IP address/subnet on the storage network
23     type: string
24   StorageMgmtIpSubnet:
25     default: ''
26     description: IP address/subnet on the storage mgmt network
27     type: string
28   TenantIpSubnet:
29     default: ''
30     description: IP address/subnet on the tenant network
31     type: string
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   ControlPlaneSubnetCidr: # Override this via parameter_defaults
45     default: '24'
46     description: The subnet CIDR of the control plane network.
47     type: string
48   ControlPlaneDefaultRoute: # Override this via parameter_defaults
49     description: The default route of the control plane network.
50     type: string
51   EC2MetadataIp: # Override this via parameter_defaults
52     description: The IP address of the EC2 metadata server.
53     type: string
54
55 resources:
56   OsNetConfigImpl:
57     type: OS::Heat::StructuredConfig
58     properties:
59       group: os-apply-config
60       config:
61         os_net_config:
62           network_config:
63             -
64               type: ovs_bridge
65               name: br-storage
66               use_dhcp: false
67               addresses:
68                 -
69                   ip_netmask:
70                     list_join:
71                       - '/'
72                       - - {get_param: ControlPlaneIp}
73                         - {get_param: ControlPlaneSubnetCidr}
74               routes:
75                 -
76                   ip_netmask: 169.254.169.254/32
77                   next_hop: {get_param: EC2MetadataIp}
78                 -
79                   default: true
80                   next_hop: {get_param: ControlPlaneDefaultRoute}
81               members:
82                 -
83                   type: interface
84                   name: nic1
85                   # force the MAC address of the bridge to this interface
86                   primary: true
87                 -
88                   type: vlan
89                   vlan_id: {get_param: InternalApiNetworkVlanID}
90                   addresses:
91                     -
92                       ip_netmask: {get_param: InternalApiIpSubnet}
93                 -
94                   type: vlan
95                   vlan_id: {get_param: StorageNetworkVlanID}
96                   addresses:
97                     -
98                       ip_netmask: {get_param: StorageIpSubnet}
99                 -
100                   type: vlan
101                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
102                   addresses:
103                     -
104                       ip_netmask: {get_param: StorageMgmtIpSubnet}
105
106 outputs:
107   OS::stack_id:
108     description: The OsNetConfigImpl resource.
109     value: {get_resource: OsNetConfigImpl}