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