801b99ba5be9f14357b2387aa79053ae27bfded7
[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   UpgradeLevelNovaCompute:
251     type: string
252     description: Nova Compute upgrade level
253     default: ''
254   MysqlVirtualIP:
255     type: string
256     default: ''
257   EnablePackageInstall:
258     default: 'false'
259     description: Set to true to enable package installation via Puppet
260     type: boolean
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_install: {get_param: EnablePackageInstall}
541         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
542         swift_proxy_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftProxyNetwork]}]}
543         swift_management_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SwiftMgmtNetwork]}]}
544         cinder_iscsi_network:
545           str_replace:
546             template: "'IP'"
547             params:
548               IP:
549                 get_attr:
550                   - NetIpMap
551                   - net_ip_map
552                   - str_replace:
553                       template: "NETWORK_uri"
554                       params:
555                         NETWORK: {get_param: [ServiceNetMap, CinderIscsiNetwork]}
556         cinder_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CinderApiNetwork]}]}
557         glance_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceApiNetwork]}]}
558         glance_registry_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GlanceRegistryNetwork]}]}
559         glance_api_servers: { get_param: [EndpointMap, GlanceInternal, uri]}
560         heat_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HeatApiNetwork]}]}
561         keystone_public_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, KeystonePublicApiNetwork]}]}
562         keystone_admin_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, KeystoneAdminApiNetwork]}]}
563         manila_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ManilaApiNetwork]}]}
564         mongo_db_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MongodbNetwork]}]}
565         neutron_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronApiNetwork]}]}
566         neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
567         ceilometer_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CeilometerApiNetwork]}]}
568         aodh_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, AodhApiNetwork]}]}
569         gnocchi_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, GnocchiApiNetwork]}]}
570         nova_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaApiNetwork]}]}
571         nova_metadata_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaMetadataNetwork]}]}
572         horizon_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, HorizonNetwork]}]}
573         horizon_subnet:
574           str_replace:
575             template: "['SUBNET']"
576             params:
577               SUBNET:
578                 get_attr:
579                   - NetIpMap
580                   - net_ip_map
581                   - str_replace:
582                       template: "NETWORK_subnet"
583                       params:
584                         NETWORK: {get_param: [ServiceNetMap, HorizonNetwork]}
585         rabbitmq_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RabbitmqNetwork]}]}
586         redis_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, RedisNetwork]}]}
587         redis_vip: {get_param: RedisVirtualIP}
588         sahara_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, SaharaApiNetwork]}]}
589         memcached_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MemcachedNetwork]}]}
590         mysql_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, MysqlNetwork]}]}
591         mysql_virtual_ip: {get_param: MysqlVirtualIP}
592         ceph_cluster_network:
593           get_attr:
594             - NetIpMap
595             - net_ip_map
596             - str_replace:
597                 template: "NETWORK_subnet"
598                 params:
599                   NETWORK: {get_param: [ServiceNetMap, CephClusterNetwork]}
600         ceph_public_network:
601           get_attr:
602             - NetIpMap
603             - net_ip_map
604             - str_replace:
605                 template: "NETWORK_subnet"
606                 params:
607                   NETWORK: {get_param: [ServiceNetMap, CephPublicNetwork]}
608         ceph_public_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, CephPublicNetwork]}]}
609         ironic_api_network: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, IronicApiNetwork]}]}
610
611   # Map heat metadata into hiera datafiles
612   ControllerConfig:
613     type: OS::Heat::StructuredConfig
614     properties:
615       group: os-apply-config
616       config:
617         hiera:
618           hierarchy:
619             - '"%{::uuid}"'
620             - heat_config_%{::deploy_config_name}
621             - controller_extraconfig
622             - extraconfig
623             - service_configs
624             - service_names
625             - controller
626             - swift_devices_and_proxy # provided by SwiftDevicesAndProxyConfig
627             - ceph_cluster # provided by CephClusterConfig
628             - ceph
629             - bootstrap_node # provided by BootstrapNodeConfig
630             - all_nodes # provided by allNodesConfig
631             - vip_data # provided by vip-config
632             - '"%{::osfamily}"'
633             - cinder_dellsc_data # Optionally provided by ControllerExtraConfigPre
634             - cinder_netapp_data # Optionally provided by ControllerExtraConfigPre
635             - cinder_eqlx_data # Optionally provided by ControllerExtraConfigPre
636             - neutron_bigswitch_data # Optionally provided by ControllerExtraConfigPre
637             - neutron_cisco_data # Optionally provided by ControllerExtraConfigPre
638             - cisco_n1kv_data # Optionally provided by ControllerExtraConfigPre
639             - midonet_data #Optionally provided by AllNodesExtraConfig
640           merge_behavior: deeper
641           datafiles:
642             service_names:
643               mapped_data:
644                 service_names: {get_param: ServiceNames}
645             service_configs:
646               mapped_data:
647                 map_replace:
648                   - {get_param: ServiceConfigSettings}
649                   - values: {get_attr: [NetIpMap, net_ip_map]}
650             controller_extraconfig:
651               mapped_data:
652                 map_merge:
653                   - {get_param: controllerExtraConfig}
654                   - {get_param: ControllerExtraConfig}
655             extraconfig:
656               mapped_data: {get_param: ExtraConfig}
657             ceph:
658               mapped_data:
659                 ceph::profile::params::cluster_network: {get_input: ceph_cluster_network}
660                 ceph::profile::params::public_network: {get_input: ceph_public_network}
661                 ceph::profile::params::public_addr: {get_input: ceph_public_ip}
662             controller:
663               mapped_data: # data supplied directly to this deployment configuration, etc
664                 bootstack_nodeid: {get_input: bootstack_nodeid}
665
666                 # Pacemaker
667                 enable_fencing: {get_input: enable_fencing}
668                 enable_load_balancer: {get_input: enable_load_balancer}
669                 hacluster_pwd: {get_input: pcsd_password}
670                 corosync_ipv6: {get_input: corosync_ipv6}
671                 tripleo::fencing::config: {get_input: fencing_config}
672
673                 # Swift
674                 # FIXME: need to move proxy_local_net_ip into swift-proxy.yaml
675                 swift::proxy::proxy_local_net_ip: {get_input: swift_proxy_network}
676                 swift::storage::all::storage_local_net_ip: {get_input: swift_management_network}
677                 swift::swift_hash_path_suffix: {get_input: swift_hash_suffix}
678
679                 # Cinder
680                 tripleo::profile::base::cinder::volume::iscsi::cinder_iscsi_address: {get_input: cinder_iscsi_network}
681                 cinder::api::bind_host: {get_input: cinder_api_network}
682
683                 # Glance
684                 glance::api::bind_host: {get_input: glance_api_network}
685                 glance::registry::bind_host: {get_input: glance_registry_network}
686
687                 # Heat
688                 heat::api::bind_host: {get_input: heat_api_network}
689                 heat::api_cloudwatch::bind_host: {get_input: heat_api_network}
690                 heat::api_cfn::bind_host: {get_input: heat_api_network}
691                 heat::engine::auth_encryption_key: {get_input: heat_auth_encryption_key}
692
693                 # Keystone
694                 keystone::admin_bind_host: {get_input: keystone_admin_api_network}
695                 keystone::public_bind_host: {get_input: keystone_public_api_network}
696                 keystone::wsgi::apache::bind_host: {get_input: keystone_public_api_network}
697                 keystone::wsgi::apache::admin_bind_host: {get_input: keystone_admin_api_network}
698
699                 # Manila
700                 manila::api::bind_host: {get_input: manila_api_network}
701
702                 # MongoDB
703                 mongodb::server::bind_ip: {get_input: mongo_db_network}
704
705                 # MySQL
706                 admin_password: {get_input: admin_password}
707                 enable_galera: {get_input: enable_galera}
708                 mysql_innodb_buffer_pool_size: {get_input: mysql_innodb_buffer_pool_size}
709                 mysql_max_connections: {get_input: mysql_max_connections}
710                 mysql::server::root_password: {get_input: mysql_root_password}
711                 mysql_clustercheck_password: {get_input: mysql_clustercheck_password}
712                 mysql_cluster_name: {get_input: mysql_cluster_name}
713                 mysql_bind_host: {get_input: mysql_network}
714                 mysql_virtual_ip: {get_input: mysql_virtual_ip}
715
716                 # Neutron
717                 neutron::bind_host: {get_input: neutron_api_network}
718                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
719                 neutron::agents::metadata::metadata_ip: {get_input: neutron_api_network}
720
721                 # Aodh
722                 aodh::api::host: {get_input: aodh_api_network}
723                 aodh::wsgi::apache::bind_host: {get_input: aodh_api_network}
724
725                 # Ceilometer
726                 ceilometer::api::host: {get_input: ceilometer_api_network}
727                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
728                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
729
730                 # Gnocchi
731                 gnocchi::wsgi::apache::bind_host: {get_input: gnocchi_api_network}
732                 gnocchi::api::host: {get_input: gnocchi_api_network}
733                 gnocchi::api::keystone_auth_uri: {get_input: keystone_auth_uri}
734                 gnocchi::api::keystone_identity_uri: {get_input: keystone_identity_uri}
735                 gnocchi::storage::swift::swift_authurl: {get_input: keystone_auth_uri}
736
737                 # Nova
738                 nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute}
739                 nova::use_ipv6: {get_input: nova_ipv6}
740                 nova::api::auth_uri: {get_input: keystone_auth_uri}
741                 nova::api::identity_uri: {get_input: keystone_identity_uri}
742                 nova::api::api_bind_address: {get_input: nova_api_network}
743                 nova::api::metadata_listen: {get_input: nova_metadata_network}
744                 nova::api::admin_password: {get_input: nova_password}
745                 nova::glance_api_servers: {get_input: glance_api_servers}
746                 nova::api::neutron_metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
747                 nova::api::instance_name_template: {get_input: instance_name_template}
748                 nova::vncproxy::host: {get_input: nova_api_network}
749                 nova_enable_db_purge: {get_input: nova_enable_db_purge}
750
751                 # Horizon
752                 apache::mod::remoteip::proxy_ips: {get_input: horizon_subnet}
753                 apache::ip: {get_input: horizon_network}
754                 horizon::django_debug: {get_input: debug}
755                 horizon::secret_key: {get_input: horizon_secret}
756                 horizon::bind_address: {get_input: horizon_network}
757                 horizon::keystone_url: {get_input: keystone_auth_uri}
758
759                 # Sahara
760                 sahara::host: {get_input: sahara_api_network}
761
762                 # RabbitMQ
763                 rabbitmq::node_ip_address: {get_input: rabbitmq_network}
764                 rabbitmq::erlang_cookie: {get_input: rabbit_cookie}
765                 # Redis
766                 redis::bind: {get_input: redis_network}
767                 redis_vip: {get_input: redis_vip}
768                 # Firewall
769                 tripleo::firewall::manage_firewall: {get_input: manage_firewall}
770                 tripleo::firewall::purge_firewall_rules: {get_input: purge_firewall_rules}
771                 # Misc
772                 memcached_ipv6: {get_input: memcached_ipv6}
773                 memcached::listen_ip: {get_input: memcached_network}
774                 control_virtual_interface: {get_input: control_virtual_interface}
775                 public_virtual_interface: {get_input: public_virtual_interface}
776                 tripleo::keepalived::control_virtual_interface: {get_input: control_virtual_interface}
777                 tripleo::keepalived::public_virtual_interface: {get_input: public_virtual_interface}
778                 tripleo::haproxy::control_virtual_interface: {get_input: control_virtual_interface}
779                 tripleo::haproxy::public_virtual_interface: {get_input: public_virtual_interface}
780                 tripleo::haproxy::haproxy_log_address: {get_input: haproxy_log_address}
781                 tripleo::haproxy::service_certificate: {get_attr: [NodeTLSData, deployed_ssl_certificate_path]}
782                 tripleo::haproxy::haproxy_stats_user: {get_input: haproxy_stats_user}
783                 tripleo::haproxy::haproxy_stats_password: {get_input: haproxy_stats_password}
784                 tripleo::haproxy::redis_password: {get_input: redis_password}
785                 tripleo::packages::enable_install: {get_input: enable_package_install}
786                 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
787
788   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
789   ControllerExtraConfigPre:
790     depends_on: ControllerDeployment
791     type: OS::TripleO::ControllerExtraConfigPre
792     properties:
793         server: {get_resource: Controller}
794
795   # Hook for site-specific additional pre-deployment config,
796   # applying to all nodes, e.g node registration/unregistration
797   NodeExtraConfig:
798     depends_on: [ControllerExtraConfigPre, NodeTLSData]
799     type: OS::TripleO::NodeExtraConfig
800     properties:
801         server: {get_resource: Controller}
802
803   UpdateConfig:
804     type: OS::TripleO::Tasks::PackageUpdate
805
806   UpdateDeployment:
807     type: OS::Heat::SoftwareDeployment
808     properties:
809       name: UpdateDeployment
810       config: {get_resource: UpdateConfig}
811       server: {get_resource: Controller}
812       input_values:
813         update_identifier:
814           get_param: UpdateIdentifier
815
816 outputs:
817   ip_address:
818     description: IP address of the server in the ctlplane network
819     value: {get_attr: [Controller, networks, ctlplane, 0]}
820   external_ip_address:
821     description: IP address of the server in the external network
822     value: {get_attr: [ExternalPort, ip_address]}
823   internal_api_ip_address:
824     description: IP address of the server in the internal_api network
825     value: {get_attr: [InternalApiPort, ip_address]}
826   storage_ip_address:
827     description: IP address of the server in the storage network
828     value: {get_attr: [StoragePort, ip_address]}
829   storage_mgmt_ip_address:
830     description: IP address of the server in the storage_mgmt network
831     value: {get_attr: [StorageMgmtPort, ip_address]}
832   tenant_ip_address:
833     description: IP address of the server in the tenant network
834     value: {get_attr: [TenantPort, ip_address]}
835   management_ip_address:
836     description: IP address of the server in the management network
837     value: {get_attr: [ManagementPort, ip_address]}
838   hostname:
839     description: Hostname of the server
840     value: {get_attr: [Controller, name]}
841   hosts_entry:
842     description: >
843       Server's IP address and hostname in the /etc/hosts format
844     value:
845       str_replace:
846         template: |
847           PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
848           EXTERNALIP EXTERNALHOST.DOMAIN EXTERNALHOST
849           INTERNAL_APIIP INTERNAL_APIHOST.DOMAIN INTERNAL_APIHOST
850           STORAGEIP STORAGEHOST.DOMAIN STORAGEHOST
851           STORAGE_MGMTIP STORAGE_MGMTHOST.DOMAIN STORAGE_MGMTHOST
852           TENANTIP TENANTHOST.DOMAIN TENANTHOST
853           MANAGEMENTIP MANAGEMENTHOST.DOMAIN MANAGEMENTHOST
854         params:
855           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ControllerHostnameResolveNetwork]}]}
856           DOMAIN: {get_param: CloudDomain}
857           PRIMARYHOST: {get_attr: [Controller, name]}
858           EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
859           EXTERNALHOST:
860             list_join:
861             - '.'
862             - - {get_attr: [Controller, name]}
863               - external
864           INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
865           INTERNAL_APIHOST:
866             list_join:
867             - '.'
868             - - {get_attr: [Controller, name]}
869               - internalapi
870           STORAGEIP: {get_attr: [StoragePort, ip_address]}
871           STORAGEHOST:
872             list_join:
873             - '.'
874             - - {get_attr: [Controller, name]}
875               - storage
876           STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
877           STORAGE_MGMTHOST:
878             list_join:
879             - '.'
880             - - {get_attr: [Controller, name]}
881               - storagemgmt
882           TENANTIP: {get_attr: [TenantPort, ip_address]}
883           TENANTHOST:
884             list_join:
885             - '.'
886             - - {get_attr: [Controller, name]}
887               - tenant
888           MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
889           MANAGEMENTHOST:
890             list_join:
891             - '.'
892             - - {get_attr: [Controller, name]}
893               - management
894   nova_server_resource:
895     description: Heat resource handle for the Nova compute server
896     value:
897       {get_resource: Controller}
898   swift_device:
899     description: Swift device formatted for swift-ring-builder
900     value:
901       str_replace:
902         template: 'r1z1-IP:%PORT%/d1'
903         params:
904           IP:
905             get_attr:
906               - NetIpMap
907               - net_ip_map
908               - str_replace:
909                   template: "NETWORK_uri"
910                   params:
911                     NETWORK: {get_param: [ServiceNetMap, SwiftMgmtNetwork]}
912   swift_proxy_memcache:
913     description: Swift proxy-memcache value
914     value:
915       str_replace:
916         template: "IP:11211"
917         params:
918           IP:
919             get_attr:
920               - NetIpMap
921               - net_ip_map
922               - str_replace:
923                   template: "NETWORK_uri"
924                   params:
925                     NETWORK: {get_param: [ServiceNetMap, MemcachedNetwork]}
926   tls_key_modulus_md5:
927     description: MD5 checksum of the TLS Key Modulus
928     value: {get_attr: [NodeTLSData, key_modulus_md5]}
929   tls_cert_modulus_md5:
930     description: MD5 checksum of the TLS Certificate Modulus
931     value: {get_attr: [NodeTLSData, cert_modulus_md5]}