Merge "Add block completion signal"
[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     default: baremetal
98     description: Flavor for control nodes to request when deploying.
99     type: string
100   GlanceNotifierStrategy:
101     description: Strategy to use for Glance notification queue
102     type: string
103     default: noop
104   GlanceLogFile:
105     description: The filepath of the file to use for logging messages from Glance.
106     type: string
107     default: ''
108   GlancePassword:
109     default: unset
110     description: The password for the glance service account, used by the glance services.
111     type: string
112     hidden: true
113   GlancePort:
114     default: "9292"
115     description: Glance port.
116     type: string
117   GlanceProtocol:
118     default: http
119     description: Protocol to use when connecting to glance, set to https for SSL.
120     type: string
121   HeatPassword:
122     default: unset
123     description: The password for the Heat service account, used by the Heat services.
124     type: string
125     hidden: true
126   HeatStackDomainAdminPassword:
127     description: Password for heat_domain_admin user.
128     type: string
129     default: ''
130     hidden: true
131   Image:
132     type: string
133     default: overcloud-control
134   ImageUpdatePolicy:
135     default: 'REBUILD_PRESERVE_EPHEMERAL'
136     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
137     type: string
138   KeyName:
139     default: default
140     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
141     type: string
142   KeystoneCACertificate:
143     default: ''
144     description: Keystone self-signed certificate authority certificate.
145     type: string
146   KeystoneSigningCertificate:
147     default: ''
148     description: Keystone certificate for verifying token validity.
149     type: string
150   KeystoneSigningKey:
151     default: ''
152     description: Keystone key for signing tokens.
153     type: string
154     hidden: true
155   MysqlClusterUniquePart:
156     description: A unique identifier of the MySQL cluster the controller is in.
157     type: string
158     default: 'unset'  # Has to be here because of the ignored empty value bug
159     constraints:
160     - length: {min: 4, max: 10}
161   MysqlInnodbBufferPoolSize:
162     description: >
163         Specifies the size of the buffer pool in megabytes. Setting to
164         zero should be interpreted as "no value" and will defer to the
165         lower level default.
166     type: number
167     default: 0
168   MysqlRootPassword:
169     type: string
170     hidden: true
171     default: ''  # Has to be here because of the ignored empty value bug
172   NeutronBridgeMappings:
173     description: >
174       The OVS logical->physical bridge mappings to use. See the Neutron
175       documentation for details. Defaults to mapping br-ex - the external
176       bridge on hosts - to a physical name 'datacentre' which can be used
177       to create provider networks (and we use this for the default floating
178       network) - if changing this either use different post-install network
179       scripts or be sure to keep 'datacentre' as a mapping network name.
180     type: string
181     default: ""
182   NeutronDnsmasqOptions:
183     default: 'dhcp-option-force=26,1400'
184     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.
185     type: string
186   NeutronEnableTunnelling:
187     type: string
188     default: "True"
189   NeutronFlatNetworks:
190     type: string
191     default: ''
192     description: If set, flat networks to configure in neutron plugins.
193   NeutronNetworkType:
194     default: 'gre'
195     description: The tenant network type for Neutron, either gre or vxlan.
196     type: string
197   NeutronNetworkVLANRanges:
198     default: 'datacentre'
199     description: >
200       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
201       Neutron documentation for permitted values. Defaults to permitting any
202       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
203     type: string
204   NeutronPassword:
205     default: unset
206     description: The password for the neutron service account, used by neutron agents.
207     type: string
208     hidden: true
209   NeutronPublicInterface:
210     default: eth0
211     description: What interface to bridge onto br-ex for network nodes.
212     type: string
213   NeutronPublicInterfaceTag:
214     default: ''
215     description: >
216       VLAN tag for creating a public VLAN. The tag will be used to
217       create an access port on the exterior bridge for each control plane node,
218       and that port will be given the IP address returned by neutron from the
219       public network. Set CONTROLEXTRA=overcloud-vlan-port.yaml when compiling
220       overcloud.yaml to include the deployment of VLAN ports to the control
221       plane.
222     type: string
223   NeutronPublicInterfaceDefaultRoute:
224     default: ''
225     description: A custom default route for the NeutronPublicInterface.
226     type: string
227   NeutronPublicInterfaceIP:
228     default: ''
229     description: A custom IP address to put onto the NeutronPublicInterface.
230     type: string
231   NeutronPublicInterfaceRawDevice:
232     default: ''
233     description: If set, the public interface is a vlan with this device as the raw device.
234     type: string
235   NeutronTunnelTypes:
236     default: 'gre'
237     description: |
238         The tunnel types for the Neutron tenant network. To specify multiple
239         values, use a comma separated string, like so: 'gre,vxlan'
240     type: string
241   NovaPassword:
242     default: unset
243     description: The password for the nova service account, used by nova-api.
244     type: string
245     hidden: true
246   NtpServer:
247     type: string
248     default: ''
249   PublicVirtualInterface:
250     default: 'br-ex'
251     description: >
252         Specifies the interface where the public-facing virtual ip will be assigned.
253         This should be int_public when a VLAN is being used.
254     type: string
255   PublicVirtualIP:
256     type: string
257     default: ''  # Has to be here because of the ignored empty value bug
258   RabbitCookie:
259     type: string
260     default: ''  # Has to be here because of the ignored empty value bug
261     hidden: true
262   RabbitPassword:
263     default: guest
264     description: The password for RabbitMQ
265     type: string
266     hidden: true
267   RabbitUserName:
268     default: guest
269     description: The username for RabbitMQ
270     type: string
271   SnmpdReadonlyUserName:
272     default: ro_snmp_user
273     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
274     type: string
275   SnmpdReadonlyUserPassword:
276     default: unset
277     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
278     type: string
279     hidden: true
280   SSLCACertificate:
281     default: ''
282     description: If set, the contents of an SSL certificate authority file.
283     type: string
284   SSLCertificate:
285     default: ''
286     description: If set, the contents of an SSL certificate .crt file for encrypting SSL endpoints.
287     type: string
288     hidden: true
289   SSLKey:
290     default: ''
291     description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints.
292     type: string
293     hidden: true
294   VirtualIP:
295     type: string
296     default: ''  # Has to be here because of the ignored empty value bug
297
298
299 resources:
300
301   Controller:
302     type: OS::Nova::Server
303     properties:
304       image: {get_param: Image}
305       image_update_policy: {get_param: ImageUpdatePolicy}
306       flavor: {get_param: Flavor}
307       key_name: {get_param: KeyName}
308       networks:
309         - network: ctlplane
310       user_data_format: SOFTWARE_CONFIG
311
312   ControllerConfig:
313     type: OS::Heat::StructuredConfig
314     properties:
315       group: os-apply-config
316       config:
317         admin-password: {get_param: AdminPassword}
318         admin-token: {get_param: AdminToken}
319         bootstack:
320           public_interface_ip: {get_param: NeutronPublicInterfaceIP}
321         bootstrap_host:
322           nodeid: {get_input: bootstack_nodeid}
323         database:
324           host: &database_host
325             {get_param: VirtualIP}
326         cinder:
327           db:
328             list_join:
329               - ''
330               - - mysql://cinder:unset@
331                 - *database_host
332                 - /cinder
333           debug: {get_param: Debug}
334           volume_size_mb: {get_param: CinderLVMLoopDeviceSize}
335           service-password: {get_param: CinderPassword}
336           iscsi-helper: {get_param: CinderISCSIHelper}
337         controller-address: {get_input: controller_host}
338         corosync:
339           bindnetaddr: {get_input: controller_host}
340           mcastport: 5577
341         pacemaker:
342           stonith_enabled : false
343           recheck_interval : 5
344           quorum_policy : ignore
345         db-password: unset
346         glance:
347           registry:
348             host: {get_input: controller_virtual_ip}
349           backend: swift
350           db:
351             list_join:
352               - ''
353               - - mysql://glance:unset@
354                 - *database_host
355                 - /glance
356           debug: {get_param: Debug}
357           host: {get_input: controller_virtual_ip}
358           port: {get_param: GlancePort}
359           protocol: {get_param: GlanceProtocol}
360           service-password: {get_param: GlancePassword}
361           swift-store-user: service:glance
362           swift-store-key: {get_param: GlancePassword}
363           notifier-strategy: {get_param: GlanceNotifierStrategy}
364           log-file: {get_param: GlanceLogFile}
365         heat:
366           admin_password: {get_param: HeatPassword}
367           admin_tenant_name: service
368           admin_user: heat
369           auth_encryption_key: unset___________
370           db:
371             list_join:
372               - ''
373               - - mysql://heat:unset@
374                 - *database_host
375                 - /heat
376           debug: {get_param: Debug}
377           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
378           watch_server_url: {get_input: heat.watch_server_url}
379           metadata_server_url: {get_input: heat.metadata_server_url}
380           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
381         keystone:
382           db:
383             list_join:
384               - ''
385               - - mysql://keystone:unset@
386                 - *database_host
387                 - /keystone
388           debug: {get_param: Debug}
389           host: {get_input: controller_virtual_ip}
390           ca_certificate: {get_param: KeystoneCACertificate}
391           signing_key: {get_param: KeystoneSigningKey}
392           signing_certificate: {get_param: KeystoneSigningCertificate}
393         mysql:
394           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
395           local_bind: true
396           root-password: {get_param: MysqlRootPassword}
397           cluster_name:
398             str_replace:
399               template: tripleo-CLUSTER
400               params:
401                 CLUSTER: {get_param: MysqlClusterUniquePart}
402         neutron:
403           debug: {get_param: Debug}
404           flat-networks: {get_param: NeutronFlatNetworks}
405           host: {get_input: controller_virtual_ip}
406           metadata_proxy_shared_secret: unset
407           ovs:
408             enable_tunneling: {get_input: neutron_enable_tunneling}
409             local_ip: {get_input: controller_host}
410             network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
411             bridge_mappings: {get_param: NeutronBridgeMappings}
412             public_interface: {get_param: NeutronPublicInterface}
413             public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
414             public_interface_route: {get_param: NeutronPublicInterfaceDefaultRoute}
415             public_interface_tag: {get_param: NeutronPublicInterfaceTag}
416             physical_bridge: br-ex
417             tenant_network_type: {get_param: NeutronNetworkType}
418             tunnel_types: {get_param: NeutronTunnelTypes}
419           ovs_db:
420             list_join:
421               - ''
422               - - mysql://neutron:unset@
423                 - *database_host
424                 - /ovs_neutron?charset=utf8
425           service-password: {get_param: NeutronPassword}
426           dnsmasq-options: {get_param: NeutronDnsmasqOptions}
427         ceilometer:
428           db:
429             list_join:
430               - ''
431               - - mysql://ceilometer:unset@
432                 - *database_host
433                 - /ceilometer
434           debug: {get_param: Debug}
435           metering_secret: {get_param: CeilometerMeteringSecret}
436           service-password: {get_param: CeilometerPassword}
437         snmpd:
438           export_MIB: UCD-SNMP-MIB
439           readonly_user_name: {get_param: SnmpdReadonlyUserName}
440           readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
441         nova:
442           compute_driver: libvirt.LibvirtDriver
443           db:
444             list_join:
445               - ''
446               - - mysql://nova:unset@
447                 - *database_host
448                 - /nova
449           default_floating_pool:
450             ext-net
451           host: {get_input: controller_virtual_ip}
452           metadata-proxy: true
453           service-password: {get_param: NovaPassword}
454         rabbit:
455           host: {get_input: controller_virtual_ip}
456           username: {get_param: RabbitUserName}
457           password: {get_param: RabbitPassword}
458           cookie: {get_param: RabbitCookie}
459         ntp:
460           servers:
461               - {server: {get_param: NtpServer}, fudge: "stratum 0"}
462         virtual_interfaces:
463           instances:
464             - vrrp_instance_name: VI_CONTROL
465               virtual_router_id: 51
466               keepalive_interface: {get_param: ControlVirtualInterface}
467               priority: 101
468               virtual_ips:
469               - ip: {get_param: VirtualIP}
470                 interface: {get_param: ControlVirtualInterface}
471             - vrrp_instance_name: VI_PUBLIC
472               virtual_router_id: 52
473               keepalive_interface: {get_param: PublicVirtualInterface}
474               priority: 101
475               virtual_ips:
476               - ip: {get_param: PublicVirtualIP}
477                 interface: {get_param: PublicVirtualInterface}
478           vrrp_sync_groups:
479             - name: VG1
480               members:
481                 - VI_CONTROL
482                 - VI_PUBLIC
483         keepalived:
484           keepalive_interface: {get_param: PublicVirtualInterface}
485           priority: 101
486         virtual_ips:
487             -
488               ip: {get_param: VirtualIP}
489               interface: {get_param: ControlVirtualInterface}
490             -
491               ip: {get_param: PublicVirtualIP}
492               interface: {get_param: PublicVirtualInterface}
493         haproxy:
494           net_binds:
495             - ip: {get_param: VirtualIP}
496           services:
497             - name: keystone_admin
498               port: 35357
499               net_binds: &public_binds
500                 - ip: {get_param: VirtualIP}
501                 - ip: {get_param: PublicVirtualIP}
502             - name: keystone_public
503               port: 5000
504               net_binds: *public_binds
505             - name: horizon
506               port: 80
507               net_binds: *public_binds
508             - name: neutron
509               port: 9696
510               net_binds: *public_binds
511             - name: cinder
512               port: 8776
513               net_binds: *public_binds
514             - name: glance_api
515               port: 9292
516               net_binds: *public_binds
517             - name: glance_registry
518               port: 9191
519               net_binds: *public_binds
520             - name: heat_api
521               port: 8004
522               net_binds: *public_binds
523             - name: heat_cloudwatch
524               port: 8003
525               net_binds: *public_binds
526             - name: heat_cfn
527               port: 8000
528               net_binds: *public_binds
529             - name: mysql
530               port: 3306
531               extra_server_params:
532                 - backup
533               options:
534                 - timeout client 0
535                 - timeout server 0
536             - name: nova_ec2
537               port: 8773
538             - name: nova_osapi
539               port: 8774
540               net_binds: *public_binds
541             - name: nova_metadata
542               port: 8775
543               net_binds: *public_binds
544             - name: ceilometer
545               port: 8777
546               net_binds: *public_binds
547             - name: swift_proxy_server
548               port: 8080
549               net_binds: *public_binds
550             - name: rabbitmq
551               port: 5672
552               options:
553                 - timeout client 0
554                 - timeout server 0
555
556   ControllerPassthroughConfig:
557     type: OS::Heat::StructuredConfig
558     properties:
559       group: os-apply-config
560       config: {get_input: passthrough_config}
561
562   ControllerPassthroughConfigSpecific:
563     type: OS::Heat::StructuredConfig
564     properties:
565       group: os-apply-config
566       config: {get_input: passthrough_config_specific}
567
568   ControllerDeployment:
569     type: OS::Heat::StructuredDeployment
570     properties:
571       signal_transport: NO_SIGNAL
572       config: {get_resource: ControllerConfig}
573       server: {get_resource: Controller}
574       input_values:
575         bootstack_nodeid: {get_attr: [Controller, name]}
576         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
577         controller_virtual_ip: {get_param: VirtualIP}
578         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
579         heat.watch_server_url:
580           list_join:
581             - ''
582             - - 'http://'
583               - {get_param: VirtualIP}
584               - ':8003'
585         heat.metadata_server_url:
586           list_join:
587             - ''
588             - - 'http://'
589               - {get_param: VirtualIP}
590               - ':8000'
591         heat.waitcondition_server_url:
592           list_join:
593             - ''
594             - - 'http://'
595               - {get_param: VirtualIP}
596               - ':8000/v1/waitcondition'
597
598   SSLConfig:
599     type: OS::Heat::StructuredConfig
600     properties:
601       group: os-apply-config
602       config:
603         ssl:
604           ca_certificate: {get_input: ssl_ca_certificate}
605         stunnel:
606           cert: {get_input: ssl_certificate}
607           key: {get_input: ssl_key}
608           cacert: {get_input: ssl_ca_certificate}
609           ports:
610            - name: 'ec2'
611              accept: 13773
612              connect: 8773
613              connect_host: {get_input: controller_host}
614            - name: 'image'
615              accept: 13292
616              connect: 9292
617              connect_host: {get_input: controller_host}
618            - name: 'identity'
619              accept: 13000
620              connect: 5000
621              connect_host: {get_input: controller_host}
622            - name: 'network'
623              accept: 13696
624              connect: 9696
625              connect_host: {get_input: controller_host}
626            - name: 'compute'
627              accept: 13774
628              connect: 8774
629              connect_host: {get_input: controller_host}
630            - name: 'swift-proxy'
631              accept: 13080
632              connect: 8080
633              connect_host: {get_input: controller_host}
634            - name: 'cinder'
635              accept: 13776
636              connect: 8776
637              connect_host: {get_input: controller_host}
638            - name: 'ceilometer'
639              accept: 13777
640              connect: 8777
641              connect_host: {get_input: controller_host}
642
643   ControllerSSLDeployment:
644     type: OS::Heat::StructuredDeployment
645     properties:
646       config: {get_resource: SSLConfig}
647       server: {get_resource: Controller}
648       signal_transport: NO_SIGNAL
649       input_values:
650         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
651         ssl_certificate: {get_param: SSLCertificate}
652         ssl_key: {get_param: SSLKey}
653         ssl_ca_certificate: {get_param: SSLCACertificate}
654
655   ControllerPassthroughDeployment:
656     type: OS::Heat::StructuredDeployment
657     properties:
658       config: {get_resource: ControllerPassthroughConfig}
659       server: {get_resource: Controller}
660       signal_transport: NO_SIGNAL
661       input_values:
662         passthrough_config: {get_param: ExtraConfig}
663
664   ControllerPassthroughSpecificDeployment:
665     depends_on: [ControllerPassthroughDeployment]
666     type: OS::Heat::StructuredDeployment
667     properties:
668       config: {get_resource: ControllerPassthroughConfigSpecific}
669       server: {get_resource: Controller}
670       signal_transport: NO_SIGNAL
671       input_values:
672         passthrough_config_specific: {get_param: ControllerExtraConfig}
673
674
675 outputs:
676   ip_address:
677     description: IP address of the server in the ctlplane network
678     value: {get_attr: [Controller, networks, ctlplane, 0]}
679   hostname:
680     description: Hostname of the server
681     value: {get_attr: [Controller, name]}
682   corosync_node:
683     description: >
684       Node object in the format {ip: ..., name: ...} format that the corosync
685       element expects
686     value:
687       ip: {get_attr: [Controller, networks, ctlplane, 0]}
688       name: {get_attr: [Controller, name]}
689   hosts_entry:
690     description: >
691       Server's IP address and hostname in the /etc/hosts format
692     value:
693       str_replace:
694         template: IP HOST HOST.novalocal CLOUDNAME
695         params:
696           IP: {get_attr: [Controller, networks, ctlplane, 0]}
697           HOST: {get_attr: [Controller, name]}
698           CLOUDNAME: {get_param: CloudName}
699   nova_server_resource:
700     description: Heat resource handle for the Nova compute server
701     value:
702       {get_resource: Controller}
703   swift_device:
704     description: Swift device formatted for swift-ring-builder
705     value:
706       str_replace:
707         template: 'r1z1-IP:%PORT%/d1'
708         params:
709           IP: {get_attr: [Controller, networks, ctlplane, 0]}
710   swift_proxy_memcache:
711     description: Swift proxy-memcache value
712     value:
713       str_replace:
714         template: "IP:11211"
715         params:
716           IP: {get_attr: [Controller, networks, ctlplane, 0]}