Merge "Clean up old functions"
[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   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
33     default: ''
34     description: IP address/subnet on the management network
35     type: string
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   ManagementNetworkVlanID:
45     default: 60
46     description: Vlan ID for the management network traffic.
47     type: number
48   ControlPlaneSubnetCidr: # Override this via parameter_defaults
49     default: '24'
50     description: The subnet CIDR of the control plane network.
51     type: string
52   ControlPlaneDefaultRoute: # Override this via parameter_defaults
53     description: The default route of the control plane network.
54     type: string
55   ExternalInterfaceDefaultRoute: # Not used by default in this template
56     default: '10.0.0.1'
57     description: The default route of the external network.
58     type: string
59   ManagementInterfaceDefaultRoute: # Commented out by default in this template
60     default: unset
61     description: The default route of the management network.
62     type: string
63   DnsServers: # Override this via parameter_defaults
64     default: []
65     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
66     type: comma_delimited_list
67   EC2MetadataIp: # Override this via parameter_defaults
68     description: The IP address of the EC2 metadata server.
69     type: string
70
71 resources:
72   OsNetConfigImpl:
73     type: OS::Heat::StructuredConfig
74     properties:
75       group: os-apply-config
76       config:
77         os_net_config:
78           network_config:
79             -
80               type: ovs_bridge
81               name: br-storage
82               use_dhcp: false
83               dns_servers: {get_param: DnsServers}
84               addresses:
85                 -
86                   ip_netmask:
87                     list_join:
88                       - '/'
89                       - - {get_param: ControlPlaneIp}
90                         - {get_param: ControlPlaneSubnetCidr}
91               routes:
92                 -
93                   ip_netmask: 169.254.169.254/32
94                   next_hop: {get_param: EC2MetadataIp}
95                 -
96                   default: true
97                   next_hop: {get_param: ControlPlaneDefaultRoute}
98               members:
99                 -
100                   type: interface
101                   name: nic1
102                   # force the MAC address of the bridge to this interface
103                   primary: true
104                 -
105                   type: vlan
106                   vlan_id: {get_param: StorageNetworkVlanID}
107                   addresses:
108                     -
109                       ip_netmask: {get_param: StorageIpSubnet}
110                 -
111                   type: vlan
112                   vlan_id: {get_param: StorageMgmtNetworkVlanID}
113                   addresses:
114                     -
115                       ip_netmask: {get_param: StorageMgmtIpSubnet}
116                 # Uncomment when including environments/network-management.yaml
117                 # If setting default route on the Management interface, comment
118                 # out the default route on the Control Plane.
119                 #-
120                 #  type: vlan
121                 #  vlan_id: {get_param: ManagementNetworkVlanID}
122                 #  addresses:
123                 #    -
124                 #      ip_netmask: {get_param: ManagementIpSubnet}
125                 #  routes:
126                 #    -
127                 #      default: true
128                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
129
130 outputs:
131   OS::stack_id:
132     description: The OsNetConfigImpl resource.
133     value: {get_resource: OsNetConfigImpl}