ec6f052d70cad9b6078f23012179804cbc2e5666
[apex-tripleo-heat-templates.git] / overcloud.j2.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   Deploy an OpenStack environment, consisting of several node types (roles),
5   Controller, Compute, BlockStorage, SwiftStorage and CephStorage. The Storage
6   roles enable independent scaling of the storage components, but the minimal
7   deployment is one Controller and one Compute node.
8
9
10 # TODO(shadower): we should probably use the parameter groups to put
11 # some order in here.
12 parameters:
13
14   # Common parameters (not specific to a role)
15   CloudName:
16     default: overcloud.localdomain
17     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
18     type: string
19   CloudNameInternal:
20     default: overcloud.internalapi.localdomain
21     description: >
22       The DNS name of this cloud's internal API endpoint. E.g.
23       'ci-overcloud.internalapi.tripleo.org'.
24     type: string
25   CloudNameStorage:
26     default: overcloud.storage.localdomain
27     description: >
28       The DNS name of this cloud's storage endpoint. E.g.
29       'ci-overcloud.storage.tripleo.org'.
30     type: string
31   CloudNameStorageManagement:
32     default: overcloud.storagemgmt.localdomain
33     description: >
34       The DNS name of this cloud's storage management endpoint. E.g.
35       'ci-overcloud.storagemgmt.tripleo.org'.
36     type: string
37   CloudNameCtlplane:
38     default: overcloud.ctlplane.localdomain
39     description: >
40       The DNS name of this cloud's storage management endpoint. E.g.
41       'ci-overcloud.management.tripleo.org'.
42     type: string
43   ControlFixedIPs:
44     default: []
45     description: Should be used for arbitrary ips.
46     type: json
47   InternalApiVirtualFixedIPs:
48     default: []
49     description: >
50         Control the IP allocation for the InternalApiVirtualInterface port. E.g.
51         [{'ip_address':'1.2.3.4'}]
52     type: json
53   NeutronControlPlaneID:
54     default: 'ctlplane'
55     type: string
56     description: Neutron ID or name for ctlplane network.
57   NeutronPublicInterface:
58     default: nic1
59     description: What interface to bridge onto br-ex for network nodes.
60     type: string
61   PublicVirtualFixedIPs:
62     default: []
63     description: >
64         Control the IP allocation for the PublicVirtualInterface port. E.g.
65         [{'ip_address':'1.2.3.4'}]
66     type: json
67   RabbitCookieSalt:
68     type: string
69     default: unset
70     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
71   StorageVirtualFixedIPs:
72     default: []
73     description: >
74         Control the IP allocation for the StorageVirtualInterface port. E.g.
75         [{'ip_address':'1.2.3.4'}]
76     type: json
77   StorageMgmtVirtualFixedIPs:
78     default: []
79     description: >
80         Control the IP allocation for the StorageMgmgVirtualInterface port. E.g.
81         [{'ip_address':'1.2.3.4'}]
82     type: json
83   RedisVirtualFixedIPs:
84     default: []
85     description: >
86         Control the IP allocation for the virtual IP used by Redis. E.g.
87         [{'ip_address':'1.2.3.4'}]
88     type: json
89   CloudDomain:
90     default: 'localdomain'
91     type: string
92     description: >
93       The DNS domain used for the hosts. This should match the dhcp_domain
94       configured in the Undercloud neutron. Defaults to localdomain.
95   ServerMetadata:
96     default: {}
97     description: >
98       Extra properties or metadata passed to Nova for the created nodes in
99       the overcloud. It's accessible via the Nova metadata API.
100     type: json
101
102   # Controller-specific params
103   ControllerCount:
104     type: number
105     default: 1
106
107 # Compute-specific params
108   ComputeCount:
109     type: number
110     default: 1
111   HypervisorNeutronPhysicalBridge:
112     default: 'br-ex'
113     description: >
114       An OVS bridge to create on each hypervisor. This defaults to br-ex the
115       same as the control plane nodes, as we have a uniform configuration of
116       the openvswitch agent. Typically should not need to be changed.
117     type: string
118   HypervisorNeutronPublicInterface:
119     default: nic1
120     description: What interface to add to the HypervisorNeutronPhysicalBridge.
121     type: string
122
123   # Jinja loop for Role in role_data.yaml
124 {% for role in roles %}
125   # Resources generated for {{role.name}} Role
126   {{role.name}}Services:
127     description: A list of service resources (configured in the Heat
128                  resource_registry) which represent nested stacks
129                  for each service that should get installed on the {{role.name}} role.
130     type: comma_delimited_list
131   {% if role.ServicesDefault %}
132     default: {{role.ServicesDefault}}
133   {% endif %}
134 {% endfor %}
135
136 # Block storage specific parameters
137   BlockStorageCount:
138     type: number
139     default: 0
140
141 # Object storage specific parameters
142   ObjectStorageCount:
143     type: number
144     default: 0
145
146 # Ceph storage specific parameters
147   CephStorageCount:
148     type: number
149     default: 0
150
151   # Hostname format for each role
152   # Note %index% is translated into the index of the node, e.g 0/1/2 etc
153   # and %stackname% is replaced with OS::stack_name in the template below.
154   # If you want to use the heat generated names, pass '' (empty string).
155   ControllerHostnameFormat:
156     type: string
157     description: Format for Controller node hostnames
158     default: '%stackname%-controller-%index%'
159   ComputeHostnameFormat:
160     type: string
161     description: Format for Compute node hostnames
162     default: '%stackname%-novacompute-%index%'
163   BlockStorageHostnameFormat:
164     type: string
165     description: Format for BlockStorage node hostnames
166     default: '%stackname%-blockstorage-%index%'
167   ObjectStorageHostnameFormat:
168     type: string
169     description: Format for SwiftStorage node hostnames
170     default: '%stackname%-objectstorage-%index%'
171   CephStorageHostnameFormat:
172     type: string
173     description: Format for CephStorage node hostnames
174     default: '%stackname%-cephstorage-%index%'
175
176   # Identifiers to trigger tasks on nodes
177   UpdateIdentifier:
178     default: ''
179     type: string
180     description: >
181       Setting to a previously unused value during stack-update will trigger
182       package update on all nodes
183   DeployIdentifier:
184     default: ''
185     type: string
186     description: >
187       Setting this to a unique value will re-run any deployment tasks which
188       perform configuration on a Heat stack-update.
189
190   # If you want to remove a specific node from a resource group, you can pass
191   # the node name or id as a <Group>RemovalPolicies parameter, for example:
192   # ComputeRemovalPolicies: [{'resource_list': ['0']}]
193   ControllerRemovalPolicies:
194     default: []
195     type: json
196     description: >
197       List of resources to be removed from ControllerResourceGroup when
198       doing an update which requires removal of specific resources.
199   ComputeRemovalPolicies:
200     default: []
201     type: json
202     description: >
203       List of resources to be removed from ComputeResourceGroup when
204       doing an update which requires removal of specific resources.
205   BlockStorageRemovalPolicies:
206     default: []
207     type: json
208     description: >
209       List of resources to be removed from BlockStorageResourceGroup when
210       doing an update which requires removal of specific resources.
211   ObjectStorageRemovalPolicies:
212     default: []
213     type: json
214     description: >
215       List of resources to be removed from ObjectStorageResourceGroup when
216       doing an update which requires removal of specific resources.
217   CephStorageRemovalPolicies:
218     default: []
219     type: json
220     description: >
221       List of resources to be removed from CephStorageResourceGroup when
222       doing an update which requires removal of specific resources.
223
224
225 resources:
226
227   HeatAuthEncryptionKey:
228     type: OS::Heat::RandomString
229
230   PcsdPassword:
231     type: OS::Heat::RandomString
232     properties:
233       length: 16
234
235   HorizonSecret:
236     type: OS::Heat::RandomString
237     properties:
238       length: 10
239
240   ServiceNetMap:
241     type: OS::TripleO::ServiceNetMap
242
243   EndpointMap:
244     type: OS::TripleO::EndpointMap
245     properties:
246       CloudEndpoints:
247         external: {get_param: CloudName}
248         internal_api: {get_param: CloudNameInternal}
249         storage: {get_param: CloudNameStorage}
250         storage_mgmt: {get_param: CloudNameStorageManagement}
251         ctlplane: {get_param: CloudNameCtlplane}
252       NetIpMap: {get_attr: [VipMap, net_ip_map]}
253       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
254
255   # Jinja loop for Role in roles_data.yaml
256 {% for role in roles %}
257   # Resources generated for {{role.name}} Role
258   {{role.name}}ServiceChain:
259     type: OS::TripleO::Services
260     properties:
261       Services:
262         get_param: {{role.name}}Services
263       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
264       EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
265       DefaultPasswords: {get_attr: [DefaultPasswords, passwords]}
266
267   {{role.name}}AllNodesDeployment:
268     type: OS::Heat::StructuredDeployments
269     properties:
270       name: {{role.name}}AllNodesDeployment
271       config: {get_attr: [allNodesConfig, config_id]}
272       servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
273       input_values:
274         bootstrap_nodeid: {get_attr: [{{role.name}}, resource.0.hostname]}
275         bootstrap_nodeid_ip: {get_attr: [{{role.name}}, resource.0.ip_address]}
276
277   {{role.name}}AllNodesValidationDeployment:
278     type: OS::Heat::StructuredDeployments
279     depends_on: {{role.name}}AllNodesDeployment
280     properties:
281       name: {{role.name}}AllNodesValidationDeployment
282       config: {get_resource: AllNodesValidationConfig}
283       servers: {get_attr: [{{role.name}}, attributes, nova_server_resource]}
284
285 {% endfor %}
286
287   Controller:
288     type: OS::Heat::ResourceGroup
289     depends_on: Networks
290     properties:
291       count: {get_param: ControllerCount}
292       removal_policies: {get_param: ControllerRemovalPolicies}
293       resource_def:
294         type: OS::TripleO::Controller
295         properties:
296           CloudDomain: {get_param: CloudDomain}
297           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
298           EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
299           Hostname:
300             str_replace:
301               template: {get_param: ControllerHostnameFormat}
302               params:
303                 '%stackname%': {get_param: 'OS::stack_name'}
304           NodeIndex: '%index%'
305           ServiceConfigSettings:
306             map_merge:
307               - get_attr: [ControllerServiceChain, role_data, config_settings]
308               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
309               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
310               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
311               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
312               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
313               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
314           ServiceNames: {get_attr: [ControllerServiceChain, role_data, service_names]}
315           MonitoringSubscriptions: {get_attr: [ControllerServiceChain, role_data, monitoring_subscriptions]}
316
317   Compute:
318     type: OS::Heat::ResourceGroup
319     depends_on: Networks
320     properties:
321       count: {get_param: ComputeCount}
322       removal_policies: {get_param: ComputeRemovalPolicies}
323       resource_def:
324         type: OS::TripleO::Compute
325         properties:
326           CloudDomain: {get_param: CloudDomain}
327           NeutronPhysicalBridge: {get_param: HypervisorNeutronPhysicalBridge}
328           NeutronPublicInterface: {get_param: HypervisorNeutronPublicInterface}
329           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
330           EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
331           Hostname:
332             str_replace:
333               template: {get_param: ComputeHostnameFormat}
334               params:
335                 '%stackname%': {get_param: 'OS::stack_name'}
336           NodeIndex: '%index%'
337           ServiceConfigSettings:
338             map_merge:
339               - get_attr: [ComputeServiceChain, role_data, config_settings]
340               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
341               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
342               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
343               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
344               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
345           ServiceNames: {get_attr: [ComputeServiceChain, role_data, service_names]}
346           MonitoringSubscriptions: {get_attr: [ComputeServiceChain, role_data, monitoring_subscriptions]}
347
348   BlockStorage:
349     type: OS::Heat::ResourceGroup
350     depends_on: Networks
351     properties:
352       count: {get_param: BlockStorageCount}
353       removal_policies: {get_param: BlockStorageRemovalPolicies}
354       resource_def:
355         type: OS::TripleO::BlockStorage
356         properties:
357           UpdateIdentifier: {get_param: UpdateIdentifier}
358           Hostname:
359             str_replace:
360               template: {get_param: BlockStorageHostnameFormat}
361               params:
362                 '%stackname%': {get_param: 'OS::stack_name'}
363           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
364           CloudDomain: {get_param: CloudDomain}
365           ServerMetadata: {get_param: ServerMetadata}
366           NodeIndex: '%index%'
367           ServiceConfigSettings:
368             map_merge:
369               - get_attr: [BlockStorageServiceChain, role_data, config_settings]
370               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
371               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
372               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
373               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
374               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
375           ServiceNames: {get_attr: [BlockStorageServiceChain, role_data, service_names]}
376           MonitoringSubscriptions: {get_attr: [BlockStorageServiceChain, role_data, monitoring_subscriptions]}
377
378   ObjectStorage:
379     type: OS::Heat::ResourceGroup
380     depends_on: Networks
381     properties:
382       count: {get_param: ObjectStorageCount}
383       removal_policies: {get_param: ObjectStorageRemovalPolicies}
384       resource_def:
385         type: OS::TripleO::ObjectStorage
386         properties:
387           UpdateIdentifier: {get_param: UpdateIdentifier}
388           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
389           Hostname:
390             str_replace:
391               template: {get_param: ObjectStorageHostnameFormat}
392               params:
393                 '%stackname%': {get_param: 'OS::stack_name'}
394           CloudDomain: {get_param: CloudDomain}
395           ServerMetadata: {get_param: ServerMetadata}
396           NodeIndex: '%index%'
397           ServiceConfigSettings:
398             map_merge:
399               - get_attr: [ObjectStorageServiceChain, role_data, config_settings]
400               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
401               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
402               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
403               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
404               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
405           ServiceNames: {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
406           MonitoringSubscriptions: {get_attr: [ObjectStorageServiceChain, role_data, monitoring_subscriptions]}
407
408   CephStorage:
409     type: OS::Heat::ResourceGroup
410     depends_on: Networks
411     properties:
412       count: {get_param: CephStorageCount}
413       removal_policies: {get_param: CephStorageRemovalPolicies}
414       resource_def:
415         type: OS::TripleO::CephStorage
416         properties:
417           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
418           UpdateIdentifier: {get_param: UpdateIdentifier}
419           Hostname:
420             str_replace:
421               template: {get_param: CephStorageHostnameFormat}
422               params:
423                 '%stackname%': {get_param: 'OS::stack_name'}
424           CloudDomain: {get_param: CloudDomain}
425           ServerMetadata: {get_param: ServerMetadata}
426           NodeIndex: '%index%'
427           ServiceConfigSettings:
428             map_merge:
429               - get_attr: [CephStorageServiceChain, role_data, config_settings]
430               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
431               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
432               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
433               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
434               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
435           ServiceNames: {get_attr: [CephStorageServiceChain, role_data, service_names]}
436           MonitoringSubscriptions: {get_attr: [CephStorageServiceChain, role_data, monitoring_subscriptions]}
437
438   ControllerIpListMap:
439     type: OS::TripleO::Network::Ports::NetIpListMap
440     properties:
441       ControlPlaneIpList: {get_attr: [Controller, ip_address]}
442       ExternalIpList: {get_attr: [Controller, external_ip_address]}
443       InternalApiIpList: {get_attr: [Controller, internal_api_ip_address]}
444       StorageIpList: {get_attr: [Controller, storage_ip_address]}
445       StorageMgmtIpList: {get_attr: [Controller, storage_mgmt_ip_address]}
446       TenantIpList: {get_attr: [Controller, tenant_ip_address]}
447       ManagementIpList: {get_attr: [Controller, management_ip_address]}
448       EnabledServices: {get_attr: [ControllerServiceChain, role_data, service_names]}
449       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
450       ServiceHostnameList: {get_attr: [Controller, hostname]}
451
452   ComputeIpListMap:
453     type: OS::TripleO::Network::Ports::NetIpListMap
454     properties:
455       ControlPlaneIpList: {get_attr: [Compute, ip_address]}
456       ExternalIpList: {get_attr: [Compute, external_ip_address]}
457       InternalApiIpList: {get_attr: [Compute, internal_api_ip_address]}
458       StorageIpList: {get_attr: [Compute, storage_ip_address]}
459       StorageMgmtIpList: {get_attr: [Compute, storage_mgmt_ip_address]}
460       TenantIpList: {get_attr: [Compute, tenant_ip_address]}
461       ManagementIpList: {get_attr: [Compute, management_ip_address]}
462       EnabledServices: {get_attr: [ComputeServiceChain, role_data, service_names]}
463       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
464       ServiceHostnameList: {get_attr: [Compute, hostname]}
465
466   BlockStorageIpListMap:
467     type: OS::TripleO::Network::Ports::NetIpListMap
468     properties:
469       ControlPlaneIpList: {get_attr: [BlockStorage, ip_address]}
470       ExternalIpList: {get_attr: [BlockStorage, external_ip_address]}
471       InternalApiIpList: {get_attr: [BlockStorage, internal_api_ip_address]}
472       StorageIpList: {get_attr: [BlockStorage, storage_ip_address]}
473       StorageMgmtIpList: {get_attr: [BlockStorage, storage_mgmt_ip_address]}
474       TenantIpList: {get_attr: [BlockStorage, tenant_ip_address]}
475       ManagementIpList: {get_attr: [BlockStorage, management_ip_address]}
476       EnabledServices: {get_attr: [BlockStorageServiceChain, role_data, service_names]}
477       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
478       ServiceHostnameList: {get_attr: [BlockStorage, hostname]}
479
480   ObjectStorageIpListMap:
481     type: OS::TripleO::Network::Ports::NetIpListMap
482     properties:
483       ControlPlaneIpList: {get_attr: [ObjectStorage, ip_address]}
484       ExternalIpList: {get_attr: [ObjectStorage, external_ip_address]}
485       InternalApiIpList: {get_attr: [ObjectStorage, internal_api_ip_address]}
486       StorageIpList: {get_attr: [ObjectStorage, storage_ip_address]}
487       StorageMgmtIpList: {get_attr: [ObjectStorage, storage_mgmt_ip_address]}
488       TenantIpList: {get_attr: [ObjectStorage, tenant_ip_address]}
489       ManagementIpList: {get_attr: [ObjectStorage, management_ip_address]}
490       EnabledServices: {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
491       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
492       ServiceHostnameList: {get_attr: [ObjectStorage, hostname]}
493
494   CephStorageIpListMap:
495     type: OS::TripleO::Network::Ports::NetIpListMap
496     properties:
497       ControlPlaneIpList: {get_attr: [CephStorage, ip_address]}
498       ExternalIpList: {get_attr: [CephStorage, external_ip_address]}
499       InternalApiIpList: {get_attr: [CephStorage, internal_api_ip_address]}
500       StorageIpList: {get_attr: [CephStorage, storage_ip_address]}
501       StorageMgmtIpList: {get_attr: [CephStorage, storage_mgmt_ip_address]}
502       TenantIpList: {get_attr: [CephStorage, tenant_ip_address]}
503       ManagementIpList: {get_attr: [CephStorage, management_ip_address]}
504       EnabledServices: {get_attr: [CephStorageServiceChain, role_data, service_names]}
505       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
506       ServiceHostnameList: {get_attr: [CephStorage, hostname]}
507
508   allNodesConfig:
509     type: OS::TripleO::AllNodes::SoftwareConfig
510     properties:
511       cloud_name_external: {get_param: CloudName}
512       cloud_name_internal_api: {get_param: CloudNameInternal}
513       cloud_name_storage: {get_param: CloudNameStorage}
514       cloud_name_storage_mgmt: {get_param: CloudNameStorageManagement}
515       cloud_name_ctlplane: {get_param: CloudNameCtlplane}
516       hosts:
517         - list_join:
518             - '\n'
519             - {get_attr: [Compute, hosts_entry]}
520         - list_join:
521             - '\n'
522             - {get_attr: [Controller, hosts_entry]}
523         - list_join:
524             - '\n'
525             - {get_attr: [BlockStorage, hosts_entry]}
526         - list_join:
527             - '\n'
528             - {get_attr: [ObjectStorage, hosts_entry]}
529         - list_join:
530             - '\n'
531             - {get_attr: [CephStorage, hosts_entry]}
532       enabled_services:
533         list_join:
534           - ','
535           - {get_attr: [ControllerServiceChain, role_data, service_names]}
536           - {get_attr: [ComputeServiceChain, role_data, service_names]}
537           - {get_attr: [BlockStorageServiceChain, role_data, service_names]}
538           - {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
539           - {get_attr: [CephStorageServiceChain, role_data, service_names]}
540       controller_ips: {get_attr: [Controller, ip_address]}
541       controller_names: {get_attr: [Controller, hostname]}
542       service_ips:
543         # Note (shardy) this somewhat complex yaql may be replaced
544         # with a map_deep_merge function in ocata.  It merges the
545         # list of maps, but appends to colliding lists when a service
546         # is deployed on more than one role
547         yaql:
548           expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
549           data:
550             l:
551               - {get_attr: [ControllerIpListMap, service_ips]}
552               - {get_attr: [ComputeIpListMap, service_ips]}
553               - {get_attr: [BlockStorageIpListMap, service_ips]}
554               - {get_attr: [ObjectStorageIpListMap, service_ips]}
555               - {get_attr: [CephStorageIpListMap, service_ips]}
556       service_node_names:
557         yaql:
558           expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
559           data:
560             l:
561               - {get_attr: [ControllerIpListMap, service_hostnames]}
562               - {get_attr: [ComputeIpListMap, service_hostnames]}
563               - {get_attr: [BlockStorageIpListMap, service_hostnames]}
564               - {get_attr: [ObjectStorageIpListMap, service_hostnames]}
565               - {get_attr: [CephStorageIpListMap, service_hostnames]}
566       # FIXME(shardy): These require further work to move into service_ips
567       memcache_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MemcachedNetwork]}]}
568       keystone_public_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystonePublicApiNetwork]}]}
569       keystone_admin_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]}
570       NetVipMap: {get_attr: [VipMap, net_ip_map]}
571       RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]}
572       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
573       DeployIdentifier: {get_param: DeployIdentifier}
574       UpdateIdentifier: {get_param: UpdateIdentifier}
575
576   MysqlRootPassword:
577     type: OS::Heat::RandomString
578     properties:
579       length: 10
580
581   RabbitCookie:
582     type: OS::Heat::RandomString
583     properties:
584       length: 20
585       salt: {get_param: RabbitCookieSalt}
586
587   DefaultPasswords:
588     type: OS::TripleO::DefaultPasswords
589     properties:
590       DefaultMysqlRootPassword: {get_attr: [MysqlRootPassword, value]}
591       DefaultRabbitCookie: {get_attr: [RabbitCookie, value]}
592       DefaultHeatAuthEncryptionKey: {get_attr: [HeatAuthEncryptionKey, value]}
593       DefaultPcsdPassword: {get_attr: [PcsdPassword, value]}
594       DefaultHorizonSecret: {get_attr: [HorizonSecret, value]}
595
596   # creates the network architecture
597   Networks:
598     type: OS::TripleO::Network
599
600   ControlVirtualIP:
601     type: OS::Neutron::Port
602     depends_on: Networks
603     properties:
604       name: control_virtual_ip
605       network: {get_param: NeutronControlPlaneID}
606       fixed_ips: {get_param: ControlFixedIPs}
607       replacement_policy: AUTO
608
609   RedisVirtualIP:
610     depends_on: Networks
611     type: OS::TripleO::Network::Ports::RedisVipPort
612     properties:
613       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
614       ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
615       PortName: redis_virtual_ip
616       NetworkName: {get_attr: [ServiceNetMap, service_net_map, RedisNetwork]}
617       ServiceName: redis
618       FixedIPs: {get_param: RedisVirtualFixedIPs}
619
620   # The public VIP is on the External net, falls back to ctlplane
621   PublicVirtualIP:
622     depends_on: Networks
623     type: OS::TripleO::Network::Ports::ExternalVipPort
624     properties:
625       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
626       ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
627       PortName: public_virtual_ip
628       FixedIPs: {get_param: PublicVirtualFixedIPs}
629
630   InternalApiVirtualIP:
631     depends_on: Networks
632     type: OS::TripleO::Network::Ports::InternalApiVipPort
633     properties:
634       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
635       PortName: internal_api_virtual_ip
636       FixedIPs: {get_param: InternalApiVirtualFixedIPs}
637
638   StorageVirtualIP:
639     depends_on: Networks
640     type: OS::TripleO::Network::Ports::StorageVipPort
641     properties:
642       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
643       PortName: storage_virtual_ip
644       FixedIPs: {get_param: StorageVirtualFixedIPs}
645
646   StorageMgmtVirtualIP:
647     depends_on: Networks
648     type: OS::TripleO::Network::Ports::StorageMgmtVipPort
649     properties:
650       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
651       PortName: storage_management_virtual_ip
652       FixedIPs: {get_param: StorageMgmtVirtualFixedIPs}
653
654   VipMap:
655     type: OS::TripleO::Network::Ports::NetVipMap
656     properties:
657       ControlPlaneIp: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
658       ExternalIp: {get_attr: [PublicVirtualIP, ip_address]}
659       ExternalIpUri: {get_attr: [PublicVirtualIP, ip_address_uri]}
660       InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]}
661       InternalApiIpUri: {get_attr: [InternalApiVirtualIP, ip_address_uri]}
662       StorageIp: {get_attr: [StorageVirtualIP, ip_address]}
663       StorageIpUri: {get_attr: [StorageVirtualIP, ip_address_uri]}
664       StorageMgmtIp: {get_attr: [StorageMgmtVirtualIP, ip_address]}
665       StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]}
666       # No tenant or management VIP required
667
668   # All Nodes Validations
669   AllNodesValidationConfig:
670     type: OS::TripleO::AllNodes::Validation
671     properties:
672       PingTestIps:
673         list_join:
674         - ' '
675         - - {get_attr: [Controller, resource.0.external_ip_address]}
676           - {get_attr: [Controller, resource.0.internal_api_ip_address]}
677           - {get_attr: [Controller, resource.0.storage_ip_address]}
678           - {get_attr: [Controller, resource.0.storage_mgmt_ip_address]}
679           - {get_attr: [Controller, resource.0.tenant_ip_address]}
680           - {get_attr: [Controller, resource.0.management_ip_address]}
681
682   UpdateWorkflow:
683     type: OS::TripleO::Tasks::UpdateWorkflow
684     properties:
685       controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
686       compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
687       blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
688       objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
689       cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
690       input_values:
691         deploy_identifier: {get_param: DeployIdentifier}
692         update_identifier: {get_param: UpdateIdentifier}
693
694   # Optional ExtraConfig for all nodes - all roles are passed in here, but
695   # the nested template may configure each role differently (or not at all)
696   AllNodesExtraConfig:
697     type: OS::TripleO::AllNodesExtraConfig
698     depends_on:
699       - UpdateWorkflow
700       - ComputeAllNodesValidationDeployment
701       - BlockStorageAllNodesValidationDeployment
702       - ObjectStorageAllNodesValidationDeployment
703       - CephStorageAllNodesValidationDeployment
704       - ControllerAllNodesValidationDeployment
705     properties:
706       controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
707       compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
708       blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
709       objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
710       cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
711
712   # Post deployment steps for all roles
713   AllNodesDeploySteps:
714     type: OS::TripleO::PostDeploySteps
715     properties:
716       servers:
717         Controller: {get_attr: [Controller, attributes, nova_server_resource]}
718         Compute: {get_attr: [Compute, attributes, nova_server_resource]}
719         BlockStorage: {get_attr: [BlockStorage, attributes, nova_server_resource]}
720         ObjectStorage: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
721         CephStorage: {get_attr: [CephStorage, attributes, nova_server_resource]}
722       role_data:
723         Controller: {get_attr: [ControllerServiceChain, role_data]}
724         Compute: {get_attr: [ComputeServiceChain, role_data]}
725         BlockStorage: {get_attr: [BlockStorageServiceChain, role_data]}
726         ObjectStorage: {get_attr: [ObjectStorageServiceChain, role_data]}
727         CephStorage: {get_attr: [CephStorageServiceChain, role_data]}
728
729 outputs:
730   ManagedEndpoints:
731     description: Asserts that the keystone endpoints have been provisioned.
732     value: true
733   KeystoneURL:
734     description: URL for the Overcloud Keystone service
735     value: {get_attr: [EndpointMap, endpoint_map, KeystonePublic, uri]}
736   KeystoneAdminVip:
737     description: Keystone Admin VIP endpoint
738     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]}
739   PublicVip:
740     description: Controller VIP for public API endpoints
741     value: {get_attr: [VipMap, net_ip_map, external]}
742   AodhInternalVip:
743     description: VIP for Aodh API internal endpoint
744     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, AodhApiNetwork]}]}
745   CeilometerInternalVip:
746     description: VIP for Ceilometer API internal endpoint
747     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, CeilometerApiNetwork]}]}
748   CinderInternalVip:
749     description: VIP for Cinder API internal endpoint
750     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, CinderApiNetwork]}]}
751   GlanceInternalVip:
752     description: VIP for Glance API internal endpoint
753     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, GlanceApiNetwork]}]}
754   GnocchiInternalVip:
755     description: VIP for Gnocchi API internal endpoint
756     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, GnocchiApiNetwork]}]}
757   HeatInternalVip:
758     description: VIP for Heat API internal endpoint
759     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, HeatApiNetwork]}]}
760   IronicInternalVip:
761     description: VIP for Ironic API internal endpoint
762     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, IronicApiNetwork]}]}
763   KeystoneInternalVip:
764     description: VIP for Keystone API internal endpoint
765     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystonePublicApiNetwork]}]}
766   ManilaInternalVip:
767     description: VIP for Manila API internal endpoint
768     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, ManilaApiNetwork]}]}
769   NeutronInternalVip:
770     description: VIP for Neutron API internal endpoint
771     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, NeutronApiNetwork]}]}
772   NovaInternalVip:
773     description: VIP for Nova API internal endpoint
774     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, NovaApiNetwork]}]}
775   OpenDaylightInternalVip:
776     description: VIP for OpenDaylight API internal endpoint
777     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, OpenDaylightApiNetwork]}]}
778   SaharaInternalVip:
779     description: VIP for Sahara API internal endpoint
780     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, SaharaApiNetwork]}]}
781   SwiftInternalVip:
782     description: VIP for Swift Proxy internal endpoint
783     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, SwiftProxyNetwork]}]}
784   EndpointMap:
785     description: |
786       Mapping of the resources with the needed info for their endpoints.
787       This includes the protocol used, the IP, port and also a full
788       representation of the URI.
789     value: {get_attr: [EndpointMap, endpoint_map]}
790   HostsEntry:
791     description: |
792       The content that should be appended to your /etc/hosts if you want to get
793       hostname-based access to the deployed nodes (useful for testing without
794       setting up a DNS).
795     value: {get_attr: [allNodesConfig, hosts_entries]}
796   EnabledServices:
797     description: The services enabled on each role
798     value:
799       Controller: {get_attr: [ControllerServiceChain, role_data, service_names]}
800       Compute: {get_attr: [ComputeServiceChain, role_data, service_names]}
801       BlockStorage: {get_attr: [BlockStorageServiceChain, role_data, service_names]}
802       ObjectStorage: {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
803       CephStorage: {get_attr: [CephStorageServiceChain, role_data, service_names]}