c9c30af5d8bb700aa6f50b833be43a6938846e8e
[apex-tripleo-heat-templates.git] / puppet / controller-role.yaml
1 heat_template_version: pike
2
3 description: >
4   OpenStack controller node configured by Puppet.
5
6 parameters:
7   controllerExtraConfig:
8     default: {}
9     description: |
10       Deprecated. Use ControllerExtraConfig via parameter_defaults instead.
11     type: json
12   ControllerExtraConfig:
13     default: {}
14     description: |
15       Controller specific hiera configuration data to inject into the cluster.
16     type: json
17   ControllerIPs:
18     default: {}
19     description: >
20       A network mapped list of IPs to assign to Controllers in the following form:
21       {
22         "internal_api": ["a.b.c.d", "e.f.g.h"],
23         ...
24       }
25     type: json
26   Debug:
27     default: ''
28     description: Set to True to enable debugging on all services.
29     type: string
30   EnableLoadBalancer:
31     default: true
32     description: Whether to deploy a LoadBalancer on the Controller
33     type: boolean
34   ExtraConfig:
35     default: {}
36     description: |
37       Additional hieradata to inject into the cluster, note that
38       ControllerExtraConfig takes precedence over ExtraConfig.
39     type: json
40   OvercloudControlFlavor:
41     description: Flavor for control nodes to request when deploying.
42     default: baremetal
43     type: string
44     constraints:
45       - custom_constraint: nova.flavor
46   controllerImage:
47     type: string
48     default: overcloud-full
49     constraints:
50       - custom_constraint: glance.image
51   ImageUpdatePolicy:
52     default: 'REBUILD_PRESERVE_EPHEMERAL'
53     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
54     type: string
55   KeyName:
56     default: default
57     description: Name of an existing Nova key pair to enable SSH access to the instances
58     type: string
59     constraints:
60       - custom_constraint: nova.keypair
61   NeutronPhysicalBridge:
62     default: 'br-ex'
63     description: An OVS bridge to create for accessing external networks.
64     type: string
65   NeutronPublicInterface:
66     default: nic1
67     description: Which interface to add to the NeutronPhysicalBridge.
68     type: string
69   ServiceNetMap:
70     default: {}
71     description: Mapping of service_name -> network name. Typically set
72                  via parameter_defaults in the resource registry.
73     type: json
74   EndpointMap:
75     default: {}
76     description: Mapping of service endpoint -> protocol. Typically set
77                  via parameter_defaults in the resource registry.
78     type: json
79   UpdateIdentifier:
80     default: ''
81     type: string
82     description: >
83       Setting to a previously unused value during stack-update will trigger
84       package update on all nodes
85   Hostname:
86     type: string
87     default: '' # Defaults to Heat created hostname
88   HostnameMap:
89     type: json
90     default: {}
91     description: Optional mapping to override hostnames
92   NetworkDeploymentActions:
93     type: comma_delimited_list
94     description: >
95       Heat action when to apply network configuration changes
96     default: ['CREATE']
97   NodeIndex:
98     type: number
99     default: 0
100   SoftwareConfigTransport:
101     default: POLL_SERVER_CFN
102     description: |
103       How the server should receive the metadata required for software configuration.
104     type: string
105     constraints:
106     - allowed_values: [POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL, ZAQAR_MESSAGE]
107   CloudDomain:
108     default: 'localdomain'
109     type: string
110     description: >
111       The DNS domain used for the hosts. This must match the
112       overcloud_domain_name configured on the undercloud.
113   ControllerServerMetadata:
114     default: {}
115     description: >
116       Extra properties or metadata passed to Nova for the created nodes in
117       the overcloud. It's accessible via the Nova metadata API. This option is
118       role-specific and is merged with the values given to the ServerMetadata
119       parameter.
120     type: json
121   ServerMetadata:
122     default: {}
123     description: >
124       Extra properties or metadata passed to Nova for the created nodes in
125       the overcloud. It's accessible via the Nova metadata API. This applies to
126       all roles and is merged with a role-specific metadata parameter.
127     type: json
128   ControllerSchedulerHints:
129     type: json
130     description: Optional scheduler hints to pass to nova
131     default: {}
132   ServiceConfigSettings:
133     type: json
134     default: {}
135   ServiceNames:
136     type: comma_delimited_list
137     default: []
138   MonitoringSubscriptions:
139     type: comma_delimited_list
140     default: []
141   ServiceMetadataSettings:
142     type: json
143     default: {}
144   ConfigCommand:
145     type: string
146     description: Command which will be run whenever configuration data changes
147     default: os-refresh-config --timeout 14400
148   ConfigCollectSplay:
149     type: number
150     default: 30
151     description: |
152       Maximum amount of time to possibly to delay configuation collection
153       polling. Defaults to 30 seconds. Set to 0 to disable it which will cause
154       the configuration collection to occur as soon as the collection process
155       starts.  This setting is used to prevent the configuration collection
156       processes from polling all at the exact same time.
157   UpgradeInitCommand:
158     type: string
159     description: |
160       Command or script snippet to run on all overcloud nodes to
161       initialize the upgrade process. E.g. a repository switch.
162     default: ''
163   UpgradeInitCommonCommand:
164     type: string
165     description: |
166       Common commands required by the upgrades process. This should not
167       normally be modified by the operator and is set and unset in the
168       major-upgrade-composable-steps.yaml and major-upgrade-converge.yaml
169       environment files.
170     default: ''
171   DeploymentServerBlacklistDict:
172     default: {}
173     type: json
174     description: >
175       Map of server hostnames to blacklist from any triggered
176       deployments. If the value is 1, the server will be blacklisted. This
177       parameter is generated from the parent template.
178   RoleParameters:
179     type: json
180     description: Role Specific Parameters
181     default: {}
182   DeploymentSwiftDataMap:
183     type: json
184     description: |
185       Map of servers to Swift container and object for storing deployment data.
186       The keys are the Heat assigned hostnames, and the value is a map of the
187       container/object name in Swift. Example value:
188         overcloud-controller-0:
189           container: overcloud-controller
190           object: 0
191         overcloud-controller-1:
192           container: overcloud-controller
193           object: 1
194         overcloud-controller-2:
195           container: overcloud-controller
196           object: 2
197         overcloud-novacompute-0:
198           container: overcloud-compute
199           object: 0
200     default: {}
201
202 parameter_groups:
203 - label: deprecated
204   description: Do not use deprecated params, they will be removed.
205   parameters:
206   - controllerExtraConfig
207
208 conditions:
209   server_not_blacklisted:
210     not:
211       equals:
212         - {get_param: [DeploymentServerBlacklistDict, {get_param: Hostname}]}
213         - 1
214   deployment_swift_data_map_unset:
215     equals:
216       - get_param:
217           - DeploymentSwiftDataMap
218           - {get_param: Hostname}
219       - ""
220
221 resources:
222
223   Controller:
224     type: OS::TripleO::ControllerServer
225     metadata:
226       os-collect-config:
227         command: {get_param: ConfigCommand}
228         splay: {get_param: ConfigCollectSplay}
229     properties:
230       image: {get_param: controllerImage}
231       image_update_policy: {get_param: ImageUpdatePolicy}
232       flavor: {get_param: OvercloudControlFlavor}
233       key_name: {get_param: KeyName}
234       networks:
235         - network: ctlplane
236       user_data_format: SOFTWARE_CONFIG
237       user_data: {get_resource: UserData}
238       name:
239         str_replace:
240             template: {get_param: Hostname}
241             params: {get_param: HostnameMap}
242       software_config_transport: {get_param: SoftwareConfigTransport}
243       metadata:
244         map_merge:
245           - {get_param: ServerMetadata}
246           - {get_param: ControllerServerMetadata}
247           - {get_param: ServiceMetadataSettings}
248       scheduler_hints: {get_param: ControllerSchedulerHints}
249       deployment_swift_data:
250         if:
251           - deployment_swift_data_map_unset
252           - {}
253           - {get_param: [DeploymentSwiftDataMap,
254                          {get_param: Hostname}]}
255
256   # Combine the NodeAdminUserData and NodeUserData mime archives
257   UserData:
258     type: OS::Heat::MultipartMime
259     properties:
260       parts:
261       - config: {get_resource: NodeAdminUserData}
262         type: multipart
263       - config: {get_resource: NodeUserData}
264         type: multipart
265       - config: {get_resource: RoleUserData}
266         type: multipart
267
268   # Creates the "heat-admin" user if configured via the environment
269   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
270   NodeAdminUserData:
271     type: OS::TripleO::NodeAdminUserData
272
273   # For optional operator additional userdata
274   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
275   NodeUserData:
276     type: OS::TripleO::NodeUserData
277
278   # For optional operator role-specific userdata
279   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
280   RoleUserData:
281     type: OS::TripleO::Controller::NodeUserData
282
283   ExternalPort:
284     type: OS::TripleO::Controller::Ports::ExternalPort
285     properties:
286       IPPool: {get_param: ControllerIPs}
287       NodeIndex: {get_param: NodeIndex}
288       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
289
290   InternalApiPort:
291     type: OS::TripleO::Controller::Ports::InternalApiPort
292     properties:
293       IPPool: {get_param: ControllerIPs}
294       NodeIndex: {get_param: NodeIndex}
295       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
296
297   StoragePort:
298     type: OS::TripleO::Controller::Ports::StoragePort
299     properties:
300       IPPool: {get_param: ControllerIPs}
301       NodeIndex: {get_param: NodeIndex}
302       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
303
304   StorageMgmtPort:
305     type: OS::TripleO::Controller::Ports::StorageMgmtPort
306     properties:
307       IPPool: {get_param: ControllerIPs}
308       NodeIndex: {get_param: NodeIndex}
309       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
310
311   TenantPort:
312     type: OS::TripleO::Controller::Ports::TenantPort
313     properties:
314       IPPool: {get_param: ControllerIPs}
315       NodeIndex: {get_param: NodeIndex}
316       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
317
318   ManagementPort:
319     type: OS::TripleO::Controller::Ports::ManagementPort
320     properties:
321       IPPool: {get_param: ControllerIPs}
322       NodeIndex: {get_param: NodeIndex}
323       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
324
325   NetIpMap:
326     type: OS::TripleO::Network::Ports::NetIpMap
327     properties:
328       ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
329       ExternalIp: {get_attr: [ExternalPort, ip_address]}
330       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
331       ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]}
332       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
333       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
334       InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]}
335       StorageIp: {get_attr: [StoragePort, ip_address]}
336       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
337       StorageIpUri: {get_attr: [StoragePort, ip_address_uri]}
338       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
339       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
340       StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]}
341       TenantIp: {get_attr: [TenantPort, ip_address]}
342       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
343       TenantIpUri: {get_attr: [TenantPort, ip_address_uri]}
344       ManagementIp: {get_attr: [ManagementPort, ip_address]}
345       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
346       ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]}
347
348   NetHostMap:
349     type: OS::Heat::Value
350     properties:
351       type: json
352       value:
353         external:
354           fqdn:
355             list_join:
356             - '.'
357             - - {get_attr: [Controller, name]}
358               - external
359               - {get_param: CloudDomain}
360           short:
361             list_join:
362             - '.'
363             - - {get_attr: [Controller, name]}
364               - external
365         internal_api:
366           fqdn:
367             list_join:
368             - '.'
369             - - {get_attr: [Controller, name]}
370               - internalapi
371               - {get_param: CloudDomain}
372           short:
373             list_join:
374             - '.'
375             - - {get_attr: [Controller, name]}
376               - internalapi
377         storage:
378           fqdn:
379             list_join:
380             - '.'
381             - - {get_attr: [Controller, name]}
382               - storage
383               - {get_param: CloudDomain}
384           short:
385             list_join:
386             - '.'
387             - - {get_attr: [Controller, name]}
388               - storage
389         storage_mgmt:
390           fqdn:
391             list_join:
392             - '.'
393             - - {get_attr: [Controller, name]}
394               - storagemgmt
395               - {get_param: CloudDomain}
396           short:
397             list_join:
398             - '.'
399             - - {get_attr: [Controller, name]}
400               - storagemgmt
401         tenant:
402           fqdn:
403             list_join:
404             - '.'
405             - - {get_attr: [Controller, name]}
406               - tenant
407               - {get_param: CloudDomain}
408           short:
409             list_join:
410             - '.'
411             - - {get_attr: [Controller, name]}
412               - tenant
413         management:
414           fqdn:
415             list_join:
416             - '.'
417             - - {get_attr: [Controller, name]}
418               - management
419               - {get_param: CloudDomain}
420           short:
421             list_join:
422             - '.'
423             - - {get_attr: [Controller, name]}
424               - management
425         ctlplane:
426           fqdn:
427             list_join:
428             - '.'
429             - - {get_attr: [Controller, name]}
430               - ctlplane
431               - {get_param: CloudDomain}
432           short:
433             list_join:
434             - '.'
435             - - {get_attr: [Controller, name]}
436               - ctlplane
437
438   PreNetworkConfig:
439     type: OS::TripleO::Controller::PreNetworkConfig
440     properties:
441       server: {get_resource: Controller}
442       RoleParameters: {get_param: RoleParameters}
443       ServiceNames: {get_param: ServiceNames}
444
445   NetworkConfig:
446     type: OS::TripleO::Controller::Net::SoftwareConfig
447     properties:
448       ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
449       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
450       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
451       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
452       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
453       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
454       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
455
456   NetworkDeployment:
457     type: OS::TripleO::SoftwareDeployment
458     depends_on: PreNetworkConfig
459     properties:
460       name: NetworkDeployment
461       config: {get_resource: NetworkConfig}
462       server: {get_resource: Controller}
463       actions:
464         if:
465           - server_not_blacklisted
466           - {get_param: NetworkDeploymentActions}
467           - []
468       input_values:
469         bridge_name: {get_param: NeutronPhysicalBridge}
470         interface_name: {get_param: NeutronPublicInterface}
471
472   # Resource for site-specific injection of root certificate
473   NodeTLSCAData:
474     depends_on: NetworkDeployment
475     type: OS::TripleO::NodeTLSCAData
476     properties:
477       server: {get_resource: Controller}
478
479   # Resource for site-specific passing of private keys/certificates
480   NodeTLSData:
481     depends_on: NodeTLSCAData
482     type: OS::TripleO::NodeTLSData
483     properties:
484       server: {get_resource: Controller}
485       NodeIndex: {get_param: NodeIndex}
486
487   ControllerUpgradeInitConfig:
488     type: OS::Heat::SoftwareConfig
489     properties:
490       group: script
491       config:
492         list_join:
493         - ''
494         - - "#!/bin/bash\n\n"
495           - "if [[ -f /etc/resolv.conf.save ]] ; then rm /etc/resolv.conf.save; fi\n\n"
496           - get_param: UpgradeInitCommand
497           - get_param: UpgradeInitCommonCommand
498
499   # Note we may be able to make this conditional on UpgradeInitCommandNotEmpty
500   # but https://bugs.launchpad.net/heat/+bug/1649900 needs fixing first
501   ControllerUpgradeInitDeployment:
502     type: OS::Heat::SoftwareDeployment
503     depends_on: NetworkDeployment
504     properties:
505       name: ControllerUpgradeInitDeployment
506       actions:
507         if:
508           - server_not_blacklisted
509           - ['CREATE', 'UPDATE']
510           - []
511       server: {get_resource: Controller}
512       config: {get_resource: ControllerUpgradeInitConfig}
513
514   ControllerDeployment:
515     type: OS::TripleO::SoftwareDeployment
516     depends_on: ControllerUpgradeInitDeployment
517     properties:
518       name: ControllerDeployment
519       actions:
520         if:
521           - server_not_blacklisted
522           - ['CREATE', 'UPDATE']
523           - []
524       config: {get_resource: ControllerConfig}
525       server: {get_resource: Controller}
526       input_values:
527         enable_load_balancer: {get_param: EnableLoadBalancer}
528         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
529
530   # Map heat metadata into hiera datafiles
531   ControllerConfig:
532     type: OS::Heat::StructuredConfig
533     properties:
534       group: hiera
535       config:
536         hierarchy:
537           - '"%{::uuid}"'
538           - heat_config_%{::deploy_config_name}
539           - config_step
540           - controller_extraconfig
541           - extraconfig
542           - service_configs
543           - service_names
544           - controller
545           - bootstrap_node # provided by BootstrapNodeConfig
546           - all_nodes # provided by allNodesConfig
547           - vip_data # provided by allNodesConfig
548           - '"%{::osfamily}"'
549           - neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre
550           - neutron_cisco_data # Optionally provided by ControllerExtraConfigPre
551           - cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre
552           - midonet_data #Optionally provided by AllNodesExtraConfig
553           - cisco_aci_data # Optionally provided by ControllerExtraConfigPre
554         merge_behavior: deeper
555         datafiles:
556           service_names:
557             service_names: {get_param: ServiceNames}
558             sensu::subscriptions: {get_param: MonitoringSubscriptions}
559           service_configs:
560             map_replace:
561               - {get_param: ServiceConfigSettings}
562               - values: {get_attr: [NetIpMap, net_ip_map]}
563           controller_extraconfig:
564             map_merge:
565               - {get_param: controllerExtraConfig}
566               - {get_param: ControllerExtraConfig}
567           extraconfig: {get_param: ExtraConfig}
568           controller:
569             enable_load_balancer: {get_input: enable_load_balancer}
570
571             # Misc
572             tripleo::haproxy::service_certificate: {get_attr: [NodeTLSData, deployed_ssl_certificate_path]}
573             tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
574             fqdn_internal_api: {get_attr: [NetHostMap, value, internal_api, fqdn]}
575             fqdn_storage: {get_attr: [NetHostMap, value, storage, fqdn]}
576             fqdn_storage_mgmt: {get_attr: [NetHostMap, value, storage_mgmt, fqdn]}
577             fqdn_tenant: {get_attr: [NetHostMap, value, tenant, fqdn]}
578             fqdn_management: {get_attr: [NetHostMap, value, management, fqdn]}
579             fqdn_ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
580             fqdn_external: {get_attr: [NetHostMap, value, external, fqdn]}
581
582   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
583   ControllerExtraConfigPre:
584     depends_on: ControllerDeployment
585     type: OS::TripleO::ControllerExtraConfigPre
586     properties:
587         server: {get_resource: Controller}
588
589   # Hook for site-specific additional pre-deployment config,
590   # applying to all nodes, e.g node registration/unregistration
591   NodeExtraConfig:
592     depends_on: [ControllerExtraConfigPre, NodeTLSData]
593     type: OS::TripleO::NodeExtraConfig
594     properties:
595         server: {get_resource: Controller}
596
597   UpdateConfig:
598     type: OS::TripleO::Tasks::PackageUpdate
599
600   UpdateDeployment:
601     type: OS::Heat::SoftwareDeployment
602     depends_on: NetworkDeployment
603     properties:
604       name: UpdateDeployment
605       actions:
606         if:
607           - server_not_blacklisted
608           - ['CREATE', 'UPDATE']
609           - []
610       config: {get_resource: UpdateConfig}
611       server: {get_resource: Controller}
612       input_values:
613         update_identifier:
614           get_param: UpdateIdentifier
615
616   SshHostPubKey:
617     type: OS::TripleO::Ssh::HostPubKey
618     depends_on: ControllerDeployment
619     properties:
620         server: {get_resource: Controller}
621
622 outputs:
623   ip_address:
624     description: IP address of the server in the ctlplane network
625     value: {get_attr: [Controller, networks, ctlplane, 0]}
626   external_ip_address:
627     description: IP address of the server in the external network
628     value: {get_attr: [ExternalPort, ip_address]}
629   internal_api_ip_address:
630     description: IP address of the server in the internal_api network
631     value: {get_attr: [InternalApiPort, ip_address]}
632   storage_ip_address:
633     description: IP address of the server in the storage network
634     value: {get_attr: [StoragePort, ip_address]}
635   storage_mgmt_ip_address:
636     description: IP address of the server in the storage_mgmt network
637     value: {get_attr: [StorageMgmtPort, ip_address]}
638   tenant_ip_address:
639     description: IP address of the server in the tenant network
640     value: {get_attr: [TenantPort, ip_address]}
641   management_ip_address:
642     description: IP address of the server in the management network
643     value: {get_attr: [ManagementPort, ip_address]}
644   deployed_server_port_map:
645     description:
646       Map of Heat created hostname of the server to ip address. This is the
647       hostname before it has been mapped with the HostnameMap parameter, and
648       the IP address from the ctlplane network. This map can be used to construct
649       the DeployedServerPortMap parameter when using split-stack.
650     value:
651       map_replace:
652         - hostname:
653             fixed_ips:
654               - ip_address: {get_attr: [Controller, networks, ctlplane, 0]}
655         - keys:
656             hostname:
657               list_join:
658                 - '-'
659                 - - {get_param: Hostname}
660                   - ctlplane
661   deployed_server_deployment_swift_data_map:
662     description:
663       Map of Heat created hostname of the server to the Swift container and object
664       used to created the temporary url for metadata polling with
665       os-collect-config.
666     value:
667       map_replace:
668         - hostname:
669             container:
670               str_split:
671                 - '/'
672                 - {get_attr: [Controller, os_collect_config, request, metadata_url]}
673                 - 5
674             object:
675               str_split:
676                 - '?'
677                 - str_split:
678                     - '/'
679                     - {get_attr: [Controller, os_collect_config, request, metadata_url]}
680                     - 6
681                 - 0
682         - keys: {hostname: {get_param: Hostname}}
683   hostname:
684     description: Hostname of the server
685     value: {get_attr: [Controller, name]}
686   hostname_map:
687     description: Mapping of network names to hostnames
688     value:
689       external: {get_attr: [NetHostMap, value, external, fqdn]}
690       internal_api: {get_attr: [NetHostMap, value, internal_api, fqdn]}
691       storage: {get_attr: [NetHostMap, value, storage, fqdn]}
692       storage_mgmt: {get_attr: [NetHostMap, value, storage_mgmt, fqdn]}
693       tenant: {get_attr: [NetHostMap, value, tenant, fqdn]}
694       management: {get_attr: [NetHostMap, value, management, fqdn]}
695       ctlplane: {get_attr: [NetHostMap, value, ctlplane, fqdn]}
696   hosts_entry:
697     description: >
698       Server's IP address and hostname in the /etc/hosts format
699     value:
700       str_replace:
701         template: |
702           PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
703           EXTERNALIP EXTERNALHOST.DOMAIN EXTERNALHOST
704           INTERNAL_APIIP INTERNAL_APIHOST.DOMAIN INTERNAL_APIHOST
705           STORAGEIP STORAGEHOST.DOMAIN STORAGEHOST
706           STORAGE_MGMTIP STORAGE_MGMTHOST.DOMAIN STORAGE_MGMTHOST
707           TENANTIP TENANTHOST.DOMAIN TENANTHOST
708           MANAGEMENTIP MANAGEMENTHOST.DOMAIN MANAGEMENTHOST
709           CTLPLANEIP CTLPLANEHOST.DOMAIN CTLPLANEHOST
710         params:
711           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
712           DOMAIN: {get_param: CloudDomain}
713           PRIMARYHOST: {get_attr: [Controller, name]}
714           EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
715           EXTERNALHOST: {get_attr: [NetHostMap, value, external, short]}
716           INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
717           INTERNAL_APIHOST: {get_attr: [NetHostMap, value, internal_api, short]}
718           STORAGEIP: {get_attr: [StoragePort, ip_address]}
719           STORAGEHOST: {get_attr: [NetHostMap, value, storage, short]}
720           STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
721           STORAGE_MGMTHOST: {get_attr: [NetHostMap, value, storage_mgmt, short]}
722           TENANTIP: {get_attr: [TenantPort, ip_address]}
723           TENANTHOST: {get_attr: [NetHostMap, value, tenant, short]}
724           MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
725           MANAGEMENTHOST: {get_attr: [NetHostMap, value, management, short]}
726           CTLPLANEIP: {get_attr: [Controller, networks, ctlplane, 0]}
727           CTLPLANEHOST: {get_attr: [NetHostMap, value, ctlplane, short]}
728   known_hosts_entry:
729     description: Entry for ssh known hosts
730     value:
731       str_replace:
732         template: "PRIMARYIP,PRIMARYHOST.DOMAIN,PRIMARYHOST,\
733 EXTERNALIP,EXTERNALHOST.DOMAIN,EXTERNALHOST,\
734 INTERNAL_APIIP,INTERNAL_APIHOST.DOMAIN,INTERNAL_APIHOST,\
735 STORAGEIP,STORAGEHOST.DOMAIN,STORAGEHOST,\
736 STORAGE_MGMTIP,STORAGE_MGMTHOST.DOMAIN,STORAGE_MGMTHOST,\
737 TENANTIP,TENANTHOST.DOMAIN,TENANTHOST,\
738 MANAGEMENTIP,MANAGEMENTHOST.DOMAIN,MANAGEMENTHOST,\
739 CTLPLANEIP,CTLPLANEHOST.DOMAIN,CTLPLANEHOST HOSTSSHPUBKEY"
740         params:
741           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
742           DOMAIN: {get_param: CloudDomain}
743           PRIMARYHOST: {get_attr: [Controller, name]}
744           EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
745           EXTERNALHOST: {get_attr: [NetHostMap, value, external, short]}
746           INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
747           INTERNAL_APIHOST: {get_attr: [NetHostMap, value, internal_api, short]}
748           STORAGEIP: {get_attr: [StoragePort, ip_address]}
749           STORAGEHOST: {get_attr: [NetHostMap, value, storage, short]}
750           STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
751           STORAGE_MGMTHOST: {get_attr: [NetHostMap, value, storage_mgmt, short]}
752           TENANTIP: {get_attr: [TenantPort, ip_address]}
753           TENANTHOST: {get_attr: [NetHostMap, value, tenant, short]}
754           MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
755           MANAGEMENTHOST: {get_attr: [NetHostMap, value, management, short]}
756           CTLPLANEIP: {get_attr: [Controller, networks, ctlplane, 0]}
757           CTLPLANEHOST: {get_attr: [NetHostMap, value, ctlplane, short]}
758           HOSTSSHPUBKEY: {get_attr: [SshHostPubKey, ecdsa]}
759   nova_server_resource:
760     description: Heat resource handle for the Nova compute server
761     value:
762       {get_resource: Controller}
763     condition: server_not_blacklisted
764   tls_key_modulus_md5:
765     description: MD5 checksum of the TLS Key Modulus
766     value: {get_attr: [NodeTLSData, key_modulus_md5]}
767   tls_cert_modulus_md5:
768     description: MD5 checksum of the TLS Certificate Modulus
769     value: {get_attr: [NodeTLSData, cert_modulus_md5]}
770   os_collect_config:
771     description: The os-collect-config configuration associated with this server resource
772     value: {get_attr: [Controller, os_collect_config]}