a8fcb9a34084db151609d676b0b11ce6c6bebe2c
[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         corosync:
364           bindnetaddr: {get_input: controller_host}
365           mcastport: 5577
366           nodes:
367             Merge::Map:
368               controller0:
369                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
370         pacemaker:
371           stonith_enabled : false
372           recheck_interval : 5
373           quorum_policy : ignore
374         db-password: unset
375         glance:
376           registry:
377             host: {get_input: controller_virtual_ip}
378           backend: swift
379           db: mysql://glance:unset@localhost/glance
380           host:
381             get_input: controller_virtual_ip
382           port:
383             Ref: GlancePort
384           protocol:
385             Ref: GlanceProtocol
386           service-password:
387             Ref: GlancePassword
388           swift-store-user: service:glance
389           swift-store-key:
390             Ref: GlancePassword
391           notifier-strategy:
392             Ref: GlanceNotifierStrategy
393           log-file:
394             Ref: GlanceLogFile
395         heat:
396           admin_password:
397             Ref: HeatPassword
398           admin_tenant_name: service
399           admin_user: heat
400           auth_encryption_key: unset___________
401           db: mysql://heat:unset@localhost/heat
402           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
403           watch_server_url: {get_input: heat.watch_server_url}
404           metadata_server_url: {get_input: heat.metadata_server_url}
405           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
406         horizon:
407           caches:
408             memcached:
409               nodes:
410                 Merge::Map:
411                   controller0:
412                     {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
413         keystone:
414           db: mysql://keystone:unset@localhost/keystone
415           host:
416             get_input: controller_host
417           ca_certificate: {Ref: KeystoneCACertificate}
418           signing_key: {Ref: KeystoneSigningKey}
419           signing_certificate: {Ref: KeystoneSigningCertificate}
420         mysql:
421           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
422           nodes:
423             Merge::Map:
424               controller0:
425                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
426           cluster_name:
427             Fn::Join:
428               - '-'
429               - - 'tripleo'
430                 - {Ref: MysqlClusterUniquePart}
431         neutron:
432           flat-networks: {Ref: NeutronFlatNetworks}
433           host: {get_input: controller_virtual_ip}
434           metadata_proxy_shared_secret: unset
435           ovs:
436             enable_tunneling: 'True'
437             local_ip:
438               get_input: controller_host
439             bridge_mappings: {Ref: NeutronBridgeMappings}
440             public_interface:
441               Ref: NeutronPublicInterface
442             public_interface_raw_device:
443               Ref: NeutronPublicInterfaceRawDevice
444             public_interface_route:
445               Ref: NeutronPublicInterfaceDefaultRoute
446             physical_bridge: br-ex
447             tenant_network_type: gre
448           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
449           service-password:
450             Ref: NeutronPassword
451           dnsmasq-options:
452             Ref: NeutronDnsmasqOptions
453         ceilometer:
454           db: mysql://ceilometer:unset@localhost/ceilometer
455           metering_secret: {Ref: CeilometerMeteringSecret}
456           service-password:
457             Ref: CeilometerPassword
458         snmpd:
459           export_MIB: UCD-SNMP-MIB
460           readonly_user_name:
461             Ref: SnmpdReadonlyUserName
462           readonly_user_password:
463             Ref: SnmpdReadonlyUserPassword
464         nova:
465           compute_driver: libvirt.LibvirtDriver
466           db: mysql://nova:unset@localhost/nova
467           default_floating_pool:
468             ext-net
469           host: {get_input: controller_virtual_ip}
470           metadata-proxy: true
471           service-password:
472             Ref: NovaPassword
473         rabbit:
474           username:
475             Ref: RabbitUserName
476           password:
477             Ref: RabbitPassword
478           cookie:
479             Fn::GetAtt:
480             - RabbitCookie
481             - value
482         ntp:
483           servers:
484               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
485         keepalived:
486           keepalive_interface:
487             Ref: ControlVirtualInterface
488           priority: 101
489         virtual_ips:
490             -
491               ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
492               interface:
493                 Ref: ControlVirtualInterface
494         haproxy:
495           nodes:
496             Merge::Map:
497               controller0:
498                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
499                 name: {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
500           net_binds:
501             - ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
502           services:
503             - name: keystone_admin
504               port: 35357
505             - name: keystone_public
506               port: 5000
507             - name: horizon
508               port: 80
509             - name: neutron
510               port: 9696
511             - name: cinder
512               port: 8776
513             - name: glance_api
514               port: 9292
515             - name: glance_registry
516               port: 9191
517             - name: heat_api
518               port: 8004
519             - name: heat_cloudwatch
520               port: 8003
521             - name: heat_cfn
522               port: 8000
523             - name: nova_ec2
524               port: 8773
525             - name: nova_osapi
526               port: 8774
527             - name: nova_metadata
528               port: 8775
529             - name: ceilometer
530               port: 8777
531             - name: swift_proxy_server
532               port: 8080
533   controllerPassthrough:
534     Type: OS::Heat::StructuredConfig
535     Properties:
536       group: os-apply-config
537       config: {get_input: passthrough_config}
538   controller0:
539     Type: OS::Nova::Server
540     Properties:
541       image:
542         Ref: controllerImage
543       image_update_policy:
544         Ref: ImageUpdatePolicy
545       flavor:
546         Ref: OvercloudControlFlavor
547       key_name:
548         Ref: KeyName
549       networks:
550         - network: ctlplane
551       user_data_format: SOFTWARE_CONFIG
552   controller0AllNodesConfig:
553     Type: OS::Heat::StructuredDeployment
554     Properties:
555       config: {Ref: allNodesConfig}
556       server: {Ref: controller0}
557   controller0Deployment:
558     Type: OS::Heat::StructuredDeployment
559     Properties:
560       signal_transport: NO_SIGNAL
561       config: {Ref: controllerConfig}
562       server: {Ref: controller0}
563       input_values:
564         bootstack_nodeid:
565           Fn::Select:
566           - name
567           - Fn::GetAtt:
568             - controller0
569             - show
570         controller_host:
571           Fn::Select:
572             - 0
573             - Fn::Select:
574               - ctlplane
575               - Fn::GetAtt:
576                 - controller0
577                 - networks
578         controller_virtual_ip:
579           {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
580         heat.watch_server_url:
581           Fn::Join:
582             - ''
583             - - 'http://'
584               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
585               - ':8003'
586         heat.metadata_server_url:
587           Fn::Join:
588             - ''
589             - - 'http://'
590               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
591               - ':8000'
592         heat.waitcondition_server_url:
593           Fn::Join:
594             - ''
595             - - 'http://'
596               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
597               - ':8000/v1/waitcondition'
598   allNodesConfig:
599     Type: OS::Heat::StructuredConfig
600     Properties:
601       config:
602         completion-signal: {get_input: deploy_signal_id}
603         hosts:
604           Fn::Join:
605           - "\n"
606           - - Fn::Join:
607               - "\n"
608               - Merge::Map:
609                   NovaCompute0:
610                     Fn::Join:
611                     - ' '
612                     - - Fn::Select:
613                         - 0
614                         - Fn::Select:
615                           - ctlplane
616                           - Fn::GetAtt:
617                             - NovaCompute0
618                             - networks
619                       - Fn::Select:
620                         - name
621                         - Fn::GetAtt:
622                           - NovaCompute0
623                           - show
624                       - Fn::Join:
625                         - '.'
626                         - - Fn::Select:
627                             - name
628                             - Fn::GetAtt:
629                               - NovaCompute0
630                               - show
631                           - 'novalocal'
632             - Fn::Join:
633               - "\n"
634               - Merge::Map:
635                   controller0:
636                     Fn::Join:
637                     - ' '
638                     - - Fn::Select:
639                         - 0
640                         - Fn::Select:
641                           - ctlplane
642                           - Fn::GetAtt:
643                             - controller0
644                             - networks
645                       - Fn::Select:
646                         - name
647                         - Fn::GetAtt:
648                           - controller0
649                           - show
650                       - Fn::Join:
651                         - '.'
652                         - - Fn::Select:
653                             - name
654                             - Fn::GetAtt:
655                               - controller0
656                               - show
657                           - 'novalocal'
658                       - {Ref: CloudName}
659         rabbit:
660           nodes:
661             Fn::Join:
662               - ','
663               - Merge::Map:
664                   controller0:
665                     {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
666   controller0SSLDeployment:
667     Type: OS::Heat::StructuredDeployment
668     Properties:
669       config: {Ref: SSLConfig}
670       server: {Ref: controller0}
671       signal_transport: NO_SIGNAL
672       input_values:
673         ssl_certificate: {Ref: SSLCertificate}
674         ssl_key: {Ref: SSLKey}
675         ssl_ca_certificate: {Ref: SSLCACertificate}
676   controller0Passthrough:
677     Type: OS::Heat::StructuredDeployment
678     Properties:
679       config: {Ref: controllerPassthrough}
680       server: {Ref: controller0}
681       signal_transport: NO_SIGNAL
682       input_values:
683         passthrough_config: {Ref: ExtraConfig}
684 Outputs:
685   KeystoneURL:
686     Description: URL for the Overcloud Keystone service
687     Value:
688       Fn::Join:
689       - ''
690       - - http://
691         - Fn::Select:
692           - ip_address
693           - Fn::Select:
694             - 0
695             - Fn::GetAtt:
696               - ControlVirtualIP
697               - fixed_ips
698         - :5000/v2.0/