Merge "Add SwiftMountCheck to overcloud-without-mergepy"
[apex-tripleo-heat-templates.git] / controller.yaml
1 heat_template_version: 2014-10-16
2
3 description: >
4   OpenStack control plane node. Can be wrapped in a ResourceGroup for scaling.
5
6 parameters:
7   AdminPassword:
8     default: unset
9     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
10     type: string
11     hidden: true
12   AdminToken:
13     default: unset
14     description: The keystone auth secret.
15     type: string
16     hidden: true
17   CeilometerMeteringSecret:
18     default: unset
19     description: Secret shared by the ceilometer services.
20     type: string
21     hidden: true
22   CeilometerPassword:
23     default: unset
24     description: The password for the ceilometer service account.
25     type: string
26     hidden: true
27   CinderISCSIHelper:
28     default: tgtadm
29     description: The iSCSI helper to use with cinder.
30     type: string
31   CinderLVMLoopDeviceSize:
32     default: 5000
33     description: The size of the loopback file used by the cinder LVM driver.
34     type: number
35   CinderPassword:
36     default: unset
37     description: The password for the cinder service account, used by cinder-api.
38     type: string
39     hidden: true
40   CloudName:
41     default: ''
42     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
43     type: string
44   ControllerExtraConfig:
45     default: {}
46     description: |
47       Controller specific configuration to inject into the cluster. Same
48       structure as ExtraConfig.
49     type: json
50   ControlVirtualInterface:
51     default: 'br-ex'
52     description: Interface where virtual ip will be assigned.
53     type: string
54   Debug:
55     default: ''
56     description: Set to True to enable debugging on all services.
57     type: string
58   ExtraConfig:
59     default: {}
60     description: |
61       Additional configuration to inject into the cluster. The JSON should have
62       the following structure:
63         {"FILEKEY":
64           {"config":
65             [{"section": "SECTIONNAME",
66               "values":
67                 [{"option": "OPTIONNAME",
68                   "value": "VALUENAME"
69                  }
70                 ]
71              }
72             ]
73           }
74         }
75       For instance:
76         {"nova":
77           {"config":
78             [{"section": "default",
79               "values":
80                 [{"option": "compute_manager",
81                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
82                  }
83                 ]
84              },
85              {"section": "cells",
86               "values":
87                 [{"option": "driver",
88                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
89                  }
90                 ]
91              }
92             ]
93           }
94         }
95     type: json
96   Flavor:
97     description: Flavor for control nodes to request when deploying.
98     type: string
99     constraints:
100       - custom_constraint: nova.flavor
101   GlanceNotifierStrategy:
102     description: Strategy to use for Glance notification queue
103     type: string
104     default: noop
105   GlanceLogFile:
106     description: The filepath of the file to use for logging messages from Glance.
107     type: string
108     default: ''
109   GlancePassword:
110     default: unset
111     description: The password for the glance service account, used by the glance services.
112     type: string
113     hidden: true
114   GlancePort:
115     default: "9292"
116     description: Glance port.
117     type: string
118   GlanceProtocol:
119     default: http
120     description: Protocol to use when connecting to glance, set to https for SSL.
121     type: string
122   HeatPassword:
123     default: unset
124     description: The password for the Heat service account, used by the Heat services.
125     type: string
126     hidden: true
127   HeatStackDomainAdminPassword:
128     description: Password for heat_domain_admin user.
129     type: string
130     default: ''
131     hidden: true
132   Image:
133     type: string
134     default: overcloud-control
135     constraints:
136       - custom_constraint: glance.image
137   ImageUpdatePolicy:
138     default: 'REBUILD_PRESERVE_EPHEMERAL'
139     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
140     type: string
141   KeyName:
142     default: default
143     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
144     type: string
145     constraints:
146       - custom_constraint: nova.keypair
147   KeystoneCACertificate:
148     default: ''
149     description: Keystone self-signed certificate authority certificate.
150     type: string
151   KeystoneSigningCertificate:
152     default: ''
153     description: Keystone certificate for verifying token validity.
154     type: string
155   KeystoneSigningKey:
156     default: ''
157     description: Keystone key for signing tokens.
158     type: string
159     hidden: true
160   KeystoneSSLCertificate:
161     default: ''
162     description: Keystone certificate for verifying token validity.
163     type: string
164   KeystoneSSLCertificateKey:
165     default: ''
166     description: Keystone key for signing tokens.
167     type: string
168     hidden: true
169   MysqlClusterUniquePart:
170     description: A unique identifier of the MySQL cluster the controller is in.
171     type: string
172     default: 'unset'  # Has to be here because of the ignored empty value bug
173     # Drop the validation: https://bugs.launchpad.net/tripleo/+bug/1405446
174     # constraints:
175     # - length: {min: 4, max: 10}
176   MysqlInnodbBufferPoolSize:
177     description: >
178         Specifies the size of the buffer pool in megabytes. Setting to
179         zero should be interpreted as "no value" and will defer to the
180         lower level default.
181     type: number
182     default: 0
183   MysqlRootPassword:
184     type: string
185     hidden: true
186     default: ''  # Has to be here because of the ignored empty value bug
187   NeutronBridgeMappings:
188     description: >
189       The OVS logical->physical bridge mappings to use. See the Neutron
190       documentation for details. Defaults to mapping br-ex - the external
191       bridge on hosts - to a physical name 'datacentre' which can be used
192       to create provider networks (and we use this for the default floating
193       network) - if changing this either use different post-install network
194       scripts or be sure to keep 'datacentre' as a mapping network name.
195     type: string
196     default: ""
197   NeutronDnsmasqOptions:
198     default: 'dhcp-option-force=26,1400'
199     description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the gre tunnel overhead.
200     type: string
201   NeutronAgentMode:
202     default: 'dvr_snat'
203     description: Agent mode for the neutron-l3-agent on the controller hosts
204     type: string
205   NeutronDVR:
206     default: 'False'
207     description: Whether to configure Neutron Distributed Virtual Routers
208     type: string
209   NeutronMetadataProxySharedSecret:
210     default: 'unset'
211     description: Shared secret to prevent spoofing
212     type: string
213   NeutronMechanismDrivers:
214     default: 'openvswitch'
215     description: |
216         The mechanism drivers for the Neutron tenant network. To specify multiple
217         values, use a comma separated string, like so: 'openvswitch,l2_population'
218     type: string
219   NeutronAllowL3AgentFailover:
220     default: 'True'
221     description: Allow automatic l3-agent failover
222     type: string
223   NeutronEnableTunnelling:
224     type: string
225     default: "True"
226   NeutronFlatNetworks:
227     type: string
228     default: ''
229     description: If set, flat networks to configure in neutron plugins.
230   NeutronNetworkType:
231     default: 'gre'
232     description: The tenant network type for Neutron, either gre or vxlan.
233     type: string
234   NeutronNetworkVLANRanges:
235     default: 'datacentre'
236     description: >
237       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
238       Neutron documentation for permitted values. Defaults to permitting any
239       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
240     type: string
241   NeutronPassword:
242     default: unset
243     description: The password for the neutron service account, used by neutron agents.
244     type: string
245     hidden: true
246   NeutronPublicInterface:
247     default: nic1
248     description: What interface to bridge onto br-ex for network nodes.
249     type: string
250   NeutronPublicInterfaceTag:
251     default: ''
252     description: >
253       VLAN tag for creating a public VLAN. The tag will be used to
254       create an access port on the exterior bridge for each control plane node,
255       and that port will be given the IP address returned by neutron from the
256       public network. Set CONTROLEXTRA=overcloud-vlan-port.yaml when compiling
257       overcloud.yaml to include the deployment of VLAN ports to the control
258       plane.
259     type: string
260   NeutronPublicInterfaceDefaultRoute:
261     default: ''
262     description: A custom default route for the NeutronPublicInterface.
263     type: string
264   NeutronPublicInterfaceIP:
265     default: ''
266     description: A custom IP address to put onto the NeutronPublicInterface.
267     type: string
268   NeutronPublicInterfaceRawDevice:
269     default: ''
270     description: If set, the public interface is a vlan with this device as the raw device.
271     type: string
272   NeutronTunnelTypes:
273     default: 'gre'
274     description: |
275         The tunnel types for the Neutron tenant network. To specify multiple
276         values, use a comma separated string, like so: 'gre,vxlan'
277     type: string
278   NovaPassword:
279     default: unset
280     description: The password for the nova service account, used by nova-api.
281     type: string
282     hidden: true
283   NtpServer:
284     type: string
285     default: ''
286   PublicVirtualInterface:
287     default: 'br-ex'
288     description: >
289         Specifies the interface where the public-facing virtual ip will be assigned.
290         This should be int_public when a VLAN is being used.
291     type: string
292   PublicVirtualIP:
293     type: string
294     default: ''  # Has to be here because of the ignored empty value bug
295   RabbitCookie:
296     type: string
297     default: ''  # Has to be here because of the ignored empty value bug
298     hidden: true
299   RabbitPassword:
300     default: guest
301     description: The password for RabbitMQ
302     type: string
303     hidden: true
304   RabbitUserName:
305     default: guest
306     description: The username for RabbitMQ
307     type: string
308   RabbitClientUseSSL:
309     default: false
310     description: >
311         Rabbit client subscriber parameter to specify
312         an SSL connection to the RabbitMQ host.
313     type: string
314   RabbitClientPort:
315     default: 5672
316     description: Set rabbit subscriber port, change this if using SSL
317     type: number
318   SnmpdReadonlyUserName:
319     default: ro_snmp_user
320     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
321     type: string
322   SnmpdReadonlyUserPassword:
323     default: unset
324     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
325     type: string
326     hidden: true
327   SSLCACertificate:
328     default: ''
329     description: If set, the contents of an SSL certificate authority file.
330     type: string
331   SSLCertificate:
332     default: ''
333     description: If set, the contents of an SSL certificate .crt file for encrypting SSL endpoints.
334     type: string
335     hidden: true
336   SSLKey:
337     default: ''
338     description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints.
339     type: string
340     hidden: true
341   SwiftHashSuffix:
342     default: unset
343     description: A random string to be used as a salt when hashing to determine mappings
344       in the ring.
345     hidden: true
346     type: string
347   SwiftMountCheck:
348     default: 'false'
349     description: Value of mount_check in Swift account/container/object -server.conf
350     type: boolean
351   SwiftMinPartHours:
352     type: number
353     default: 1
354     description: The minimum time (in hours) before a partition in a ring can be moved following a rebalance.
355   SwiftPartPower:
356     default: 10
357     description: Partition Power to use when building Swift rings
358     type: number
359   SwiftPassword:
360     default: unset
361     description: The password for the swift service account, used by the swift proxy
362       services.
363     hidden: true
364     type: string
365   SwiftReplicas:
366     type: number
367     default: 1
368     description: How many replicas to use in the swift rings.
369   VirtualIP:
370     type: string
371     default: ''  # Has to be here because of the ignored empty value bug
372
373
374 resources:
375
376   Controller:
377     type: OS::Nova::Server
378     properties:
379       image: {get_param: Image}
380       image_update_policy: {get_param: ImageUpdatePolicy}
381       flavor: {get_param: Flavor}
382       key_name: {get_param: KeyName}
383       networks:
384         - network: ctlplane
385       user_data_format: SOFTWARE_CONFIG
386
387   NetworkConfig:
388     type: OS::TripleO::Net::SoftwareConfig
389
390   NetworkDeployment:
391     type: OS::TripleO::SoftwareDeployment
392     properties:
393       signal_transport: NO_SIGNAL
394       config: {get_attr: [NetworkConfig, config_id]}
395       server: {get_resource: Controller}
396       input_values:
397         bridge_name: br-ex
398         interface_name: {get_param: NeutronPublicInterface}
399
400   ControllerConfig:
401     type: OS::TripleO::Controller::SoftwareConfig
402     properties:
403       # allow configs to create sub-resources attached to the controller
404       controller_id: {get_resource: Controller}
405
406   ControllerPassthroughConfig:
407     type: OS::Heat::StructuredConfig
408     properties:
409       group: os-apply-config
410       config: {get_input: passthrough_config}
411
412   ControllerPassthroughConfigSpecific:
413     type: OS::Heat::StructuredConfig
414     properties:
415       group: os-apply-config
416       config: {get_input: passthrough_config_specific}
417
418   ControllerDeployment:
419     type: OS::TripleO::SoftwareDeployment
420     properties:
421       signal_transport: NO_SIGNAL
422       config: {get_attr: [ControllerConfig, config_id]}
423       server: {get_resource: Controller}
424       input_values:
425         bootstack_nodeid: {get_attr: [Controller, name]}
426         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
427         controller_virtual_ip: {get_param: VirtualIP}
428         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
429         heat.watch_server_url:
430           list_join:
431             - ''
432             - - 'http://'
433               - {get_param: VirtualIP}
434               - ':8003'
435         heat.metadata_server_url:
436           list_join:
437             - ''
438             - - 'http://'
439               - {get_param: VirtualIP}
440               - ':8000'
441         heat.waitcondition_server_url:
442           list_join:
443             - ''
444             - - 'http://'
445               - {get_param: VirtualIP}
446               - ':8000/v1/waitcondition'
447         admin_password: {get_param: AdminPassword}
448         admin_token: {get_param: AdminToken}
449         neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP}
450         debug: {get_param: Debug}
451         cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
452         cinder_password: {get_param: CinderPassword}
453         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
454         cinder_dsn:
455           list_join:
456             - ''
457             - - 'mysql://cinder:unset@'
458               - {get_param: VirtualIP}
459               - '/cinder'
460         glance_port: {get_param: GlancePort}
461         glance_protocol: {get_param: GlanceProtocol}
462         glance_password: {get_param: GlancePassword}
463         glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
464         glance_log_file: {get_param: GlanceLogFile}
465         glance_dsn:
466           list_join:
467             - ''
468             - - 'mysql://glance:unset@'
469               - {get_param: VirtualIP}
470               - '/glance'
471         heat_password: {get_param: HeatPassword}
472         heat_stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
473         heat_dsn:
474           list_join:
475             - ''
476             - - 'mysql://heat:unset@'
477               - {get_param: VirtualIP}
478               - '/heat'
479         keystone_ca_certificate: {get_param: KeystoneCACertificate}
480         keystone_signing_key: {get_param: KeystoneSigningKey}
481         keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
482         keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
483         keystone_ssl_certificate_key: {get_param: KeystoneSSLCertificateKey}
484         keystone_dsn:
485           list_join:
486             - ''
487             - - 'mysql://keystone:unset@'
488               - {get_param: VirtualIP}
489               - '/keystone'
490         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
491         mysql_root_password: {get_param: MysqlRootPassword}
492         mysql_cluster_name:
493           str_replace:
494             template: tripleo-CLUSTER
495             params:
496               CLUSTER: {get_param: MysqlClusterUniquePart}
497         neutron_flat_networks: {get_param: NeutronFlatNetworks}
498         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
499         neutron_agent_mode: {get_param: NeutronAgentMode}
500         neutron_router_distributed: {get_param: NeutronDVR}
501         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
502         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
503         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
504         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
505         neutron_public_interface: {get_param: NeutronPublicInterface}
506         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
507         neutron_public_interface_default_route: {get_param: NeutronPublicInterfaceDefaultRoute}
508         neutron_public_interface_tag: {get_param: NeutronPublicInterfaceTag}
509         neutron_tenant_network_type: {get_param: NeutronNetworkType}
510         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
511         neutron_password: {get_param: NeutronPassword}
512         neutron_dnsmasq_options: {get_param: NeutronDnsmasqOptions}
513         neutron_dsn:
514           list_join:
515             - ''
516             - - 'mysql://neutron:unset@'
517               - {get_param: VirtualIP}
518               - '/ovs_neutron?charset=utf8'
519         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
520         ceilometer_password: {get_param: CeilometerPassword}
521         ceilometer_dsn:
522           list_join:
523             - ''
524             - - 'mysql://ceilometer:unset@'
525               - {get_param: VirtualIP}
526               - '/ceilometer'
527         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
528         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
529         nova_password: {get_param: NovaPassword}
530         nova_dsn:
531           list_join:
532             - ''
533             - - 'mysql://nova:unset@'
534               - {get_param: VirtualIP}
535               - '/nova'
536         rabbit_username: {get_param: RabbitUserName}
537         rabbit_password: {get_param: RabbitPassword}
538         rabbit_cookie: {get_param: RabbitCookie}
539         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
540         rabbit_client_port: {get_param: RabbitClientPort}
541         ntp_server: {get_param: NtpServer}
542         control_virtual_interface: {get_param: ControlVirtualInterface}
543         public_virtual_interface: {get_param: PublicVirtualInterface}
544         public_virtual_ip: {get_param: PublicVirtualIP}
545
546   SSLConfig:
547     type: OS::Heat::StructuredConfig
548     properties:
549       group: os-apply-config
550       config:
551         ssl:
552           ca_certificate: {get_input: ssl_ca_certificate}
553         stunnel:
554           cert: {get_input: ssl_certificate}
555           key: {get_input: ssl_key}
556           cacert: {get_input: ssl_ca_certificate}
557           ports:
558            - name: 'ec2'
559              accept: 13773
560              connect: 8773
561              connect_host: {get_input: controller_host}
562            - name: 'image'
563              accept: 13292
564              connect: 9292
565              connect_host: {get_input: controller_host}
566            - name: 'identity'
567              accept: 13000
568              connect: 5000
569              connect_host: {get_input: controller_host}
570            - name: 'network'
571              accept: 13696
572              connect: 9696
573              connect_host: {get_input: controller_host}
574            - name: 'compute'
575              accept: 13774
576              connect: 8774
577              connect_host: {get_input: controller_host}
578            - name: 'swift-proxy'
579              accept: 13080
580              connect: 8080
581              connect_host: {get_input: controller_host}
582            - name: 'cinder'
583              accept: 13776
584              connect: 8776
585              connect_host: {get_input: controller_host}
586            - name: 'ceilometer'
587              accept: 13777
588              connect: 8777
589              connect_host: {get_input: controller_host}
590
591   ControllerSSLDeployment:
592     type: OS::Heat::StructuredDeployment
593     properties:
594       config: {get_resource: SSLConfig}
595       server: {get_resource: Controller}
596       signal_transport: NO_SIGNAL
597       input_values:
598         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
599         ssl_certificate: {get_param: SSLCertificate}
600         ssl_key: {get_param: SSLKey}
601         ssl_ca_certificate: {get_param: SSLCACertificate}
602
603   ControllerPassthroughDeployment:
604     type: OS::Heat::StructuredDeployment
605     properties:
606       config: {get_resource: ControllerPassthroughConfig}
607       server: {get_resource: Controller}
608       signal_transport: NO_SIGNAL
609       input_values:
610         passthrough_config: {get_param: ExtraConfig}
611
612   ControllerPassthroughSpecificDeployment:
613     depends_on: [ControllerPassthroughDeployment]
614     type: OS::Heat::StructuredDeployment
615     properties:
616       config: {get_resource: ControllerPassthroughConfigSpecific}
617       server: {get_resource: Controller}
618       signal_transport: NO_SIGNAL
619       input_values:
620         passthrough_config_specific: {get_param: ControllerExtraConfig}
621
622   SwiftConfig:
623     type: OS::Heat::StructuredConfig
624     properties:
625       group: os-apply-config
626       config:
627         swift:
628           hash: { get_input: swift_hash_suffix }
629           part-power: { get_input: swift_part_power }
630           mount-check: { get_input: swift_mount_check }
631           min-part-hours: { get_input: swift_min_part_hours }
632           replicas: {get_input: swift_replicas }
633           service-password: { get_input: swift_password }
634
635   SwiftStorageDeploy:
636     type: OS::Heat::StructuredDeployment
637     properties:
638       server: {get_resource: Controller}
639       config: {get_resource: SwiftConfig}
640       signal_transport: NO_SIGNAL
641       input_values:
642         swift_hash_suffix: {get_param: SwiftHashSuffix}
643         swift_mount_check: {get_param: SwiftMountCheck}
644         swift_password: {get_param: SwiftPassword}
645         swift_min_part_hours: {get_param: SwiftMinPartHours}
646         swift_part_power: {get_param: SwiftPartPower}
647         swift_replicas: { get_param: SwiftReplicas}
648
649 outputs:
650   ip_address:
651     description: IP address of the server in the ctlplane network
652     value: {get_attr: [Controller, networks, ctlplane, 0]}
653   hostname:
654     description: Hostname of the server
655     value: {get_attr: [Controller, name]}
656   corosync_node:
657     description: >
658       Node object in the format {ip: ..., name: ...} format that the corosync
659       element expects
660     value:
661       ip: {get_attr: [Controller, networks, ctlplane, 0]}
662       name: {get_attr: [Controller, name]}
663   hosts_entry:
664     description: >
665       Server's IP address and hostname in the /etc/hosts format
666     value:
667       str_replace:
668         template: IP HOST HOST.novalocal CLOUDNAME
669         params:
670           IP: {get_attr: [Controller, networks, ctlplane, 0]}
671           HOST: {get_attr: [Controller, name]}
672           CLOUDNAME: {get_param: CloudName}
673   nova_server_resource:
674     description: Heat resource handle for the Nova compute server
675     value:
676       {get_resource: Controller}
677   swift_device:
678     description: Swift device formatted for swift-ring-builder
679     value:
680       str_replace:
681         template: 'r1z1-IP:%PORT%/d1'
682         params:
683           IP: {get_attr: [Controller, networks, ctlplane, 0]}
684   swift_proxy_memcache:
685     description: Swift proxy-memcache value
686     value:
687       str_replace:
688         template: "IP:11211"
689         params:
690           IP: {get_attr: [Controller, networks, ctlplane, 0]}