c35f9b6bb86168de3ee943ef7e88629852a5a29c
[apex-tripleo-heat-templates.git] / puppet / controller.yaml
1 heat_template_version: 2016-10-14
2
3 description: >
4   OpenStack controller node configured by Puppet.
5
6 parameters:
7   AdminPassword:
8     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
9     type: string
10     hidden: true
11   AodhPassword:
12     description: The password for the aodh services.
13     type: string
14     hidden: true
15   controllerExtraConfig:
16     default: {}
17     description: |
18       Deprecated. Use ControllerExtraConfig via parameter_defaults instead.
19     type: json
20   ControllerExtraConfig:
21     default: {}
22     description: |
23       Controller specific hiera configuration data to inject into the cluster.
24     type: json
25   ControllerIPs:
26     default: {}
27     description: >
28       A network mapped list of IPs to assign to Controllers in the following form:
29       {
30         "internal_api": ["a.b.c.d", "e.f.g.h"],
31         ...
32       }
33     type: json
34   ControlVirtualInterface:
35     default: 'br-ex'
36     description: Interface where virtual ip will be assigned.
37     type: string
38   CorosyncIPv6:
39     default: false
40     description: Enable IPv6 in Corosync
41     type: boolean
42   Debug:
43     default: ''
44     description: Set to True to enable debugging on all services.
45     type: string
46   EnableFencing:
47     default: false
48     description: Whether to enable fencing in Pacemaker or not.
49     type: boolean
50   EnableGalera:
51     default: true
52     description: Whether to use Galera instead of regular MariaDB.
53     type: boolean
54   EnableLoadBalancer:
55     default: true
56     description: Whether to deploy a LoadBalancer on the Controller
57     type: boolean
58   ExtraConfig:
59     default: {}
60     description: |
61       Additional hieradata to inject into the cluster, note that
62       ControllerExtraConfig takes precedence over ExtraConfig.
63     type: json
64   FencingConfig:
65     default: {}
66     description: |
67       Pacemaker fencing configuration. The JSON should have
68       the following structure:
69         {
70           "devices": [
71             {
72               "agent": "AGENT_NAME",
73               "host_mac": "HOST_MAC_ADDRESS",
74               "params": {"PARAM_NAME": "PARAM_VALUE"}
75             }
76           ]
77         }
78       For instance:
79         {
80           "devices": [
81             {
82               "agent": "fence_xvm",
83               "host_mac": "52:54:00:aa:bb:cc",
84               "params": {
85                 "multicast_address": "225.0.0.12",
86                 "port": "baremetal_0",
87                 "manage_fw": true,
88                 "manage_key_file": true,
89                 "key_file": "/etc/fence_xvm.key",
90                 "key_file_password": "abcdef"
91               }
92             }
93           ]
94         }
95     type: json
96   OvercloudControlFlavor:
97     description: Flavor for control nodes to request when deploying.
98     default: baremetal
99     type: string
100     constraints:
101       - custom_constraint: nova.flavor
102   HAProxyStatsPassword:
103     description: Password for HAProxy stats endpoint
104     type: string
105   HAProxyStatsUser:
106     description: User for HAProxy stats endpoint
107     default: admin
108     type: string
109   HAProxySyslogAddress:
110     default: /dev/log
111     description: Syslog address where HAproxy will send its log
112     type: string
113   HeatAuthEncryptionKey:
114     description: Auth encryption key for heat-engine
115     type: string
116     hidden: true
117   HorizonSecret:
118     description: Secret key for Django
119     type: string
120     hidden: true
121   controllerImage:
122     type: string
123     default: overcloud-full
124     constraints:
125       - custom_constraint: glance.image
126   ImageUpdatePolicy:
127     default: 'REBUILD_PRESERVE_EPHEMERAL'
128     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
129     type: string
130   InstanceNameTemplate:
131     default: 'instance-%08x'
132     description: Template string to be used to generate instance names
133     type: string
134   KeyName:
135     default: default
136     description: Name of an existing Nova key pair to enable SSH access to the instances
137     type: string
138     constraints:
139       - custom_constraint: nova.keypair
140   ManageFirewall:
141     default: false
142     description: Whether to manage IPtables rules.
143     type: boolean
144   MemcachedIPv6:
145     default: false
146     description: Enable IPv6 features in Memcached.
147     type: boolean
148   PurgeFirewallRules:
149     default: false
150     description: Whether IPtables rules should be purged before setting up the new ones.
151     type: boolean
152   MysqlClusterUniquePart:
153     description: A unique identifier of the MySQL cluster the controller is in.
154     type: string
155     default: 'unset'  # Has to be here because of the ignored empty value bug
156     # Drop the validation: https://bugs.launchpad.net/tripleo/+bug/1405446
157     # constraints:
158     # - length: {min: 4, max: 10}
159   MysqlInnodbBufferPoolSize:
160     description: >
161         Specifies the size of the buffer pool in megabytes. Setting to
162         zero should be interpreted as "no value" and will defer to the
163         lower level default.
164     type: number
165     default: 0
166   MysqlMaxConnections:
167     description: Configures MySQL max_connections config setting
168     type: number
169     default: 4096
170   MysqlClustercheckPassword:
171     type: string
172     hidden: true
173   MysqlRootPassword:
174     type: string
175     hidden: true
176     default: ''  # Has to be here because of the ignored empty value bug
177   NeutronMetadataProxySharedSecret:
178     description: Shared secret to prevent spoofing
179     type: string
180     hidden: true
181   NeutronPassword:
182     description: The password for the neutron service and db account, used by neutron agents.
183     type: string
184     hidden: true
185   NeutronPublicInterface:
186     default: nic1
187     description: What interface to bridge onto br-ex for network nodes.
188     type: string
189   NovaEnableDBPurge:
190     default: true
191     description: |
192         Whether to create cron job for purging soft deleted rows in Nova database.
193     type: boolean
194   NovaIPv6:
195     default: false
196     description: Enable IPv6 features in Nova
197     type: boolean
198   NovaPassword:
199     description: The password for the nova service and db account, used by nova-api.
200     type: string
201     hidden: true
202   PcsdPassword:
203     type: string
204     description: The password for the 'pcsd' user.
205     hidden: true
206   PublicVirtualInterface:
207     default: 'br-ex'
208     description: >
209         Specifies the interface where the public-facing virtual ip will be assigned.
210         This should be int_public when a VLAN is being used.
211     type: string
212   RabbitCookie:
213     type: string
214     default: ''  # Has to be here because of the ignored empty value bug
215     hidden: true
216   RabbitPassword:
217     description: The password for RabbitMQ
218     type: string
219     hidden: true
220   RabbitUserName:
221     default: guest
222     description: The username for RabbitMQ
223     type: string
224   RabbitClientUseSSL:
225     default: false
226     description: >
227         Rabbit client subscriber parameter to specify
228         an SSL connection to the RabbitMQ host.
229     type: string
230   RabbitClientPort:
231     default: 5672
232     description: Set rabbit subscriber port, change this if using SSL
233     type: number
234   RedisPassword:
235     description: The password for Redis
236     type: string
237     hidden: true
238   RedisVirtualIP:
239     type: string
240     default: ''  # Has to be here because of the ignored empty value bug
241   RedisVirtualIPUri:
242     type: string
243     default: ''  # Has to be here because of the ignored empty value bug
244     description: An IP address which is wrapped in brackets in case of IPv6
245   SwiftHashSuffix:
246     description: A random string to be used as a salt when hashing to determine mappings
247       in the ring.
248     hidden: true
249     type: string
250   SwiftRawDisks:
251     default: {}
252     description: 'A hash of additional raw devices to use as Swift backend (eg. {sdb: {}})'
253     type: json
254   UpgradeLevelNovaCompute:
255     type: string
256     description: Nova Compute upgrade level
257     default: ''
258   MysqlVirtualIP:
259     type: string
260     default: ''
261   ServiceNetMap:
262     default: {}
263     description: Mapping of service_name -> network name. Typically set
264                  via parameter_defaults in the resource registry.
265     type: json
266   EndpointMap:
267     default: {}
268     description: Mapping of service endpoint -> protocol. Typically set
269                  via parameter_defaults in the resource registry.
270     type: json
271   UpdateIdentifier:
272     default: ''
273     type: string
274     description: >
275       Setting to a previously unused value during stack-update will trigger
276       package update on all nodes
277   Hostname:
278     type: string
279     default: '' # Defaults to Heat created hostname
280   HostnameMap:
281     type: json
282     default: {}
283     description: Optional mapping to override hostnames
284   NetworkDeploymentActions:
285     type: comma_delimited_list
286     description: >
287       Heat action when to apply network configuration changes
288     default: ['CREATE']
289   NodeIndex:
290     type: number
291     default: 0
292   SoftwareConfigTransport:
293     default: POLL_SERVER_CFN
294     description: |
295       How the server should receive the metadata required for software configuration.
296     type: string
297     constraints:
298     - allowed_values: [POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL, ZAQAR_MESSAGE]
299   CloudDomain:
300     type: string
301     description: >
302       The DNS domain used for the hosts. This should match the dhcp_domain
303       configured in the Undercloud neutron. Defaults to localdomain.
304   ServerMetadata:
305     default: {}
306     description: >
307       Extra properties or metadata passed to Nova for the created nodes in
308       the overcloud. It's accessible via the Nova metadata API.
309     type: json
310   ControllerSchedulerHints:
311     type: json
312     description: Optional scheduler hints to pass to nova
313     default: {}
314   ServiceConfigSettings:
315     type: json
316     default: {}
317   ServiceNames:
318     type: comma_delimited_list
319     default: []
320   ConfigCommand:
321     type: string
322     description: Command which will be run whenever configuration data changes
323     default: os-refresh-config --timeout 14400
324
325 parameter_groups:
326 - label: deprecated
327   description: Do not use deprecated params, they will be removed.
328   parameters:
329   - controllerExtraConfig
330
331 resources:
332
333   Controller:
334     type: OS::TripleO::Server
335     metadata:
336       os-collect-config:
337         command: {get_param: ConfigCommand}
338     properties:
339       image: {get_param: controllerImage}
340       image_update_policy: {get_param: ImageUpdatePolicy}
341       flavor: {get_param: OvercloudControlFlavor}
342       key_name: {get_param: KeyName}
343       networks:
344         - network: ctlplane
345       user_data_format: SOFTWARE_CONFIG
346       user_data: {get_resource: UserData}
347       name:
348         str_replace:
349             template: {get_param: Hostname}
350             params: {get_param: HostnameMap}
351       software_config_transport: {get_param: SoftwareConfigTransport}
352       metadata: {get_param: ServerMetadata}
353       scheduler_hints: {get_param: ControllerSchedulerHints}
354
355   # Combine the NodeAdminUserData and NodeUserData mime archives
356   UserData:
357     type: OS::Heat::MultipartMime
358     properties:
359       parts:
360       - config: {get_resource: NodeAdminUserData}
361         type: multipart
362       - config: {get_resource: NodeUserData}
363         type: multipart
364
365   # Creates the "heat-admin" user if configured via the environment
366   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
367   NodeAdminUserData:
368     type: OS::TripleO::NodeAdminUserData
369
370   # For optional operator additional userdata
371   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
372   NodeUserData:
373     type: OS::TripleO::NodeUserData
374
375   ExternalPort:
376     type: OS::TripleO::Controller::Ports::ExternalPort
377     properties:
378       IPPool: {get_param: ControllerIPs}
379       NodeIndex: {get_param: NodeIndex}
380       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
381
382   InternalApiPort:
383     type: OS::TripleO::Controller::Ports::InternalApiPort
384     properties:
385       IPPool: {get_param: ControllerIPs}
386       NodeIndex: {get_param: NodeIndex}
387       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
388
389   StoragePort:
390     type: OS::TripleO::Controller::Ports::StoragePort
391     properties:
392       IPPool: {get_param: ControllerIPs}
393       NodeIndex: {get_param: NodeIndex}
394       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
395
396   StorageMgmtPort:
397     type: OS::TripleO::Controller::Ports::StorageMgmtPort
398     properties:
399       IPPool: {get_param: ControllerIPs}
400       NodeIndex: {get_param: NodeIndex}
401       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
402
403   TenantPort:
404     type: OS::TripleO::Controller::Ports::TenantPort
405     properties:
406       IPPool: {get_param: ControllerIPs}
407       NodeIndex: {get_param: NodeIndex}
408       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
409
410   ManagementPort:
411     type: OS::TripleO::Controller::Ports::ManagementPort
412     properties:
413       IPPool: {get_param: ControllerIPs}
414       NodeIndex: {get_param: NodeIndex}
415       ControlPlaneIP: {get_attr: [Controller, networks, ctlplane, 0]}
416
417   NetIpMap:
418     type: OS::TripleO::Network::Ports::NetIpMap
419     properties:
420       ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
421       ExternalIp: {get_attr: [ExternalPort, ip_address]}
422       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
423       ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]}
424       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
425       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
426       InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]}
427       StorageIp: {get_attr: [StoragePort, ip_address]}
428       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
429       StorageIpUri: {get_attr: [StoragePort, ip_address_uri]}
430       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
431       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
432       StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]}
433       TenantIp: {get_attr: [TenantPort, ip_address]}
434       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
435       TenantIpUri: {get_attr: [TenantPort, ip_address_uri]}
436       ManagementIp: {get_attr: [ManagementPort, ip_address]}
437       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
438       ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]}
439
440   NetworkConfig:
441     type: OS::TripleO::Controller::Net::SoftwareConfig
442     properties:
443       ControlPlaneIp: {get_attr: [Controller, networks, ctlplane, 0]}
444       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
445       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
446       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
447       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
448       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
449       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
450
451   NetworkDeployment:
452     type: OS::TripleO::SoftwareDeployment
453     properties:
454       name: NetworkDeployment
455       config: {get_resource: NetworkConfig}
456       server: {get_resource: Controller}
457       actions: {get_param: NetworkDeploymentActions}
458       input_values:
459         bridge_name: br-ex
460         interface_name: {get_param: NeutronPublicInterface}
461
462   # Resource for site-specific injection of root certificate
463   NodeTLSCAData:
464     depends_on: NetworkDeployment
465     type: OS::TripleO::NodeTLSCAData
466     properties:
467       server: {get_resource: Controller}
468
469   # Resource for site-specific passing of private keys/certificates
470   NodeTLSData:
471     depends_on: NodeTLSCAData
472     type: OS::TripleO::NodeTLSData
473     properties:
474       server: {get_resource: Controller}
475       NodeIndex: {get_param: NodeIndex}
476
477
478   ControllerDeployment:
479     type: OS::TripleO::SoftwareDeployment
480     depends_on: NetworkDeployment
481     properties:
482       name: ControllerDeployment
483       config: {get_resource: ControllerConfig}
484       server: {get_resource: Controller}
485       input_values:
486         bootstack_nodeid: {get_attr: [Controller, name]}
487         haproxy_log_address: {get_param: HAProxySyslogAddress}
488         haproxy_stats_password: {get_param: HAProxyStatsPassword}
489         haproxy_stats_user: {get_param: HAProxyStatsUser}
490         heat_auth_encryption_key: {get_param: HeatAuthEncryptionKey}
491         horizon_secret: {get_param: HorizonSecret}
492         admin_password: {get_param: AdminPassword}
493         debug: {get_param: Debug}
494         keystone_identity_uri: { get_param: [EndpointMap, KeystoneAdmin, uri_no_suffix] }
495         keystone_auth_uri: {get_param: [EndpointMap, KeystoneInternal, uri] }
496         keystone_ec2_uri: { get_param: [EndpointMap, KeystoneEC2, uri] }
497         enable_fencing: {get_param: EnableFencing}
498         enable_galera: {get_param: EnableGalera}
499         enable_load_balancer: {get_param: EnableLoadBalancer}
500         manage_firewall: {get_param: ManageFirewall}
501         purge_firewall_rules: {get_param: PurgeFirewallRules}
502         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
503         mysql_max_connections: {get_param: MysqlMaxConnections}
504         mysql_root_password: {get_param: MysqlRootPassword}
505         mysql_clustercheck_password: {get_param: MysqlClustercheckPassword}
506         mysql_cluster_name:
507           str_replace:
508             template: tripleo-CLUSTER
509             params:
510               CLUSTER: {get_param: MysqlClusterUniquePart}
511         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
512         aodh_internal_url: { get_param: [ EndpointMap, AodhInternal, uri ] }
513         aodh_public_url: { get_param: [ EndpointMap, AodhPublic, uri ] }
514         aodh_admin_url: { get_param: [ EndpointMap, AodhAdmin, uri ] }
515         ceilometer_coordination_url:
516           list_join:
517             - ''
518             - - 'redis://:'
519               - {get_param: RedisPassword}
520               - '@'
521               - {get_param: RedisVirtualIPUri}
522               - ':6379/'
523         nova_enable_db_purge: {get_param: NovaEnableDBPurge}
524         nova_ipv6: {get_param: NovaIPv6}
525         corosync_ipv6: {get_param: CorosyncIPv6}
526         memcached_ipv6: {get_param: MemcachedIPv6}
527         nova_password: {get_param: NovaPassword}
528         upgrade_level_nova_compute: {get_param: UpgradeLevelNovaCompute}
529         instance_name_template: {get_param: InstanceNameTemplate}
530         fencing_config: {get_param: FencingConfig}
531         pcsd_password: {get_param: PcsdPassword}
532         rabbit_username: {get_param: RabbitUserName}
533         rabbit_password: {get_param: RabbitPassword}
534         rabbit_cookie: {get_param: RabbitCookie}
535         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
536         rabbit_client_port: {get_param: RabbitClientPort}
537         control_virtual_interface: {get_param: ControlVirtualInterface}
538         public_virtual_interface: {get_param: PublicVirtualInterface}
539         swift_hash_suffix: {get_param: SwiftHashSuffix}
540         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
541         swift_proxy_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
542         swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
543         cinder_iscsi_network:
544           str_replace:
545             template: "'IP'"
546             params:
547               IP:
548                 get_attr:
549                   - NetIpMap
550                   - net_ip_map
551                   - str_replace:
552                       template: "NETWORK_uri"
553                       params:
554                         NETWORK: {get_param: [ServiceNetMap, CinderIscsiNetwork]}
555         cinder_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
556         glance_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
557         glance_registry_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}
558         glance_api_servers: { get_param: [EndpointMap, GlanceInternal, uri]}
559         heat_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
560         keystone_public_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]}
561         keystone_admin_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]}
562         manila_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ManilaApiNetwork]}]}
563         mongo_db_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MongodbNetwork]}]}
564         neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
565         neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
566         ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
567         aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
568         gnocchi_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GnocchiApiNetwork]}]}
569         nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
570         nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
571         horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
572         horizon_subnet:
573           str_replace:
574             template: "['SUBNET']"
575             params:
576               SUBNET:
577                 get_attr:
578                   - NetIpMap
579                   - net_ip_map
580                   - str_replace:
581                       template: "NETWORK_subnet"
582                       params:
583                         NETWORK: {get_param: [ServiceNetMap, HorizonNetwork]}
584         rabbitmq_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RabbitmqNetwork]}]}
585         redis_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RedisNetwork]}]}
586         redis_vip: {get_param: RedisVirtualIP}
587         sahara_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SaharaApiNetwork]}]}
588         memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
589         mysql_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]}
590         mysql_virtual_ip: {get_param: MysqlVirtualIP}
591         ceph_cluster_network:
592           get_attr:
593             - NetIpMap
594             - net_ip_map
595             - str_replace:
596                 template: "NETWORK_subnet"
597                 params:
598                   NETWORK: {get_param: [ServiceNetMap, CephClusterNetwork]}
599         ceph_public_network:
600           get_attr:
601             - NetIpMap
602             - net_ip_map
603             - str_replace:
604                 template: "NETWORK_subnet"
605                 params:
606                   NETWORK: {get_param: [ServiceNetMap, CephPublicNetwork]}
607         ceph_public_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
608         ironic_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, IronicApiNetwork]}]}
609
610   # Map heat metadata into hiera datafiles
611   ControllerConfig:
612     type: OS::Heat::StructuredConfig
613     properties:
614       group: os-apply-config
615       config:
616         hiera:
617           hierarchy:
618             - '"%{::uuid}"'
619             - heat_config_%{::deploy_config_name}
620             - controller_extraconfig
621             - extraconfig
622             - service_configs
623             - service_names
624             - controller
625             - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
626             - ceph_cluster # provided by CephClusterConfig
627             - ceph
628             - bootstrap_node # provided by BootstrapNodeConfig
629             - all_nodes # provided by allNodesConfig
630             - vip_data # provided by vip-config
631             - '"%{::osfamily}"'
632             - cinder_dellsc_data # Optionally provided by ControllerExtraConfigPre
633             - cinder_netapp_data # Optionally provided by ControllerExtraConfigPre
634             - cinder_eqlx_data # Optionally provided by ControllerExtraConfigPre
635             - neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre
636             - neutron_cisco_data # Optionally provided by ControllerExtraConfigPre
637             - cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre
638             - midonet_data #Optionally provided by AllNodesExtraConfig
639           merge_behavior: deeper
640           datafiles:
641             service_names:
642               mapped_data:
643                 service_names: {get_param: ServiceNames}
644             service_configs:
645               mapped_data:
646                 map_replace:
647                   - {get_param: ServiceConfigSettings}
648                   - values: {get_attr: [NetIpMap, net_ip_map]}
649             controller_extraconfig:
650               mapped_data:
651                 map_merge:
652                   - {get_param: controllerExtraConfig}
653                   - {get_param: ControllerExtraConfig}
654             extraconfig:
655               mapped_data: {get_param: ExtraConfig}
656             ceph:
657               mapped_data:
658                 ceph::profile::params::cluster_network: {get_input: ceph_cluster_network}
659                 ceph::profile::params::public_network: {get_input: ceph_public_network}
660                 ceph::profile::params::public_addr: {get_input: ceph_public_ip}
661             controller:
662               mapped_data: # data supplied directly to this deployment configuration, etc
663                 bootstack_nodeid: {get_input: bootstack_nodeid}
664
665                 # Pacemaker
666                 enable_fencing: {get_input: enable_fencing}
667                 enable_load_balancer: {get_input: enable_load_balancer}
668                 hacluster_pwd: {get_input: pcsd_password}
669                 corosync_ipv6: {get_input: corosync_ipv6}
670                 tripleo::fencing::config: {get_input: fencing_config}
671
672                 # Swift
673                 # FIXME: need to move proxy_local_net_ip into swift-proxy.yaml
674                 swift::proxy::proxy_local_net_ip: {get_input: swift_proxy_network}
675                 swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
676                 swift::swift_hash_path_suffix: {get_input: swift_hash_suffix}
677
678                 # Cinder
679                 tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_input: cinder_iscsi_network}
680                 cinder::api::bind_host: {get_input: cinder_api_network}
681
682                 # Glance
683                 glance::api::bind_host: {get_input: glance_api_network}
684                 glance::registry::bind_host: {get_input: glance_registry_network}
685
686                 # Heat
687                 heat::api::bind_host: {get_input: heat_api_network}
688                 heat::api_cloudwatch::bind_host: {get_input: heat_api_network}
689                 heat::api_cfn::bind_host: {get_input: heat_api_network}
690                 heat::engine::auth_encryption_key: {get_input: heat_auth_encryption_key}
691
692                 # Keystone
693                 keystone::admin_bind_host: {get_input: keystone_admin_api_network}
694                 keystone::public_bind_host: {get_input: keystone_public_api_network}
695                 keystone::wsgi::apache::bind_host: {get_input: keystone_public_api_network}
696                 keystone::wsgi::apache::admin_bind_host: {get_input: keystone_admin_api_network}
697
698                 # Manila
699                 manila::api::bind_host: {get_input: manila_api_network}
700
701                 # MongoDB
702                 mongodb::server::bind_ip: {get_input: mongo_db_network}
703
704                 # MySQL
705                 admin_password: {get_input: admin_password}
706                 enable_galera: {get_input: enable_galera}
707                 mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
708                 mysql_max_connections: {get_input: mysql_max_connections}
709                 mysql::server::root_password: {get_input: mysql_root_password}
710                 mysql_clustercheck_password: {get_input: mysql_clustercheck_password}
711                 mysql_cluster_name: {get_input: mysql_cluster_name}
712                 mysql_bind_host: {get_input: mysql_network}
713                 mysql_virtual_ip: {get_input: mysql_virtual_ip}
714
715                 # Neutron
716                 neutron::bind_host: {get_input: neutron_api_network}
717                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
718                 neutron::agents::metadata::metadata_ip: {get_input: neutron_api_network}
719
720                 # Aodh
721                 aodh::api::host: {get_input: aodh_api_network}
722                 aodh::wsgi::apache::bind_host: {get_input: aodh_api_network}
723
724                 # Ceilometer
725                 ceilometer::api::host: {get_input: ceilometer_api_network}
726                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
727                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
728
729                 # Gnocchi
730                 gnocchi::wsgi::apache::bind_host: {get_input: gnocchi_api_network}
731                 gnocchi::api::host: {get_input: gnocchi_api_network}
732                 gnocchi::api::keystone_auth_uri: {get_input: keystone_auth_uri}
733                 gnocchi::api::keystone_identity_uri: {get_input: keystone_identity_uri}
734                 gnocchi::storage::swift::swift_authurl: {get_input: keystone_auth_uri}
735
736                 # Nova
737                 nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute}
738                 nova::use_ipv6: {get_input: nova_ipv6}
739                 nova::api::auth_uri: {get_input: keystone_auth_uri}
740                 nova::api::identity_uri: {get_input: keystone_identity_uri}
741                 nova::api::api_bind_address: {get_input: nova_api_network}
742                 nova::api::metadata_listen: {get_input: nova_metadata_network}
743                 nova::api::admin_password: {get_input: nova_password}
744                 nova::glance_api_servers: {get_input: glance_api_servers}
745                 nova::api::neutron_metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
746                 nova::api::instance_name_template: {get_input: instance_name_template}
747                 nova::vncproxy::host: {get_input: nova_api_network}
748                 nova_enable_db_purge: {get_input: nova_enable_db_purge}
749
750                 # Horizon
751                 apache::mod::remoteip::proxy_ips: {get_input: horizon_subnet}
752                 apache::ip: {get_input: horizon_network}
753                 horizon::django_debug: {get_input: debug}
754                 horizon::secret_key: {get_input: horizon_secret}
755                 horizon::bind_address: {get_input: horizon_network}
756                 horizon::keystone_url: {get_input: keystone_auth_uri}
757
758                 # Sahara
759                 sahara::host: {get_input: sahara_api_network}
760
761                 # RabbitMQ
762                 rabbitmq::node_ip_address: {get_input: rabbitmq_network}
763                 rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
764                 # Redis
765                 redis::bind: {get_input: redis_network}
766                 redis_vip: {get_input: redis_vip}
767                 # Firewall
768                 tripleo::firewall::manage_firewall: {get_input: manage_firewall}
769                 tripleo::firewall::purge_firewall_rules: {get_input: purge_firewall_rules}
770                 # Misc
771                 memcached_ipv6: {get_input: memcached_ipv6}
772                 memcached::listen_ip: {get_input: memcached_network}
773                 control_virtual_interface: {get_input: control_virtual_interface}
774                 public_virtual_interface: {get_input: public_virtual_interface}
775                 tripleo::keepalived::control_virtual_interface: {get_input: control_virtual_interface}
776                 tripleo::keepalived::public_virtual_interface: {get_input: public_virtual_interface}
777                 tripleo::haproxy::control_virtual_interface: {get_input: control_virtual_interface}
778                 tripleo::haproxy::public_virtual_interface: {get_input: public_virtual_interface}
779                 tripleo::haproxy::haproxy_log_address: {get_input: haproxy_log_address}
780                 tripleo::haproxy::service_certificate: {get_attr: [NodeTLSData, deployed_ssl_certificate_path]}
781                 tripleo::haproxy::haproxy_stats_user: {get_input: haproxy_stats_user}
782                 tripleo::haproxy::haproxy_stats_password: {get_input: haproxy_stats_password}
783                 tripleo::haproxy::redis_password: {get_input: redis_password}
784                 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
785
786   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
787   ControllerExtraConfigPre:
788     depends_on: ControllerDeployment
789     type: OS::TripleO::ControllerExtraConfigPre
790     properties:
791         server: {get_resource: Controller}
792
793   # Hook for site-specific additional pre-deployment config,
794   # applying to all nodes, e.g node registration/unregistration
795   NodeExtraConfig:
796     depends_on: [ControllerExtraConfigPre, NodeTLSData]
797     type: OS::TripleO::NodeExtraConfig
798     properties:
799         server: {get_resource: Controller}
800
801   UpdateConfig:
802     type: OS::TripleO::Tasks::PackageUpdate
803
804   UpdateDeployment:
805     type: OS::Heat::SoftwareDeployment
806     properties:
807       name: UpdateDeployment
808       config: {get_resource: UpdateConfig}
809       server: {get_resource: Controller}
810       input_values:
811         update_identifier:
812           get_param: UpdateIdentifier
813
814 outputs:
815   ip_address:
816     description: IP address of the server in the ctlplane network
817     value: {get_attr: [Controller, networks, ctlplane, 0]}
818   external_ip_address:
819     description: IP address of the server in the external network
820     value: {get_attr: [ExternalPort, ip_address]}
821   internal_api_ip_address:
822     description: IP address of the server in the internal_api network
823     value: {get_attr: [InternalApiPort, ip_address]}
824   storage_ip_address:
825     description: IP address of the server in the storage network
826     value: {get_attr: [StoragePort, ip_address]}
827   storage_mgmt_ip_address:
828     description: IP address of the server in the storage_mgmt network
829     value: {get_attr: [StorageMgmtPort, ip_address]}
830   tenant_ip_address:
831     description: IP address of the server in the tenant network
832     value: {get_attr: [TenantPort, ip_address]}
833   management_ip_address:
834     description: IP address of the server in the management network
835     value: {get_attr: [ManagementPort, ip_address]}
836   hostname:
837     description: Hostname of the server
838     value: {get_attr: [Controller, name]}
839   hosts_entry:
840     description: >
841       Server's IP address and hostname in the /etc/hosts format
842     value:
843       str_replace:
844         template: |
845           PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
846           EXTERNALIP EXTERNALHOST.DOMAIN EXTERNALHOST
847           INTERNAL_APIIP INTERNAL_APIHOST.DOMAIN INTERNAL_APIHOST
848           STORAGEIP STORAGEHOST.DOMAIN STORAGEHOST
849           STORAGE_MGMTIP STORAGE_MGMTHOST.DOMAIN STORAGE_MGMTHOST
850           TENANTIP TENANTHOST.DOMAIN TENANTHOST
851           MANAGEMENTIP MANAGEMENTHOST.DOMAIN MANAGEMENTHOST
852         params:
853           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
854           DOMAIN: {get_param: CloudDomain}
855           PRIMARYHOST: {get_attr: [Controller, name]}
856           EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
857           EXTERNALHOST:
858             list_join:
859             - '.'
860             - - {get_attr: [Controller, name]}
861               - external
862           INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
863           INTERNAL_APIHOST:
864             list_join:
865             - '.'
866             - - {get_attr: [Controller, name]}
867               - internalapi
868           STORAGEIP: {get_attr: [StoragePort, ip_address]}
869           STORAGEHOST:
870             list_join:
871             - '.'
872             - - {get_attr: [Controller, name]}
873               - storage
874           STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
875           STORAGE_MGMTHOST:
876             list_join:
877             - '.'
878             - - {get_attr: [Controller, name]}
879               - storagemgmt
880           TENANTIP: {get_attr: [TenantPort, ip_address]}
881           TENANTHOST:
882             list_join:
883             - '.'
884             - - {get_attr: [Controller, name]}
885               - tenant
886           MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
887           MANAGEMENTHOST:
888             list_join:
889             - '.'
890             - - {get_attr: [Controller, name]}
891               - management
892   nova_server_resource:
893     description: Heat resource handle for the Nova compute server
894     value:
895       {get_resource: Controller}
896   swift_device:
897     description: Swift device formatted for swift-ring-builder
898     value:
899       str_replace:
900         template:
901           list_join:
902             - ','
903             - ['r1z1-IP:%PORT%/d1']
904             - repeat:
905                 template: 'r1z1-IP:%PORT%/DEVICE'
906                 for_each:
907                   DEVICE: {get_param: SwiftRawDisks}
908         params:
909           IP:
910             get_attr:
911               - NetIpMap
912               - net_ip_map
913               - str_replace:
914                   template: "NETWORK_uri"
915                   params:
916                     NETWORK: {get_param: [ServiceNetMap, SwiftMgmtNetwork]}
917   swift_proxy_memcache:
918     description: Swift proxy-memcache value
919     value:
920       str_replace:
921         template: "IP:11211"
922         params:
923           IP:
924             get_attr:
925               - NetIpMap
926               - net_ip_map
927               - str_replace:
928                   template: "NETWORK_uri"
929                   params:
930                     NETWORK: {get_param: [ServiceNetMap, MemcachedNetwork]}
931   tls_key_modulus_md5:
932     description: MD5 checksum of the TLS Key Modulus
933     value: {get_attr: [NodeTLSData, key_modulus_md5]}
934   tls_cert_modulus_md5:
935     description: MD5 checksum of the TLS Certificate Modulus
936     value: {get_attr: [NodeTLSData, cert_modulus_md5]}