0b5eb0c9a8031f1c15ee687f04843af4521783da
[apex-tripleo-heat-templates.git] / network / config / single-nic-vlans / ceph-storage.yaml
1 heat_template_version: ocata
2 description: >
3   Software Config to drive os-net-config to configure VLANs for the ceph storage role.
4 parameters:
5   ControlPlaneIp:
6     default: ''
7     description: IP address/subnet on the ctlplane network
8     type: string
9   ExternalIpSubnet:
10     default: ''
11     description: IP address/subnet on the external network
12     type: string
13   InternalApiIpSubnet:
14     default: ''
15     description: IP address/subnet on the internal API network
16     type: string
17   StorageIpSubnet:
18     default: ''
19     description: IP address/subnet on the storage network
20     type: string
21   StorageMgmtIpSubnet:
22     default: ''
23     description: IP address/subnet on the storage mgmt network
24     type: string
25   TenantIpSubnet:
26     default: ''
27     description: IP address/subnet on the tenant network
28     type: string
29   ManagementIpSubnet: # Only populated when including environments/network-management.yaml
30     default: ''
31     description: IP address/subnet on the management network
32     type: string
33   StorageNetworkVlanID:
34     default: 30
35     description: Vlan ID for the storage network traffic.
36     type: number
37   StorageMgmtNetworkVlanID:
38     default: 40
39     description: Vlan ID for the storage mgmt network traffic.
40     type: number
41   ManagementNetworkVlanID:
42     default: 60
43     description: Vlan ID for the management network traffic.
44     type: number
45   ControlPlaneSubnetCidr: # Override this via parameter_defaults
46     default: '24'
47     description: The subnet CIDR of the control plane network.
48     type: string
49   ControlPlaneDefaultRoute: # Override this via parameter_defaults
50     description: The default route of the control plane network.
51     type: string
52   ExternalInterfaceDefaultRoute: # Not used by default in this template
53     default: 10.0.0.1
54     description: The default route of the external network.
55     type: string
56   ManagementInterfaceDefaultRoute: # Commented out by default in this template
57     default: unset
58     description: The default route of the management network.
59     type: string
60   DnsServers: # Override this via parameter_defaults
61     default: []
62     description: A list of DNS servers (2 max for some implementations) that will be added to resolv.conf.
63     type: comma_delimited_list
64   EC2MetadataIp: # Override this via parameter_defaults
65     description: The IP address of the EC2 metadata server.
66     type: string
67 resources:
68   OsNetConfigImpl:
69     type: OS::Heat::SoftwareConfig
70     properties:
71       group: script
72       config:
73         str_replace:
74           template:
75             get_file: ../../scripts/run-os-net-config.sh
76           params:
77             $network_config:
78               network_config:
79               - type: ovs_bridge
80                 name: br-storage
81                 use_dhcp: false
82                 dns_servers:
83                   get_param: DnsServers
84                 addresses:
85                 - ip_netmask:
86                     list_join:
87                     - /
88                     - - get_param: ControlPlaneIp
89                       - get_param: ControlPlaneSubnetCidr
90                 routes:
91                 - ip_netmask: 169.254.169.254/32
92                   next_hop:
93                     get_param: EC2MetadataIp
94                 - default: true
95                   next_hop:
96                     get_param: ControlPlaneDefaultRoute
97                 members:
98                 - type: interface
99                   name: nic1
100                   # force the MAC address of the bridge to this interface
101                   primary: true
102                 - type: vlan
103                   vlan_id:
104                     get_param: StorageNetworkVlanID
105                   addresses:
106                   - ip_netmask:
107                       get_param: StorageIpSubnet
108                 - type: vlan
109                   vlan_id:
110                     get_param: StorageMgmtNetworkVlanID
111                   addresses:
112                   - ip_netmask:
113                       get_param: StorageMgmtIpSubnet
114                 # Uncomment when including environments/network-management.yaml
115                 # If setting default route on the Management interface, comment
116                 # out the default route on the Control Plane.
117                 #-
118                 #  type: vlan
119                 #  vlan_id: {get_param: ManagementNetworkVlanID}
120                 #  addresses:
121                 #    -
122                 #      ip_netmask: {get_param: ManagementIpSubnet}
123                 #  routes:
124                 #    -
125                 #      default: true
126                 #      next_hop: {get_param: ManagementInterfaceDefaultRoute}
127 outputs:
128   OS::stack_id:
129     description: The OsNetConfigImpl resource.
130     value:
131       get_resource: OsNetConfigImpl
132