Merge "Fix overcloud controller scaling"
[apex-tripleo-heat-templates.git] / overcloud-source.yaml
1 description: Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
2   server,Dedicated RabbitMQ Server,Group of Nova Computes
3 heat_template_version: 2014-10-16
4 parameters:
5   AdminPassword:
6     default: unset
7     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
8     type: string
9     hidden: true
10   AdminToken:
11     default: unset
12     description: The keystone auth secret.
13     type: string
14     hidden: true
15   CinderPassword:
16     default: unset
17     description: The password for the cinder service account, used by cinder-api.
18     type: string
19     hidden: true
20   CinderISCSIHelper:
21     default: tgtadm
22     description: The iSCSI helper to use with cinder.
23     type: string
24   CinderLVMLoopDeviceSize:
25     default: 5000
26     description: The size of the loopback file used by the cinder LVM driver.
27     type: number
28   ExtraConfig:
29     default: {}
30     description: |
31       Additional configuration to inject into the cluster. The JSON should have
32       the following structure:
33         {"FILEKEY":
34           {"config":
35             [{"section": "SECTIONNAME",
36               "values":
37                 [{"option": "OPTIONNAME",
38                   "value": "VALUENAME"
39                  }
40                 ]
41              }
42             ]
43           }
44         }
45       For instance:
46         {"nova":
47           {"config":
48             [{"section": "default",
49               "values":
50                 [{"option": "compute_manager",
51                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
52                  }
53                 ]
54              },
55              {"section": "cells",
56               "values":
57                 [{"option": "driver",
58                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
59                  }
60                 ]
61              }
62             ]
63           }
64         }
65     type: json
66   OvercloudControlFlavor:
67     default: baremetal
68     description: Flavor for control nodes to request when deploying.
69     type: string
70   OvercloudComputeFlavor:
71     default: baremetal
72     description: Flavor for compute nodes to request when deploying.
73     type: string
74   GlancePort:
75     default: 9292
76     description: Glance port.
77     type: string
78   GlanceProtocol:
79     default: http
80     description: Protocol to use when connecting to glance, set to https for SSL.
81     type: string
82   GlancePassword:
83     default: unset
84     description: The password for the glance service account, used by the glance services.
85     type: string
86     hidden: true
87   GlanceNotifierStrategy:
88     description: Strategy to use for Glance notification queue
89     type: string
90     default: noop
91   GlanceLogFile:
92     description: The filepath of the file to use for logging messages from Glance.
93     type: string
94     default: ''
95   HeatPassword:
96     default: unset
97     description: The password for the Heat service account, used by the Heat services.
98     type: string
99     hidden: true
100   ImageUpdatePolicy:
101     default: 'REBUILD_PRESERVE_EPHEMERAL'
102     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
103     type: string
104   KeyName:
105     default: default
106     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
107     type: string
108   NeutronBridgeMappings:
109     description: The OVS logical->physical bridge mappings to use.
110     type: string
111     default: ''
112   NeutronPassword:
113     default: unset
114     description: The password for the neutron service account, used by neutron agents.
115     type: string
116     hidden: true
117   CeilometerComputeAgent:
118     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
119     type: string
120     default: ''
121     constraints:
122     - allowed_values: ['', Present]
123   CeilometerMeteringSecret:
124     default: unset
125     description: Secret shared by the ceilometer services.
126     type: string
127     hidden: true
128   CeilometerPassword:
129     default: unset
130     description: The password for the ceilometer service account.
131     type: string
132     hidden: true
133   SnmpdReadonlyUserName:
134     default: ro_snmp_user
135     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
136     type: string
137   SnmpdReadonlyUserPassword:
138     default: unset
139     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
140     type: string
141     hidden: true
142   CloudName:
143     default: ''
144     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
145     type: string
146   NovaComputeDriver:
147     default: libvirt.LibvirtDriver
148     type: string
149   NovaComputeLibvirtType:
150     default: ''
151     type: string
152   NovaImage:
153     type: string
154     default: overcloud-compute
155   NovaPassword:
156     default: unset
157     description: The password for the nova service account, used by nova-api.
158     type: string
159     hidden: true
160   NeutronFlatNetworks:
161     type: string
162     default: ''
163     description: If set, flat networks to configure in neutron plugins.
164   HypervisorNeutronPhysicalBridge:
165     default: ''
166     description: An OVS bridge to create on each hypervisor.
167     type: string
168   HypervisorNeutronPublicInterface:
169     default: ''
170     description: What interface to add to the HypervisorNeutronPhysicalBridge.
171     type: string
172   NeutronPublicInterface:
173     default: eth0
174     description: What interface to bridge onto br-ex for network nodes.
175     type: string
176   NeutronPublicInterfaceDefaultRoute:
177     default: ''
178     description: A custom default route for the NeutronPublicInterface.
179     type: string
180   NeutronPublicInterfaceIP:
181     default: ''
182     description: A custom IP address to put onto the NeutronPublicInterface.
183     type: string
184   NeutronPublicInterfaceRawDevice:
185     default: ''
186     description: If set, the public interface is a vlan with this device as the raw device.
187     type: string
188   NeutronControlPlaneID:
189     default: ''
190     type: string
191     description: Neutron ID for ctlplane network.
192   NeutronDnsmasqOptions:
193     default: 'dhcp-option-force=26,1400'
194     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.
195     type: string
196   controllerImage:
197     type: string
198     default: overcloud-control
199   NtpServer:
200     type: string
201     default: ''
202   RabbitUserName:
203     default: guest
204     description: The username for RabbitMQ
205     type: string
206   RabbitPassword:
207     default: guest
208     description: The password for RabbitMQ
209     type: string
210     hidden: true
211   RabbitCookieSalt:
212     type: string
213     default: unset
214     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
215   HeatStackDomainAdminPassword:
216     description: Password for heat_domain_admin user.
217     type: string
218     default: ''
219     hidden: true
220   LiveUpdateUserName:
221     type: string
222     description: The live-update username for the undercloud Glance API.
223     default: ''
224   LiveUpdateTenantName:
225     type: string
226     description: The live-update tenant name for the undercloud Glance API.
227     default: ''
228   LiveUpdateHost:
229     type: string
230     description: The IP address for the undercloud Glance API.
231     default: ''
232   LiveUpdatePassword:
233     type: string
234     default: ''
235     description: The live-update password for the undercloud Glance API.
236     hidden: true
237   LiveUpdateComputeImage:
238     type: string
239     description: The image ID for live-updates to the overcloud compute nodes.
240     default: ''
241   MysqlInnodbBufferPoolSize:
242     description: >
243         Specifies the size of the buffer pool in megabytes. Setting to
244         zero should be interpreted as "no value" and will defer to the
245         lower level default.
246     type: number
247     default: 0
248   ControlVirtualInterface:
249     default: 'br-ex'
250     description: Interface where virtual ip will be assigned.
251     type: string
252   ControlFixedIPs:
253     default: []
254     description: Should be used for arbitrary ips.
255     type: json
256   PublicVirtualFixedIPs:
257     default: []
258     description: |
259         Control the IP allocation for the PublicVirtualInterface port. E.g.
260         [{'ip_address':'1.2.3.4'}]
261     type: json
262   PublicVirtualInterface:
263     default: 'br-ex'
264     description: >
265         Specifies the interface where the public-facing virtual ip will be assigned.
266         This should be int_public when a VLAN is being used.
267     type: string
268   PublicVirtualNetwork:
269     default: 'ctlplane'
270     type: string
271     description: >
272         Neutron network to allocate public virtual IP port on.
273   KeystoneCACertificate:
274     default: ''
275     description: Keystone self-signed certificate authority certificate.
276     type: string
277   KeystoneSigningCertificate:
278     default: ''
279     description: Keystone certificate for verifying token validity.
280     type: string
281   KeystoneSigningKey:
282     default: ''
283     description: Keystone key for signing tokens.
284     type: string
285     hidden: true
286 resources:
287   ControlVirtualIP:
288     type: OS::Neutron::Port
289     properties:
290       name: control_virtual_ip
291       network_id: {get_param: NeutronControlPlaneID}
292       fixed_ips:
293         get_param: ControlFixedIPs
294   MysqlClusterUniquePart:
295     type: OS::Heat::RandomString
296     properties:
297       length: 10
298   PublicVirtualIP:
299     type: OS::Neutron::Port
300     properties:
301       name: public_virtual_ip
302       network: {get_param: PublicVirtualNetwork}
303       fixed_ips:
304         get_param: PublicVirtualFixedIPs
305   RabbitCookie:
306     type: OS::Heat::RandomString
307     properties:
308       length: 20
309       salt:
310         get_param: RabbitCookieSalt
311   NovaCompute0Deploy:
312     type: FileInclude
313     Path: nova-compute-instance.yaml
314     SubKey: resources.NovaCompute0Deploy
315     parameters:
316         NovaApiHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
317         KeystoneHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
318         NeutronHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
319         GlanceHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
320         NovaDSN: {list_join: ['', ['mysql://nova:unset@', {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}, '/nova']]}
321         CeilometerDSN: {list_join: ['', ['mysql://ceilometer:unset@', {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}, '/ceilometer']]}
322         NeutronDSN: {list_join: ['', ['mysql://neutron:unset@', {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}, '/ovs_neutron']]}
323         NeutronNetworkType: "gre"
324         NeutronEnableTunnelling: "True"
325         NeutronFlatNetworks:
326             get_param: NeutronFlatNetworks
327         NeutronNetworkVLANRanges: ""
328         NeutronPhysicalBridge:
329             get_param: HypervisorNeutronPhysicalBridge
330         NeutronPublicInterface:
331             get_param: HypervisorNeutronPublicInterface
332         NeutronBridgeMappings:
333             get_param: NeutronBridgeMappings
334   NovaCompute0AllNodes:
335     type: FileInclude
336     Path: nova-compute-instance.yaml
337     SubKey: resources.NovaCompute0AllNodesDeploy
338     parameters:
339         AllNodesConfig: {get_resource: allNodesConfig}
340   NovaCompute0Passthrough:
341     type: FileInclude
342     Path: nova-compute-instance.yaml
343     SubKey: resources.NovaCompute0Passthrough
344     parameters:
345         passthrough_config: {get_param: ExtraConfig}
346   NovaCompute0:
347     type: FileInclude
348     Path: nova-compute-instance.yaml
349     SubKey: resources.NovaCompute0
350   controllerConfig:
351     type: OS::Heat::StructuredConfig
352     properties:
353       group: os-apply-config
354       config:
355         admin-password:
356           get_param: AdminPassword
357         admin-token:
358           get_param: AdminToken
359         bootstack:
360           public_interface_ip:
361             get_param: NeutronPublicInterfaceIP
362         bootstrap_host:
363           bootstrap_nodeid:
364             Fn::Select:
365             - 0
366             - Fn::Select:
367               - 0
368               - Merge::Map:
369                   controller0:
370                   - Fn::Select:
371                     - name
372                     - get_attr:
373                       - controller0
374                       - show
375           nodeid: {get_input: bootstack_nodeid}
376         cinder:
377           db: mysql://cinder:unset@localhost/cinder
378           volume_size_mb:
379             get_param: CinderLVMLoopDeviceSize
380           service-password:
381             get_param: CinderPassword
382           iscsi-helper:
383             get_param: CinderISCSIHelper
384         controller-address:
385           get_input: controller_host
386         corosync:
387           bindnetaddr: {get_input: controller_host}
388           mcastport: 5577
389           nodes:
390             Merge::Map:
391               controller0:
392                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
393         pacemaker:
394           stonith_enabled : false
395           recheck_interval : 5
396           quorum_policy : ignore
397         db-password: unset
398         glance:
399           registry:
400             host: {get_input: controller_virtual_ip}
401           backend: swift
402           db: mysql://glance:unset@localhost/glance
403           host:
404             get_input: controller_virtual_ip
405           port:
406             get_param: GlancePort
407           protocol:
408             get_param: GlanceProtocol
409           service-password:
410             get_param: GlancePassword
411           swift-store-user: service:glance
412           swift-store-key:
413             get_param: GlancePassword
414           notifier-strategy:
415             get_param: GlanceNotifierStrategy
416           log-file:
417             get_param: GlanceLogFile
418         heat:
419           admin_password:
420             get_param: HeatPassword
421           admin_tenant_name: service
422           admin_user: heat
423           auth_encryption_key: unset___________
424           db: mysql://heat:unset@localhost/heat
425           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
426           watch_server_url: {get_input: heat.watch_server_url}
427           metadata_server_url: {get_input: heat.metadata_server_url}
428           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
429         horizon:
430           caches:
431             memcached:
432               nodes:
433                 Merge::Map:
434                   controller0:
435                     {get_attr: [controller0, show, name]}
436         keystone:
437           db: mysql://keystone:unset@localhost/keystone
438           host:
439             get_input: controller_virtual_ip
440           ca_certificate: {get_param: KeystoneCACertificate}
441           signing_key: {get_param: KeystoneSigningKey}
442           signing_certificate: {get_param: KeystoneSigningCertificate}
443         mysql:
444           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
445           nodes:
446             Merge::Map:
447               controller0:
448                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
449           cluster_name:
450             list_join:
451               - '-'
452               - - 'tripleo'
453                 - {get_resource: MysqlClusterUniquePart}
454         neutron:
455           flat-networks: {get_param: NeutronFlatNetworks}
456           host: {get_input: controller_virtual_ip}
457           metadata_proxy_shared_secret: unset
458           ovs:
459             enable_tunneling: 'True'
460             local_ip:
461               get_input: controller_host
462             bridge_mappings: {get_param: NeutronBridgeMappings}
463             public_interface:
464               get_param: NeutronPublicInterface
465             public_interface_raw_device:
466               get_param: NeutronPublicInterfaceRawDevice
467             public_interface_route:
468               get_param: NeutronPublicInterfaceDefaultRoute
469             physical_bridge: br-ex
470             tenant_network_type: gre
471           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
472           service-password:
473             get_param: NeutronPassword
474           dnsmasq-options:
475             get_param: NeutronDnsmasqOptions
476         ceilometer:
477           db: mysql://ceilometer:unset@localhost/ceilometer
478           metering_secret: {get_param: CeilometerMeteringSecret}
479           service-password:
480             get_param: CeilometerPassword
481         snmpd:
482           export_MIB: UCD-SNMP-MIB
483           readonly_user_name:
484             get_param: SnmpdReadonlyUserName
485           readonly_user_password:
486             get_param: SnmpdReadonlyUserPassword
487         nova:
488           compute_driver: libvirt.LibvirtDriver
489           db: mysql://nova:unset@localhost/nova
490           default_floating_pool:
491             ext-net
492           host: {get_input: controller_virtual_ip}
493           metadata-proxy: true
494           service-password:
495             get_param: NovaPassword
496         rabbit:
497           username:
498             get_param: RabbitUserName
499           password:
500             get_param: RabbitPassword
501           cookie:
502             get_attr:
503             - RabbitCookie
504             - value
505         ntp:
506           servers:
507               - {server: {get_param: NtpServer}, fudge: "stratum 0"}
508         virtual_interfaces:
509           instances:
510             - vrrp_instance_name: VI_CONTROL
511               virtual_router_id: 51
512               keepalive_interface:
513                 get_param: ControlVirtualInterface
514               priority: 101
515               virtual_ips:
516               - ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
517                 interface:
518                   get_param: ControlVirtualInterface
519             - vrrp_instance_name: VI_PUBLIC
520               virtual_router_id: 52
521               keepalive_interface:
522                 get_param: PublicVirtualInterface
523               priority: 101
524               virtual_ips:
525               - ip: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
526                 interface:
527                   get_param: PublicVirtualInterface
528           vrrp_sync_groups:
529             - name: VG1
530               members:
531                 - VI_CONTROL
532                 - VI_PUBLIC
533         keepalived:
534           keepalive_interface:
535             get_param: PublicVirtualInterface
536           priority: 101
537         virtual_ips:
538             -
539               ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
540               interface:
541                 get_param: ControlVirtualInterface
542             -
543               ip: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
544               interface:
545                 get_param: PublicVirtualInterface
546         haproxy:
547           nodes:
548             Merge::Map:
549               controller0:
550                 ip: {get_attr: [controller0, networks, ctlplane, 0]}
551                 name: {get_attr: [controller0, show, name]}
552           net_binds:
553             - ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
554           services:
555             - name: keystone_admin
556               port: 35357
557               net_binds: &public_binds
558                 - ip: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
559                 - ip: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
560             - name: keystone_public
561               port: 5000
562               net_binds: *public_binds
563             - name: horizon
564               port: 80
565               net_binds: *public_binds
566             - name: neutron
567               port: 9696
568               net_binds: *public_binds
569             - name: cinder
570               port: 8776
571               net_binds: *public_binds
572             - name: glance_api
573               port: 9292
574               net_binds: *public_binds
575             - name: glance_registry
576               port: 9191
577               net_binds: *public_binds
578             - name: heat_api
579               port: 8004
580               net_binds: *public_binds
581             - name: heat_cloudwatch
582               port: 8003
583               net_binds: *public_binds
584             - name: heat_cfn
585               port: 8000
586               net_binds: *public_binds
587             - name: nova_ec2
588               port: 8773
589             - name: nova_osapi
590               port: 8774
591               net_binds: *public_binds
592             - name: nova_metadata
593               port: 8775
594               net_binds: *public_binds
595             - name: ceilometer
596               port: 8777
597               net_binds: *public_binds
598             - name: swift_proxy_server
599               port: 8080
600               net_binds: *public_binds
601   controllerPassthrough:
602     type: OS::Heat::StructuredConfig
603     properties:
604       group: os-apply-config
605       config: {get_input: passthrough_config}
606   controller0:
607     type: OS::Nova::Server
608     properties:
609       image:
610         get_param: controllerImage
611       image_update_policy:
612         get_param: ImageUpdatePolicy
613       flavor:
614         get_param: OvercloudControlFlavor
615       key_name:
616         get_param: KeyName
617       networks:
618         - network: ctlplane
619       user_data_format: SOFTWARE_CONFIG
620   controller0AllNodes:
621     depends_on: [controller0Deployment,controller0SSLDeployment,controller0Swift,controller0Passthrough]
622     type: OS::Heat::StructuredDeployment
623     properties:
624       config: {get_resource: allNodesConfig}
625       server: {get_resource: controller0}
626   controller0Deployment:
627     type: OS::Heat::StructuredDeployment
628     properties:
629       signal_transport: NO_SIGNAL
630       config: {get_resource: controllerConfig}
631       server: {get_resource: controller0}
632       input_values:
633         bootstack_nodeid: {get_attr: [controller0, show, name]}
634         controller_host: {get_attr: [controller0, networks, ctlplane, 0]}
635         controller_virtual_ip:
636           {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
637         heat.watch_server_url:
638           list_join:
639             - ''
640             - - 'http://'
641               - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
642               - ':8003'
643         heat.metadata_server_url:
644           list_join:
645             - ''
646             - - 'http://'
647               - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
648               - ':8000'
649         heat.waitcondition_server_url:
650           list_join:
651             - ''
652             - - 'http://'
653               - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
654               - ':8000/v1/waitcondition'
655   allNodesConfig:
656     type: OS::Heat::StructuredConfig
657     properties:
658       config:
659         completion-signal: {get_input: deploy_signal_id}
660         hosts:
661           list_join:
662           - "\n"
663           - - list_join:
664               - "\n"
665               - Merge::Map:
666                   NovaCompute0:
667                     list_join:
668                     - ' '
669                     - - {get_attr: [NovaCompute0, networks, ctlplane, 0]}
670                       - {get_attr: [NovaCompute0, show, name]}
671                       - list_join:
672                         - '.'
673                         - - {get_attr: [NovaCompute0, show, name]}
674                           - 'novalocal'
675             - list_join:
676               - "\n"
677               - Merge::Map:
678                   controller0:
679                     list_join:
680                     - ' '
681                     - - {get_attr: [controller0, networks, ctlplane, 0]}
682                       - {get_attr: [controller0, show, name]}
683                       - list_join:
684                         - '.'
685                         - - {get_attr: [controller0, show, name]}
686                           - 'novalocal'
687                       - {get_param: CloudName}
688         rabbit:
689           nodes:
690             list_join:
691               - ','
692               - Merge::Map:
693                   controller0:
694                     {get_attr: [controller0, show, name]}
695   controller0SSLDeployment:
696     type: OS::Heat::StructuredDeployment
697     properties:
698       config: {get_resource: SSLConfig}
699       server: {get_resource: controller0}
700       signal_transport: NO_SIGNAL
701       input_values:
702         controller_host: {get_attr: [controller0, networks, ctlplane, 0]}
703         ssl_certificate: {get_param: SSLCertificate}
704         ssl_key: {get_param: SSLKey}
705         ssl_ca_certificate: {get_param: SSLCACertificate}
706   controller0Passthrough:
707     type: OS::Heat::StructuredDeployment
708     properties:
709       config: {get_resource: controllerPassthrough}
710       server: {get_resource: controller0}
711       signal_transport: NO_SIGNAL
712       input_values:
713         passthrough_config: {get_param: ExtraConfig}
714 outputs:
715   KeystoneURL:
716     description: URL for the Overcloud Keystone service
717     value:
718       list_join:
719       - ''
720       - - http://
721         - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
722         - :5000/v2.0/