Merge "add Horizon caches backend definition (memcached)"
[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 HeatTemplateFormatVersion: '2012-12-12'
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     NoEcho: true
10   AdminToken:
11     Default: unset
12     Description: The keystone auth secret.
13     Type: String
14     NoEcho: true
15   CinderPassword:
16     Default: unset
17     Description: The password for the cinder service account, used by cinder-api.
18     Type: String
19     NoEcho: 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     NoEcho: 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     NoEcho: 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     NoEcho: 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     AllowedValues: ['', Present]
122   CeilometerMeteringSecret:
123     Default: unset
124     Description: Secret shared by the ceilometer services.
125     Type: String
126     NoEcho: true
127   CeilometerPassword:
128     Default: unset
129     Description: The password for the ceilometer service account.
130     Type: String
131     NoEcho: true
132   SnmpdReadonlyUserName:
133     Default: ro_snmp_user
134     Description: The user name for SNMPd with readonly rights running on all Overcloud nodes
135     Type: String
136   SnmpdReadonlyUserPassword:
137     Default: unset
138     Description: The user password for SNMPd with readonly rights running on all Overcloud nodes
139     Type: String
140     NoEcho: true
141   CloudName:
142     Default: ''
143     Description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
144     Type: String
145   NovaComputeDriver:
146     Default: libvirt.LibvirtDriver
147     Type: String
148   NovaComputeLibvirtType:
149     Default: ''
150     Type: String
151   NovaImage:
152     Type: String
153     Default: overcloud-compute
154   NovaPassword:
155     Default: unset
156     Description: The password for the nova service account, used by nova-api.
157     Type: String
158     NoEcho: true
159   NeutronFlatNetworks:
160     Type: String
161     Default: ''
162     Description: If set, flat networks to configure in neutron plugins.
163   HypervisorNeutronPhysicalBridge:
164     Default: ''
165     Description: An OVS bridge to create on each hypervisor.
166     Type: String
167   HypervisorNeutronPublicInterface:
168     Default: ''
169     Description: What interface to add to the HypervisorNeutronPhysicalBridge.
170     Type: String
171   NeutronPublicInterface:
172     Default: eth0
173     Description: What interface to bridge onto br-ex for network nodes.
174     Type: String
175   NeutronPublicInterfaceDefaultRoute:
176     Default: ''
177     Description: A custom default route for the NeutronPublicInterface.
178     Type: String
179   NeutronPublicInterfaceIP:
180     Default: ''
181     Description: A custom IP address to put onto the NeutronPublicInterface.
182     Type: String
183   NeutronPublicInterfaceRawDevice:
184     Default: ''
185     Description: If set, the public interface is a vlan with this device as the raw device.
186     Type: String
187   NeutronControlPlaneID:
188     Default: ''
189     Type: String
190     Description: Neutron ID for ctlplane network.
191   NeutronDnsmasqOptions:
192     Default: 'dhcp-option-force=26,1400'
193     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.
194     Type: String
195   controllerImage:
196     Type: String
197     Default: overcloud-control
198   NtpServer:
199     Type: String
200     Default: ''
201   RabbitUserName:
202     Default: guest
203     Description: The username for RabbitMQ
204     Type: String
205   RabbitPassword:
206     Default: guest
207     Description: The password for RabbitMQ
208     Type: String
209     NoEcho: true
210   RabbitCookieSalt:
211     Type: String
212     Default: unset
213     Description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
214   HeatStackDomainAdminPassword:
215     Description: Password for heat_domain_admin user.
216     Type: String
217     Default: ''
218     NoEcho: true
219   LiveUpdateUserName:
220     Type: String
221     Description: The live-update username for the undercloud Glance API.
222     Default: ''
223   LiveUpdateTenantName:
224     Type: String
225     Description: The live-update tenant name for the undercloud Glance API.
226     Default: ''
227   LiveUpdateHost:
228     Type: String
229     Description: The IP address for the undercloud Glance API.
230     Default: ''
231   LiveUpdatePassword:
232     Type: String
233     Default: ''
234     Description: The live-update password for the undercloud Glance API.
235     NoEcho: true
236   LiveUpdateComputeImage:
237     Type: String
238     Description: The image ID for live-updates to the overcloud compute nodes.
239     Default: ''
240   MysqlInnodbBufferPoolSize:
241     Description: >
242         Specifies the size of the buffer pool in megabytes. Setting to
243         zero should be interpreted as "no value" and will defer to the
244         lower level default.
245     Type: Number
246     Default: 0
247   ControlVirtualInterface:
248     Default: 'br-ex'
249     Description: Interface where virtual ip will be assigned.
250     Type: String
251   ControlFixedIPs:
252     Default: []
253     Description: Should be used for arbitrary ips.
254     Type: Json
255   KeystoneCACertificate:
256     Default: ''
257     Description: Keystone self-signed certificate authority certificate.
258     Type: String
259   KeystoneSigningCertificate:
260     Default: ''
261     Description: Keystone certificate for verifying token validity.
262     Type: String
263   KeystoneSigningKey:
264     Default: ''
265     Description: Keystone key for signing tokens.
266     Type: String
267     NoEcho: true
268 Resources:
269   ControlVirtualIP:
270     Type: OS::Neutron::Port
271     Properties:
272       name: control_virtual_ip
273       network_id: {Ref: NeutronControlPlaneID}
274       fixed_ips:
275         Ref: ControlFixedIPs
276   MysqlClusterUniquePart:
277     Type: OS::Heat::RandomString
278     Properties:
279       length: 10
280   RabbitCookie:
281     Type: OS::Heat::RandomString
282     Properties:
283       length: 20
284       salt:
285         Ref: RabbitCookieSalt
286   NovaCompute0Config:
287     Type: FileInclude
288     Path: nova-compute-instance.yaml
289     SubKey: Resources.NovaCompute0Deploy
290     Parameters:
291         NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
292         KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
293         NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
294         GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
295         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]}
296         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ceilometer']]}
297         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ovs_neutron']]}
298         NeutronNetworkType: "gre"
299         NeutronEnableTunnelling: "True"
300         NeutronFlatNetworks:
301             Ref: NeutronFlatNetworks
302         NeutronNetworkVLANRanges: ""
303         NeutronPhysicalBridge:
304             Ref: HypervisorNeutronPhysicalBridge
305         NeutronPublicInterface:
306             Ref: HypervisorNeutronPublicInterface
307         NeutronBridgeMappings:
308             Ref: NeutronBridgeMappings
309   NovaCompute0AllNodes:
310     Type: FileInclude
311     Path: nova-compute-instance.yaml
312     SubKey: Resources.NovaCompute0AllNodesDeploy
313     Parameters:
314         AllNodesConfig: {Ref: allNodesConfig}
315   NovaCompute0Passthrough:
316     Type: OS::Heat::StructuredDeployment
317     Properties:
318       config: {Ref: NovaComputePassthrough}
319       server: {Ref: NovaCompute0}
320       signal_transport: NO_SIGNAL
321       input_values:
322         passthrough_config: {Ref: ExtraConfig}
323   NovaCompute0:
324     Type: FileInclude
325     Path: nova-compute-instance.yaml
326     SubKey: Resources.NovaCompute0
327   controllerConfig:
328     Type: OS::Heat::StructuredConfig
329     Properties:
330       group: os-apply-config
331       config:
332         admin-password:
333           Ref: AdminPassword
334         admin-token:
335           Ref: AdminToken
336         bootstack:
337           public_interface_ip:
338             Ref: NeutronPublicInterfaceIP
339         bootstrap_host:
340           bootstrap_nodeid:
341             Fn::Select:
342             - 0
343             - Fn::Select:
344               - 0
345               - Merge::Map:
346                   controller0:
347                   - Fn::Select:
348                     - name
349                     - Fn::GetAtt:
350                       - controller0
351                       - show
352           nodeid: {get_input: bootstack_nodeid}
353         cinder:
354           db: mysql://cinder:unset@localhost/cinder
355           volume_size_mb:
356             Ref: CinderLVMLoopDeviceSize
357           service-password:
358             Ref: CinderPassword
359           iscsi-helper:
360             Ref: CinderISCSIHelper
361         controller-address:
362           get_input: controller_host
363         db-password: unset
364         glance:
365           registry:
366             host: {get_input: controller_virtual_ip}
367           backend: swift
368           db: mysql://glance:unset@localhost/glance
369           host:
370             get_input: controller_host
371           port:
372             Ref: GlancePort
373           protocol:
374             Ref: GlanceProtocol
375           service-password:
376             Ref: GlancePassword
377           swift-store-user: service:glance
378           swift-store-key:
379             Ref: GlancePassword
380           notifier-strategy:
381             Ref: GlanceNotifierStrategy
382           log-file:
383             Ref: GlanceLogFile
384         heat:
385           admin_password:
386             Ref: HeatPassword
387           admin_tenant_name: service
388           admin_user: heat
389           auth_encryption_key: unset___________
390           db: mysql://heat:unset@localhost/heat
391           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
392           watch_server_url: {get_input: heat.watch_server_url}
393           metadata_server_url: {get_input: heat.metadata_server_url}
394           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
395         horizon:
396           caches:
397             memcached:
398               nodes:
399                 Merge::Map:
400                   controller0:
401                     {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
402         keystone:
403           db: mysql://keystone:unset@localhost/keystone
404           host:
405             get_input: controller_host
406           ca_certificate: {Ref: KeystoneCACertificate}
407           signing_key: {Ref: KeystoneSigningKey}
408           signing_certificate: {Ref: KeystoneSigningCertificate}
409         mysql:
410           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
411           nodes:
412             Merge::Map:
413               controller0:
414                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
415           cluster_name:
416             Fn::Join:
417               - '-'
418               - - 'tripleo'
419                 - {Ref: MysqlClusterUniquePart}
420         neutron:
421           flat-networks: {Ref: NeutronFlatNetworks}
422           host: {get_input: controller_virtual_ip}
423           metadata_proxy_shared_secret: unset
424           ovs:
425             enable_tunneling: 'True'
426             local_ip:
427               get_input: controller_host
428             bridge_mappings: {Ref: NeutronBridgeMappings}
429             public_interface:
430               Ref: NeutronPublicInterface
431             public_interface_raw_device:
432               Ref: NeutronPublicInterfaceRawDevice
433             public_interface_route:
434               Ref: NeutronPublicInterfaceDefaultRoute
435             physical_bridge: br-ex
436             tenant_network_type: gre
437           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
438           service-password:
439             Ref: NeutronPassword
440           dnsmasq-options:
441             Ref: NeutronDnsmasqOptions
442         ceilometer:
443           db: mysql://ceilometer:unset@localhost/ceilometer
444           metering_secret: {Ref: CeilometerMeteringSecret}
445           service-password:
446             Ref: CeilometerPassword
447         snmpd:
448           export_MIB: UCD-SNMP-MIB
449           readonly_user_name:
450             Ref: SnmpdReadonlyUserName
451           readonly_user_password:
452             Ref: SnmpdReadonlyUserPassword
453         nova:
454           compute_driver: libvirt.LibvirtDriver
455           db: mysql://nova:unset@localhost/nova
456           default_floating_pool:
457             ext-net
458           host: {get_input: controller_virtual_ip}
459           metadata-proxy: true
460           service-password:
461             Ref: NovaPassword
462         rabbit:
463           username:
464             Ref: RabbitUserName
465           password:
466             Ref: RabbitPassword
467           cookie:
468             Fn::GetAtt:
469             - RabbitCookie
470             - value
471         ntp:
472           servers:
473               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
474         keepalived:
475           keepalive_interface:
476             Ref: NeutronPublicInterface
477           priority: 101
478         virtual_ips:
479             -
480               ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
481               interface:
482                 Ref: ControlVirtualInterface
483         haproxy:
484           nodes:
485             Merge::Map:
486               controller0:
487                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
488                 name: {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
489           net_binds:
490             - ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
491           services:
492             - name: keystone_admin
493               port: 35357
494             - name: keystone_public
495               port: 5000
496             - name: horizon
497               port: 80
498             - name: neutron
499               port: 9696
500             - name: cinder
501               port: 8776
502             - name: glance_api
503               port: 9292
504             - name: glance_registry
505               port: 9191
506             - name: heat_api
507               port: 8004
508             - name: heat_cloudwatch
509               port: 8003
510             - name: heat_cfn
511               port: 8000
512             - name: nova_ec2
513               port: 8773
514             - name: nova_osapi
515               port: 8774
516             - name: nova_metadata
517               port: 8775
518             - name: ceilometer
519               port: 8777
520             - name: swift_proxy_server
521               port: 8080
522   controllerPassthrough:
523     Type: OS::Heat::StructuredConfig
524     Properties:
525       group: os-apply-config
526       config: {get_input: passthrough_config}
527   controller0:
528     Type: OS::Nova::Server
529     Properties:
530       image:
531         Ref: controllerImage
532       image_update_policy:
533         Ref: ImageUpdatePolicy
534       flavor:
535         Ref: OvercloudControlFlavor
536       key_name:
537         Ref: KeyName
538       networks:
539         - network: ctlplane
540       user_data_format: SOFTWARE_CONFIG
541   controller0AllNodesConfig:
542     Type: OS::Heat::StructuredDeployment
543     Properties:
544       config: {Ref: allNodesConfig}
545       server: {Ref: controller0}
546   controller0Deployment:
547     Type: OS::Heat::StructuredDeployment
548     Properties:
549       signal_transport: NO_SIGNAL
550       config: {Ref: controllerConfig}
551       server: {Ref: controller0}
552       input_values:
553         bootstack_nodeid:
554           Fn::Select:
555           - name
556           - Fn::GetAtt:
557             - controller0
558             - show
559         controller_host:
560           Fn::Select:
561             - 0
562             - Fn::Select:
563               - ctlplane
564               - Fn::GetAtt:
565                 - controller0
566                 - networks
567         controller_virtual_ip:
568           {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
569         heat.watch_server_url:
570           Fn::Join:
571             - ''
572             - - 'http://'
573               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
574               - ':8003'
575         heat.metadata_server_url:
576           Fn::Join:
577             - ''
578             - - 'http://'
579               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
580               - ':8000'
581         heat.waitcondition_server_url:
582           Fn::Join:
583             - ''
584             - - 'http://'
585               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
586               - ':8000/v1/waitcondition'
587   allNodesConfig:
588     Type: OS::Heat::StructuredConfig
589     Properties:
590       config:
591         completion-signal: {get_input: deploy_signal_id}
592         hosts:
593           Fn::Join:
594           - "\n"
595           - - Fn::Join:
596               - "\n"
597               - Merge::Map:
598                   NovaCompute0:
599                     Fn::Join:
600                     - ' '
601                     - - Fn::Select:
602                         - 0
603                         - Fn::Select:
604                           - ctlplane
605                           - Fn::GetAtt:
606                             - NovaCompute0
607                             - networks
608                       - Fn::Select:
609                         - name
610                         - Fn::GetAtt:
611                           - NovaCompute0
612                           - show
613                       - Fn::Join:
614                         - '.'
615                         - - Fn::Select:
616                             - name
617                             - Fn::GetAtt:
618                               - NovaCompute0
619                               - show
620                           - 'novalocal'
621             - Fn::Join:
622               - "\n"
623               - Merge::Map:
624                   controller0:
625                     Fn::Join:
626                     - ' '
627                     - - Fn::Select:
628                         - 0
629                         - Fn::Select:
630                           - ctlplane
631                           - Fn::GetAtt:
632                             - controller0
633                             - networks
634                       - Fn::Select:
635                         - name
636                         - Fn::GetAtt:
637                           - controller0
638                           - show
639                       - Fn::Join:
640                         - '.'
641                         - - Fn::Select:
642                             - name
643                             - Fn::GetAtt:
644                               - controller0
645                               - show
646                           - 'novalocal'
647                       - {Ref: CloudName}
648         rabbit:
649           nodes:
650             Fn::Join:
651               - ','
652               - Merge::Map:
653                   controller0:
654                     {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
655   controller0SSLDeployment:
656     Type: OS::Heat::StructuredDeployment
657     Properties:
658       config: {Ref: SSLConfig}
659       server: {Ref: controller0}
660       signal_transport: NO_SIGNAL
661       input_values:
662         ssl_certificate: {Ref: SSLCertificate}
663         ssl_key: {Ref: SSLKey}
664         ssl_ca_certificate: {Ref: SSLCACertificate}
665   controller0Passthrough:
666     Type: OS::Heat::StructuredDeployment
667     Properties:
668       config: {Ref: controllerPassthrough}
669       server: {Ref: controller0}
670       signal_transport: NO_SIGNAL
671       input_values:
672         passthrough_config: {Ref: ExtraConfig}
673 Outputs:
674   KeystoneURL:
675     Description: URL for the Overcloud Keystone service
676     Value:
677       Fn::Join:
678       - ''
679       - - http://
680         - Fn::Select:
681           - ip_address
682           - Fn::Select:
683             - 0
684             - Fn::GetAtt:
685               - ControlVirtualIP
686               - fixed_ips
687         - :5000/v2.0/