ddb41633127e43634a2d5facfe2b4470e7b43145
[apex-tripleo-heat-templates.git] / network / config / single-nic-vlans / ceph-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   ceph 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   StorageNetworkVlanID:
33     default: 30
34     description: Vlan ID for the storage network traffic.
35     type: number
36   StorageMgmtNetworkVlanID:
37     default: 40
38     description: Vlan ID for the storage mgmt network traffic.
39     type: number
40   ControlPlaneSubnetCidr: # Override this via parameter_defaults
41     default: '24'
42     description: The subnet CIDR of the control plane network.
43     type: string
44   ControlPlaneDefaultRoute: # Override this via parameter_defaults
45     description: The default route of the control plane network.
46     type: string
47   EC2MetadataIp: # Override this via parameter_defaults
48     description: The IP address of the EC2 metadata server.
49     type: string
50
51 resources:
52   OsNetConfigImpl:
53     type: OS::Heat::StructuredConfig
54     properties:
55       group: os-apply-config
56       config:
57         os_net_config:
58           network_config:
59             -
60               type: ovs_bridge
61               name: br-storage
62               use_dhcp: false
63               addresses:
64                 -
65                   ip_netmask:
66                     list_join:
67                       - '/'
68                       - - {get_param: ControlPlaneIp}
69                         - {get_param: ControlPlaneSubnetCidr}
70               routes:
71                 -
72                   ip_netmask: 169.254.169.254/32
73                   next_hop: {get_param: EC2MetadataIp}
74                 -
75                   default: true
76                   next_hop: {get_param: ControlPlaneDefaultRoute}
77               members:
78                 -
79                   type: interface
80                   name: nic1
81                   # force the MAC address of the bridge to this interface
82                   primary: true
83                 -
84                   type: vlan
85                   vlan_id: {get_param: StorageNetworkVlanID}
86                   addresses:
87                     -
88                       ip_netmask: {get_param: StorageIpSubnet}
89                 -
90                   type: vlan
91                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
92                   addresses:
93                     -
94                       ip_netmask: {get_param: StorageMgmtIpSubnet}
95
96 outputs:
97   OS::stack_id:
98     description: The OsNetConfigImpl resource.
99     value: {get_resource: OsNetConfigImpl}