Move per-role NetIpListMap's into jinja template loop
[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   {{role.name}}IpListMap:
286     type: OS::TripleO::Network::Ports::NetIpListMap
287     properties:
288       ControlPlaneIpList: {get_attr: [{{role.name}}, ip_address]}
289       ExternalIpList: {get_attr: [{{role.name}}, external_ip_address]}
290       InternalApiIpList: {get_attr: [{{role.name}}, internal_api_ip_address]}
291       StorageIpList: {get_attr: [{{role.name}}, storage_ip_address]}
292       StorageMgmtIpList: {get_attr: [{{role.name}}, storage_mgmt_ip_address]}
293       TenantIpList: {get_attr: [{{role.name}}, tenant_ip_address]}
294       ManagementIpList: {get_attr: [{{role.name}}, management_ip_address]}
295       EnabledServices: {get_attr: [{{role.name}}ServiceChain, role_data, service_names]}
296       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
297       ServiceHostnameList: {get_attr: [{{role.name}}, hostname]}
298
299 {% endfor %}
300
301   Controller:
302     type: OS::Heat::ResourceGroup
303     depends_on: Networks
304     properties:
305       count: {get_param: ControllerCount}
306       removal_policies: {get_param: ControllerRemovalPolicies}
307       resource_def:
308         type: OS::TripleO::Controller
309         properties:
310           CloudDomain: {get_param: CloudDomain}
311           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
312           EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
313           Hostname:
314             str_replace:
315               template: {get_param: ControllerHostnameFormat}
316               params:
317                 '%stackname%': {get_param: 'OS::stack_name'}
318           NodeIndex: '%index%'
319           ServiceConfigSettings:
320             map_merge:
321               - get_attr: [ControllerServiceChain, role_data, config_settings]
322               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
323               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
324               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
325               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
326               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
327               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
328           ServiceNames: {get_attr: [ControllerServiceChain, role_data, service_names]}
329           MonitoringSubscriptions: {get_attr: [ControllerServiceChain, role_data, monitoring_subscriptions]}
330
331   Compute:
332     type: OS::Heat::ResourceGroup
333     depends_on: Networks
334     properties:
335       count: {get_param: ComputeCount}
336       removal_policies: {get_param: ComputeRemovalPolicies}
337       resource_def:
338         type: OS::TripleO::Compute
339         properties:
340           CloudDomain: {get_param: CloudDomain}
341           NeutronPhysicalBridge: {get_param: HypervisorNeutronPhysicalBridge}
342           NeutronPublicInterface: {get_param: HypervisorNeutronPublicInterface}
343           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
344           EndpointMap: {get_attr: [EndpointMap, endpoint_map]}
345           Hostname:
346             str_replace:
347               template: {get_param: ComputeHostnameFormat}
348               params:
349                 '%stackname%': {get_param: 'OS::stack_name'}
350           NodeIndex: '%index%'
351           ServiceConfigSettings:
352             map_merge:
353               - get_attr: [ComputeServiceChain, role_data, config_settings]
354               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
355               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
356               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
357               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
358               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
359           ServiceNames: {get_attr: [ComputeServiceChain, role_data, service_names]}
360           MonitoringSubscriptions: {get_attr: [ComputeServiceChain, role_data, monitoring_subscriptions]}
361
362   BlockStorage:
363     type: OS::Heat::ResourceGroup
364     depends_on: Networks
365     properties:
366       count: {get_param: BlockStorageCount}
367       removal_policies: {get_param: BlockStorageRemovalPolicies}
368       resource_def:
369         type: OS::TripleO::BlockStorage
370         properties:
371           UpdateIdentifier: {get_param: UpdateIdentifier}
372           Hostname:
373             str_replace:
374               template: {get_param: BlockStorageHostnameFormat}
375               params:
376                 '%stackname%': {get_param: 'OS::stack_name'}
377           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
378           CloudDomain: {get_param: CloudDomain}
379           ServerMetadata: {get_param: ServerMetadata}
380           NodeIndex: '%index%'
381           ServiceConfigSettings:
382             map_merge:
383               - get_attr: [BlockStorageServiceChain, role_data, config_settings]
384               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
385               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
386               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
387               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
388               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
389           ServiceNames: {get_attr: [BlockStorageServiceChain, role_data, service_names]}
390           MonitoringSubscriptions: {get_attr: [BlockStorageServiceChain, role_data, monitoring_subscriptions]}
391
392   ObjectStorage:
393     type: OS::Heat::ResourceGroup
394     depends_on: Networks
395     properties:
396       count: {get_param: ObjectStorageCount}
397       removal_policies: {get_param: ObjectStorageRemovalPolicies}
398       resource_def:
399         type: OS::TripleO::ObjectStorage
400         properties:
401           UpdateIdentifier: {get_param: UpdateIdentifier}
402           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
403           Hostname:
404             str_replace:
405               template: {get_param: ObjectStorageHostnameFormat}
406               params:
407                 '%stackname%': {get_param: 'OS::stack_name'}
408           CloudDomain: {get_param: CloudDomain}
409           ServerMetadata: {get_param: ServerMetadata}
410           NodeIndex: '%index%'
411           ServiceConfigSettings:
412             map_merge:
413               - get_attr: [ObjectStorageServiceChain, role_data, config_settings]
414               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
415               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
416               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
417               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
418               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
419           ServiceNames: {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
420           MonitoringSubscriptions: {get_attr: [ObjectStorageServiceChain, role_data, monitoring_subscriptions]}
421
422   CephStorage:
423     type: OS::Heat::ResourceGroup
424     depends_on: Networks
425     properties:
426       count: {get_param: CephStorageCount}
427       removal_policies: {get_param: CephStorageRemovalPolicies}
428       resource_def:
429         type: OS::TripleO::CephStorage
430         properties:
431           ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map]}
432           UpdateIdentifier: {get_param: UpdateIdentifier}
433           Hostname:
434             str_replace:
435               template: {get_param: CephStorageHostnameFormat}
436               params:
437                 '%stackname%': {get_param: 'OS::stack_name'}
438           CloudDomain: {get_param: CloudDomain}
439           ServerMetadata: {get_param: ServerMetadata}
440           NodeIndex: '%index%'
441           ServiceConfigSettings:
442             map_merge:
443               - get_attr: [CephStorageServiceChain, role_data, config_settings]
444               - get_attr: [ControllerServiceChain, role_data, global_config_settings]
445               - get_attr: [ComputeServiceChain, role_data, global_config_settings]
446               - get_attr: [BlockStorageServiceChain, role_data, global_config_settings]
447               - get_attr: [ObjectStorageServiceChain, role_data, global_config_settings]
448               - get_attr: [CephStorageServiceChain, role_data, global_config_settings]
449           ServiceNames: {get_attr: [CephStorageServiceChain, role_data, service_names]}
450           MonitoringSubscriptions: {get_attr: [CephStorageServiceChain, role_data, monitoring_subscriptions]}
451
452   allNodesConfig:
453     type: OS::TripleO::AllNodes::SoftwareConfig
454     properties:
455       cloud_name_external: {get_param: CloudName}
456       cloud_name_internal_api: {get_param: CloudNameInternal}
457       cloud_name_storage: {get_param: CloudNameStorage}
458       cloud_name_storage_mgmt: {get_param: CloudNameStorageManagement}
459       cloud_name_ctlplane: {get_param: CloudNameCtlplane}
460       hosts:
461         - list_join:
462             - '\n'
463             - {get_attr: [Compute, hosts_entry]}
464         - list_join:
465             - '\n'
466             - {get_attr: [Controller, hosts_entry]}
467         - list_join:
468             - '\n'
469             - {get_attr: [BlockStorage, hosts_entry]}
470         - list_join:
471             - '\n'
472             - {get_attr: [ObjectStorage, hosts_entry]}
473         - list_join:
474             - '\n'
475             - {get_attr: [CephStorage, hosts_entry]}
476       enabled_services:
477         list_join:
478           - ','
479           - {get_attr: [ControllerServiceChain, role_data, service_names]}
480           - {get_attr: [ComputeServiceChain, role_data, service_names]}
481           - {get_attr: [BlockStorageServiceChain, role_data, service_names]}
482           - {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
483           - {get_attr: [CephStorageServiceChain, role_data, service_names]}
484       controller_ips: {get_attr: [Controller, ip_address]}
485       controller_names: {get_attr: [Controller, hostname]}
486       service_ips:
487         # Note (shardy) this somewhat complex yaql may be replaced
488         # with a map_deep_merge function in ocata.  It merges the
489         # list of maps, but appends to colliding lists when a service
490         # is deployed on more than one role
491         yaql:
492           expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
493           data:
494             l:
495               - {get_attr: [ControllerIpListMap, service_ips]}
496               - {get_attr: [ComputeIpListMap, service_ips]}
497               - {get_attr: [BlockStorageIpListMap, service_ips]}
498               - {get_attr: [ObjectStorageIpListMap, service_ips]}
499               - {get_attr: [CephStorageIpListMap, service_ips]}
500       service_node_names:
501         yaql:
502           expression: dict($.data.l.where($ != null).selectMany($.items()).groupBy($[0], $[1], [$[0], $[1].flatten()]))
503           data:
504             l:
505               - {get_attr: [ControllerIpListMap, service_hostnames]}
506               - {get_attr: [ComputeIpListMap, service_hostnames]}
507               - {get_attr: [BlockStorageIpListMap, service_hostnames]}
508               - {get_attr: [ObjectStorageIpListMap, service_hostnames]}
509               - {get_attr: [CephStorageIpListMap, service_hostnames]}
510       # FIXME(shardy): These require further work to move into service_ips
511       memcache_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, MemcachedNetwork]}]}
512       keystone_public_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystonePublicApiNetwork]}]}
513       keystone_admin_api_node_ips: {get_attr: [ControllerIpListMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]}
514       NetVipMap: {get_attr: [VipMap, net_ip_map]}
515       RedisVirtualIP: {get_attr: [RedisVirtualIP, ip_address]}
516       ServiceNetMap: {get_attr: [ServiceNetMap, service_net_map_lower]}
517       DeployIdentifier: {get_param: DeployIdentifier}
518       UpdateIdentifier: {get_param: UpdateIdentifier}
519
520   MysqlRootPassword:
521     type: OS::Heat::RandomString
522     properties:
523       length: 10
524
525   RabbitCookie:
526     type: OS::Heat::RandomString
527     properties:
528       length: 20
529       salt: {get_param: RabbitCookieSalt}
530
531   DefaultPasswords:
532     type: OS::TripleO::DefaultPasswords
533     properties:
534       DefaultMysqlRootPassword: {get_attr: [MysqlRootPassword, value]}
535       DefaultRabbitCookie: {get_attr: [RabbitCookie, value]}
536       DefaultHeatAuthEncryptionKey: {get_attr: [HeatAuthEncryptionKey, value]}
537       DefaultPcsdPassword: {get_attr: [PcsdPassword, value]}
538       DefaultHorizonSecret: {get_attr: [HorizonSecret, value]}
539
540   # creates the network architecture
541   Networks:
542     type: OS::TripleO::Network
543
544   ControlVirtualIP:
545     type: OS::Neutron::Port
546     depends_on: Networks
547     properties:
548       name: control_virtual_ip
549       network: {get_param: NeutronControlPlaneID}
550       fixed_ips: {get_param: ControlFixedIPs}
551       replacement_policy: AUTO
552
553   RedisVirtualIP:
554     depends_on: Networks
555     type: OS::TripleO::Network::Ports::RedisVipPort
556     properties:
557       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
558       ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
559       PortName: redis_virtual_ip
560       NetworkName: {get_attr: [ServiceNetMap, service_net_map, RedisNetwork]}
561       ServiceName: redis
562       FixedIPs: {get_param: RedisVirtualFixedIPs}
563
564   # The public VIP is on the External net, falls back to ctlplane
565   PublicVirtualIP:
566     depends_on: Networks
567     type: OS::TripleO::Network::Ports::ExternalVipPort
568     properties:
569       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
570       ControlPlaneNetwork: {get_param: NeutronControlPlaneID}
571       PortName: public_virtual_ip
572       FixedIPs: {get_param: PublicVirtualFixedIPs}
573
574   InternalApiVirtualIP:
575     depends_on: Networks
576     type: OS::TripleO::Network::Ports::InternalApiVipPort
577     properties:
578       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
579       PortName: internal_api_virtual_ip
580       FixedIPs: {get_param: InternalApiVirtualFixedIPs}
581
582   StorageVirtualIP:
583     depends_on: Networks
584     type: OS::TripleO::Network::Ports::StorageVipPort
585     properties:
586       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
587       PortName: storage_virtual_ip
588       FixedIPs: {get_param: StorageVirtualFixedIPs}
589
590   StorageMgmtVirtualIP:
591     depends_on: Networks
592     type: OS::TripleO::Network::Ports::StorageMgmtVipPort
593     properties:
594       ControlPlaneIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
595       PortName: storage_management_virtual_ip
596       FixedIPs: {get_param: StorageMgmtVirtualFixedIPs}
597
598   VipMap:
599     type: OS::TripleO::Network::Ports::NetVipMap
600     properties:
601       ControlPlaneIp: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
602       ExternalIp: {get_attr: [PublicVirtualIP, ip_address]}
603       ExternalIpUri: {get_attr: [PublicVirtualIP, ip_address_uri]}
604       InternalApiIp: {get_attr: [InternalApiVirtualIP, ip_address]}
605       InternalApiIpUri: {get_attr: [InternalApiVirtualIP, ip_address_uri]}
606       StorageIp: {get_attr: [StorageVirtualIP, ip_address]}
607       StorageIpUri: {get_attr: [StorageVirtualIP, ip_address_uri]}
608       StorageMgmtIp: {get_attr: [StorageMgmtVirtualIP, ip_address]}
609       StorageMgmtIpUri: {get_attr: [StorageMgmtVirtualIP, ip_address_uri]}
610       # No tenant or management VIP required
611
612   # All Nodes Validations
613   AllNodesValidationConfig:
614     type: OS::TripleO::AllNodes::Validation
615     properties:
616       PingTestIps:
617         list_join:
618         - ' '
619         - - {get_attr: [Controller, resource.0.external_ip_address]}
620           - {get_attr: [Controller, resource.0.internal_api_ip_address]}
621           - {get_attr: [Controller, resource.0.storage_ip_address]}
622           - {get_attr: [Controller, resource.0.storage_mgmt_ip_address]}
623           - {get_attr: [Controller, resource.0.tenant_ip_address]}
624           - {get_attr: [Controller, resource.0.management_ip_address]}
625
626   UpdateWorkflow:
627     type: OS::TripleO::Tasks::UpdateWorkflow
628     properties:
629       controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
630       compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
631       blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
632       objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
633       cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
634       input_values:
635         deploy_identifier: {get_param: DeployIdentifier}
636         update_identifier: {get_param: UpdateIdentifier}
637
638   # Optional ExtraConfig for all nodes - all roles are passed in here, but
639   # the nested template may configure each role differently (or not at all)
640   AllNodesExtraConfig:
641     type: OS::TripleO::AllNodesExtraConfig
642     depends_on:
643       - UpdateWorkflow
644       - ComputeAllNodesValidationDeployment
645       - BlockStorageAllNodesValidationDeployment
646       - ObjectStorageAllNodesValidationDeployment
647       - CephStorageAllNodesValidationDeployment
648       - ControllerAllNodesValidationDeployment
649     properties:
650       controller_servers: {get_attr: [Controller, attributes, nova_server_resource]}
651       compute_servers: {get_attr: [Compute, attributes, nova_server_resource]}
652       blockstorage_servers: {get_attr: [BlockStorage, attributes, nova_server_resource]}
653       objectstorage_servers: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
654       cephstorage_servers: {get_attr: [CephStorage, attributes, nova_server_resource]}
655
656   # Post deployment steps for all roles
657   AllNodesDeploySteps:
658     type: OS::TripleO::PostDeploySteps
659     properties:
660       servers:
661         Controller: {get_attr: [Controller, attributes, nova_server_resource]}
662         Compute: {get_attr: [Compute, attributes, nova_server_resource]}
663         BlockStorage: {get_attr: [BlockStorage, attributes, nova_server_resource]}
664         ObjectStorage: {get_attr: [ObjectStorage, attributes, nova_server_resource]}
665         CephStorage: {get_attr: [CephStorage, attributes, nova_server_resource]}
666       role_data:
667         Controller: {get_attr: [ControllerServiceChain, role_data]}
668         Compute: {get_attr: [ComputeServiceChain, role_data]}
669         BlockStorage: {get_attr: [BlockStorageServiceChain, role_data]}
670         ObjectStorage: {get_attr: [ObjectStorageServiceChain, role_data]}
671         CephStorage: {get_attr: [CephStorageServiceChain, role_data]}
672
673 outputs:
674   ManagedEndpoints:
675     description: Asserts that the keystone endpoints have been provisioned.
676     value: true
677   KeystoneURL:
678     description: URL for the Overcloud Keystone service
679     value: {get_attr: [EndpointMap, endpoint_map, KeystonePublic, uri]}
680   KeystoneAdminVip:
681     description: Keystone Admin VIP endpoint
682     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystoneAdminApiNetwork]}]}
683   PublicVip:
684     description: Controller VIP for public API endpoints
685     value: {get_attr: [VipMap, net_ip_map, external]}
686   AodhInternalVip:
687     description: VIP for Aodh API internal endpoint
688     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, AodhApiNetwork]}]}
689   CeilometerInternalVip:
690     description: VIP for Ceilometer API internal endpoint
691     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, CeilometerApiNetwork]}]}
692   CinderInternalVip:
693     description: VIP for Cinder API internal endpoint
694     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, CinderApiNetwork]}]}
695   GlanceInternalVip:
696     description: VIP for Glance API internal endpoint
697     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, GlanceApiNetwork]}]}
698   GnocchiInternalVip:
699     description: VIP for Gnocchi API internal endpoint
700     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, GnocchiApiNetwork]}]}
701   HeatInternalVip:
702     description: VIP for Heat API internal endpoint
703     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, HeatApiNetwork]}]}
704   IronicInternalVip:
705     description: VIP for Ironic API internal endpoint
706     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, IronicApiNetwork]}]}
707   KeystoneInternalVip:
708     description: VIP for Keystone API internal endpoint
709     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, KeystonePublicApiNetwork]}]}
710   ManilaInternalVip:
711     description: VIP for Manila API internal endpoint
712     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, ManilaApiNetwork]}]}
713   NeutronInternalVip:
714     description: VIP for Neutron API internal endpoint
715     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, NeutronApiNetwork]}]}
716   NovaInternalVip:
717     description: VIP for Nova API internal endpoint
718     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, NovaApiNetwork]}]}
719   OpenDaylightInternalVip:
720     description: VIP for OpenDaylight API internal endpoint
721     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, OpenDaylightApiNetwork]}]}
722   SaharaInternalVip:
723     description: VIP for Sahara API internal endpoint
724     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, SaharaApiNetwork]}]}
725   SwiftInternalVip:
726     description: VIP for Swift Proxy internal endpoint
727     value: {get_attr: [VipMap, net_ip_map, {get_attr: [ServiceNetMap, service_net_map, SwiftProxyNetwork]}]}
728   EndpointMap:
729     description: |
730       Mapping of the resources with the needed info for their endpoints.
731       This includes the protocol used, the IP, port and also a full
732       representation of the URI.
733     value: {get_attr: [EndpointMap, endpoint_map]}
734   HostsEntry:
735     description: |
736       The content that should be appended to your /etc/hosts if you want to get
737       hostname-based access to the deployed nodes (useful for testing without
738       setting up a DNS).
739     value: {get_attr: [allNodesConfig, hosts_entries]}
740   EnabledServices:
741     description: The services enabled on each role
742     value:
743       Controller: {get_attr: [ControllerServiceChain, role_data, service_names]}
744       Compute: {get_attr: [ComputeServiceChain, role_data, service_names]}
745       BlockStorage: {get_attr: [BlockStorageServiceChain, role_data, service_names]}
746       ObjectStorage: {get_attr: [ObjectStorageServiceChain, role_data, service_names]}
747       CephStorage: {get_attr: [CephStorageServiceChain, role_data, service_names]}