581d966c9fdd18e7355e55b851cd2decc55ba6cf
[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   SwiftPartPower:
348     default: 10
349     description: Partition Power to use when building Swift rings
350     type: number
351   SwiftPassword:
352     default: unset
353     description: The password for the swift service account, used by the swift proxy
354       services.
355     hidden: true
356     type: string
357   SwiftReplicas:
358     type: number
359     default: 1
360     description: How many replicas to use in the swift rings.
361   VirtualIP:
362     type: string
363     default: ''  # Has to be here because of the ignored empty value bug
364
365
366 resources:
367
368   Controller:
369     type: OS::Nova::Server
370     properties:
371       image: {get_param: Image}
372       image_update_policy: {get_param: ImageUpdatePolicy}
373       flavor: {get_param: Flavor}
374       key_name: {get_param: KeyName}
375       networks:
376         - network: ctlplane
377       user_data_format: SOFTWARE_CONFIG
378
379   ControllerConfig:
380     type: OS::TripleO::Controller::SoftwareConfig
381     properties:
382       # allow configs to create sub-resources attached to the controller
383       controller_id: {get_resource: Controller}
384
385   ControllerPassthroughConfig:
386     type: OS::Heat::StructuredConfig
387     properties:
388       group: os-apply-config
389       config: {get_input: passthrough_config}
390
391   ControllerPassthroughConfigSpecific:
392     type: OS::Heat::StructuredConfig
393     properties:
394       group: os-apply-config
395       config: {get_input: passthrough_config_specific}
396
397   ControllerDeployment:
398     type: OS::TripleO::SoftwareDeployment
399     properties:
400       signal_transport: NO_SIGNAL
401       config: {get_attr: [ControllerConfig, config_id]}
402       server: {get_resource: Controller}
403       input_values:
404         bootstack_nodeid: {get_attr: [Controller, name]}
405         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
406         controller_virtual_ip: {get_param: VirtualIP}
407         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
408         heat.watch_server_url:
409           list_join:
410             - ''
411             - - 'http://'
412               - {get_param: VirtualIP}
413               - ':8003'
414         heat.metadata_server_url:
415           list_join:
416             - ''
417             - - 'http://'
418               - {get_param: VirtualIP}
419               - ':8000'
420         heat.waitcondition_server_url:
421           list_join:
422             - ''
423             - - 'http://'
424               - {get_param: VirtualIP}
425               - ':8000/v1/waitcondition'
426         admin_password: {get_param: AdminPassword}
427         admin_token: {get_param: AdminToken}
428         neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP}
429         debug: {get_param: Debug}
430         cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
431         cinder_password: {get_param: CinderPassword}
432         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
433         cinder_dsn:
434           list_join:
435             - ''
436             - - 'mysql://cinder:unset@'
437               - {get_param: VirtualIP}
438               - '/cinder'
439         glance_port: {get_param: GlancePort}
440         glance_protocol: {get_param: GlanceProtocol}
441         glance_password: {get_param: GlancePassword}
442         glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
443         glance_log_file: {get_param: GlanceLogFile}
444         glance_dsn:
445           list_join:
446             - ''
447             - - 'mysql://glance:unset@'
448               - {get_param: VirtualIP}
449               - '/glance'
450         heat_password: {get_param: HeatPassword}
451         heat_stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
452         heat_dsn:
453           list_join:
454             - ''
455             - - 'mysql://heat:unset@'
456               - {get_param: VirtualIP}
457               - '/heat'
458         keystone_ca_certificate: {get_param: KeystoneCACertificate}
459         keystone_signing_key: {get_param: KeystoneSigningKey}
460         keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
461         keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
462         keystone_ssl_certificate_key: {get_param: KeystoneSSLCertificateKey}
463         keystone_dsn:
464           list_join:
465             - ''
466             - - 'mysql://keystone:unset@'
467               - {get_param: VirtualIP}
468               - '/keystone'
469         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
470         mysql_root_password: {get_param: MysqlRootPassword}
471         mysql_cluster_name:
472           str_replace:
473             template: tripleo-CLUSTER
474             params:
475               CLUSTER: {get_param: MysqlClusterUniquePart}
476         neutron_flat_networks: {get_param: NeutronFlatNetworks}
477         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
478         neutron_agent_mode: {get_param: NeutronAgentMode}
479         neutron_router_distributed: {get_param: NeutronDVR}
480         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
481         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
482         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
483         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
484         neutron_public_interface: {get_param: NeutronPublicInterface}
485         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
486         neutron_public_interface_default_route: {get_param: NeutronPublicInterfaceDefaultRoute}
487         neutron_public_interface_tag: {get_param: NeutronPublicInterfaceTag}
488         neutron_tenant_network_type: {get_param: NeutronNetworkType}
489         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
490         neutron_password: {get_param: NeutronPassword}
491         neutron_dnsmasq_options: {get_param: NeutronDnsmasqOptions}
492         neutron_dsn:
493           list_join:
494             - ''
495             - - 'mysql://neutron:unset@'
496               - {get_param: VirtualIP}
497               - '/ovs_neutron?charset=utf8'
498         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
499         ceilometer_password: {get_param: CeilometerPassword}
500         ceilometer_dsn:
501           list_join:
502             - ''
503             - - 'mysql://ceilometer:unset@'
504               - {get_param: VirtualIP}
505               - '/ceilometer'
506         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
507         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
508         nova_password: {get_param: NovaPassword}
509         nova_dsn:
510           list_join:
511             - ''
512             - - 'mysql://nova:unset@'
513               - {get_param: VirtualIP}
514               - '/nova'
515         rabbit_username: {get_param: RabbitUserName}
516         rabbit_password: {get_param: RabbitPassword}
517         rabbit_cookie: {get_param: RabbitCookie}
518         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
519         rabbit_client_port: {get_param: RabbitClientPort}
520         ntp_server: {get_param: NtpServer}
521         control_virtual_interface: {get_param: ControlVirtualInterface}
522         public_virtual_interface: {get_param: PublicVirtualInterface}
523         public_virtual_ip: {get_param: PublicVirtualIP}
524
525   SSLConfig:
526     type: OS::Heat::StructuredConfig
527     properties:
528       group: os-apply-config
529       config:
530         ssl:
531           ca_certificate: {get_input: ssl_ca_certificate}
532         stunnel:
533           cert: {get_input: ssl_certificate}
534           key: {get_input: ssl_key}
535           cacert: {get_input: ssl_ca_certificate}
536           ports:
537            - name: 'ec2'
538              accept: 13773
539              connect: 8773
540              connect_host: {get_input: controller_host}
541            - name: 'image'
542              accept: 13292
543              connect: 9292
544              connect_host: {get_input: controller_host}
545            - name: 'identity'
546              accept: 13000
547              connect: 5000
548              connect_host: {get_input: controller_host}
549            - name: 'network'
550              accept: 13696
551              connect: 9696
552              connect_host: {get_input: controller_host}
553            - name: 'compute'
554              accept: 13774
555              connect: 8774
556              connect_host: {get_input: controller_host}
557            - name: 'swift-proxy'
558              accept: 13080
559              connect: 8080
560              connect_host: {get_input: controller_host}
561            - name: 'cinder'
562              accept: 13776
563              connect: 8776
564              connect_host: {get_input: controller_host}
565            - name: 'ceilometer'
566              accept: 13777
567              connect: 8777
568              connect_host: {get_input: controller_host}
569
570   ControllerSSLDeployment:
571     type: OS::Heat::StructuredDeployment
572     properties:
573       config: {get_resource: SSLConfig}
574       server: {get_resource: Controller}
575       signal_transport: NO_SIGNAL
576       input_values:
577         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
578         ssl_certificate: {get_param: SSLCertificate}
579         ssl_key: {get_param: SSLKey}
580         ssl_ca_certificate: {get_param: SSLCACertificate}
581
582   ControllerPassthroughDeployment:
583     type: OS::Heat::StructuredDeployment
584     properties:
585       config: {get_resource: ControllerPassthroughConfig}
586       server: {get_resource: Controller}
587       signal_transport: NO_SIGNAL
588       input_values:
589         passthrough_config: {get_param: ExtraConfig}
590
591   ControllerPassthroughSpecificDeployment:
592     depends_on: [ControllerPassthroughDeployment]
593     type: OS::Heat::StructuredDeployment
594     properties:
595       config: {get_resource: ControllerPassthroughConfigSpecific}
596       server: {get_resource: Controller}
597       signal_transport: NO_SIGNAL
598       input_values:
599         passthrough_config_specific: {get_param: ControllerExtraConfig}
600
601   SwiftConfig:
602     type: OS::Heat::StructuredConfig
603     properties:
604       group: os-apply-config
605       config:
606         swift:
607           hash: { get_input: swift_hash_suffix }
608           part-power: { get_input: swift_part_power }
609           replicas: {get_input: swift_replicas }
610           service-password: { get_input: swift_password }
611
612   SwiftStorageDeploy:
613     type: OS::Heat::StructuredDeployment
614     properties:
615       server: {get_resource: Controller}
616       config: {get_resource: SwiftConfig}
617       signal_transport: NO_SIGNAL
618       input_values:
619         swift_hash_suffix: {get_param: SwiftHashSuffix}
620         swift_password: {get_param: SwiftPassword}
621         swift_part_power: {get_param: SwiftPartPower}
622         swift_replicas: { get_param: SwiftReplicas}
623
624 outputs:
625   ip_address:
626     description: IP address of the server in the ctlplane network
627     value: {get_attr: [Controller, networks, ctlplane, 0]}
628   hostname:
629     description: Hostname of the server
630     value: {get_attr: [Controller, name]}
631   corosync_node:
632     description: >
633       Node object in the format {ip: ..., name: ...} format that the corosync
634       element expects
635     value:
636       ip: {get_attr: [Controller, networks, ctlplane, 0]}
637       name: {get_attr: [Controller, name]}
638   hosts_entry:
639     description: >
640       Server's IP address and hostname in the /etc/hosts format
641     value:
642       str_replace:
643         template: IP HOST HOST.novalocal CLOUDNAME
644         params:
645           IP: {get_attr: [Controller, networks, ctlplane, 0]}
646           HOST: {get_attr: [Controller, name]}
647           CLOUDNAME: {get_param: CloudName}
648   nova_server_resource:
649     description: Heat resource handle for the Nova compute server
650     value:
651       {get_resource: Controller}
652   swift_device:
653     description: Swift device formatted for swift-ring-builder
654     value:
655       str_replace:
656         template: 'r1z1-IP:%PORT%/d1'
657         params:
658           IP: {get_attr: [Controller, networks, ctlplane, 0]}
659   swift_proxy_memcache:
660     description: Swift proxy-memcache value
661     value:
662       str_replace:
663         template: "IP:11211"
664         params:
665           IP: {get_attr: [Controller, networks, ctlplane, 0]}