34f5a1bb75d63e6b72bfaf0461b317c5a596888c
[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   KeystoneSigningCertificate:
252     Default: ''
253     Description: Keystone certificate for verifying token validity.
254     Type: String
255   KeystoneSigningKey:
256     Default: ''
257     Description: Keystone key for signing tokens.
258     Type: String
259     NoEcho: true
260 Resources:
261   ControlVirtualIP:
262     Type: OS::Neutron::Port
263     Properties:
264       name: control_virtual_ip
265       network_id: {Ref: NeutronControlPlaneID}
266       fixed_ips:
267         Ref: ControlFixedIPs
268   RabbitCookie:
269     Type: OS::Heat::RandomString
270     Properties:
271       length: 20
272       salt:
273         Ref: RabbitCookieSalt
274   NovaCompute0Config:
275     Type: FileInclude
276     Path: nova-compute-instance.yaml
277     SubKey: Resources.NovaCompute0Deploy
278     Parameters:
279         NovaApiHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
280         KeystoneHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
281         RabbitHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
282         NeutronHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
283         GlanceHost: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
284         NovaDSN: {"Fn::Join": ['', ['mysql://nova:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/nova']]}
285         CeilometerDSN: {"Fn::Join": ['', ['mysql://ceilometer:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/ceilometer']]}
286         NeutronDSN: {"Fn::Join": ['', ['mysql://neutron:unset@', {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}, '/neutron']]}
287         NeutronNetworkType: "gre"
288         NeutronEnableTunnelling: "True"
289         NeutronFlatNetworks:
290             Ref: NeutronFlatNetworks
291         NeutronNetworkVLANRanges: ""
292         NeutronPhysicalBridge:
293             Ref: HypervisorNeutronPhysicalBridge
294         NeutronPublicInterface:
295             Ref: HypervisorNeutronPublicInterface
296         NeutronBridgeMappings:
297             Ref: NeutronBridgeMappings
298         StaticHosts:
299           Fn::Join:
300           - "\n"
301           - - Fn::Join:
302               - "\n"
303               - Merge::Map:
304                   NovaCompute0:
305                     Fn::Join:
306                     - ' '
307                     - - Fn::Select:
308                         - 0
309                         - Fn::Select:
310                           - ctlplane
311                           - Fn::GetAtt:
312                             - NovaCompute0
313                             - networks
314                       - Fn::Select:
315                         - name
316                         - Fn::GetAtt:
317                           - NovaCompute0
318                           - show
319                       - Fn::Join:
320                         - '.'
321                         - - Fn::Select:
322                             - name
323                             - Fn::GetAtt:
324                               - NovaCompute0
325                               - show
326                           - 'novalocal'
327             - Fn::Join:
328               - "\n"
329               - Merge::Map:
330                   controller0:
331                     Fn::Join:
332                     - ' '
333                     - - Fn::Select:
334                         - 0
335                         - Fn::Select:
336                           - ctlplane
337                           - Fn::GetAtt:
338                             - controller0
339                             - networks
340                       - Fn::Select:
341                         - name
342                         - Fn::GetAtt:
343                           - controller0
344                           - show
345                       - Fn::Join:
346                         - '.'
347                         - - Fn::Select:
348                             - name
349                             - Fn::GetAtt:
350                               - controller0
351                               - show
352                           - 'novalocal'
353                       - {Ref: CloudName}
354   NovaCompute0Passthrough:
355     Type: OS::Heat::StructuredDeployment
356     Properties:
357       config: {Ref: NovaComputePassthrough}
358       server: {Ref: NovaCompute0}
359       signal_transport: NO_SIGNAL
360       input_values:
361         passthrough_config: {Ref: ExtraConfig}
362   NovaCompute0:
363     Type: FileInclude
364     Path: nova-compute-instance.yaml
365     SubKey: Resources.NovaCompute0
366   controllerConfig:
367     Type: OS::Heat::StructuredConfig
368     Properties:
369       group: os-apply-config
370       config:
371         completion-signal: {get_input: deploy_signal_id}
372         admin-password:
373           Ref: AdminPassword
374         admin-token:
375           Ref: AdminToken
376         bootstack:
377           public_interface_ip:
378             Ref: NeutronPublicInterfaceIP
379         bootstrap_host:
380           bootstrap_nodeid:
381             Fn::Select:
382             - 0
383             - Fn::Select:
384               - 0
385               - Merge::Map:
386                   controller0:
387                   - Fn::Select:
388                     - name
389                     - Fn::GetAtt:
390                       - controller0
391                       - show
392           nodeid: {get_input: bootstack_nodeid}
393         cinder:
394           db: mysql://cinder:unset@localhost/cinder
395           volume_size_mb:
396             Ref: CinderLVMLoopDeviceSize
397           service-password:
398             Ref: CinderPassword
399           iscsi-helper:
400             Ref: CinderISCSIHelper
401         controller-address:
402           get_input: controller_host
403         db-password: unset
404         glance:
405           registry:
406             host: {get_input: controller_virtual_ip}
407           backend: swift
408           db: mysql://glance:unset@localhost/glance
409           host:
410             get_input: controller_host
411           service-password:
412             Ref: GlancePassword
413           swift-store-user: service:glance
414           swift-store-key:
415             Ref: GlancePassword
416           notifier-strategy:
417             Ref: GlanceNotifierStrategy
418           log-file:
419             Ref: GlanceLogFile
420         heat:
421           admin_password:
422             Ref: HeatPassword
423           admin_tenant_name: service
424           admin_user: heat
425           auth_encryption_key: unset___________
426           db: mysql://heat:unset@localhost/heat
427           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
428           watch_server_url: {get_input: heat.watch_server_url}
429           metadata_server_url: {get_input: heat.metadata_server_url}
430           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
431         hosts: {get_input: hosts}
432         keystone:
433           db: mysql://keystone:unset@localhost/keystone
434           host:
435             get_input: controller_host
436           ca_certificate: {Ref: KeystoneCACertificate}
437           signing_key: {Ref: KeystoneSigningKey}
438           signing_certificate: {Ref: KeystoneSigningCertificate}
439         mysql:
440           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
441         neutron:
442           flat-networks: {Ref: NeutronFlatNetworks}
443           host: {get_input: controller_virtual_ip}
444           metadata_proxy_shared_secret: unset
445           ovs:
446             enable_tunneling: 'True'
447             local_ip:
448               get_input: controller_host
449             bridge_mappings: {Ref: NeutronBridgeMappings}
450             public_interface:
451               Ref: NeutronPublicInterface
452             public_interface_raw_device:
453               Ref: NeutronPublicInterfaceRawDevice
454             public_interface_route:
455               Ref: NeutronPublicInterfaceDefaultRoute
456             physical_bridge: br-ex
457             tenant_network_type: gre
458           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
459           service-password:
460             Ref: NeutronPassword
461           dnsmasq-options:
462             Ref: NeutronDnsmasqOptions
463         ceilometer:
464           db: mysql://ceilometer:unset@localhost/ceilometer
465           metering_secret: {Ref: CeilometerMeteringSecret}
466           service-password:
467             Ref: CeilometerPassword
468         snmpd:
469           export_MIB: UCD-SNMP-MIB
470           readonly_user_name:
471             Ref: SnmpdReadonlyUserName
472           readonly_user_password:
473             Ref: SnmpdReadonlyUserPassword
474         nova:
475           compute_driver: libvirt.LibvirtDriver
476           db: mysql://nova:unset@localhost/nova
477           default_floating_pool:
478             ext-net
479           host: {get_input: controller_virtual_ip}
480           metadata-proxy: true
481           service-password:
482             Ref: NovaPassword
483         rabbit:
484           host:
485             get_input: controller_host
486           username:
487             Ref: RabbitUserName
488           password:
489             Ref: RabbitPassword
490           cookie:
491             Fn::GetAtt:
492             - RabbitCookie
493             - value
494         ntp:
495           servers:
496               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
497         keepalived:
498           keepalive_interface:
499             Ref: NeutronPublicInterface
500           priority: 101
501         virtual_ips:
502             -
503               ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
504               interface:
505                 Ref: ControlVirtualInterface
506         haproxy:
507           nodes:
508             Merge::Map:
509               controller0:
510                 ip: {"Fn::Select": [ 0, {"Fn::Select": [ "ctlplane", {"Fn::GetAtt": [controller0, networks]} ]} ] }
511                 name: {"Fn::Select": [ name, {"Fn::GetAtt": [controller0, show]} ] }
512           net_binds:
513             - ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
514           services:
515             - name: keystone_admin
516               port: 35357
517             - name: keystone_public
518               port: 5000
519             - name: horizon
520               port: 80
521             - name: neutron
522               port: 9696
523             - name: cinder
524               port: 8776
525             - name: glance_api
526               port: 9292
527             - name: glance_registry
528               port: 9191
529             - name: heat_api
530               port: 8004
531             - name: heat_cloudwatch
532               port: 8003
533             - name: heat_cfn
534               port: 8000
535             - name: nova_ec2
536               port: 8773
537             - name: nova_osapi
538               port: 8774
539             - name: nova_metadata
540               port: 8775
541             - name: ceilometer
542               port: 8777
543             - name: swift_proxy_server
544               port: 8080
545   controllerPassthrough:
546     Type: OS::Heat::StructuredConfig
547     Properties:
548       group: os-apply-config
549       config: {get_input: passthrough_config}
550   controller0:
551     Type: OS::Nova::Server
552     Properties:
553       image:
554         Ref: controllerImage
555       image_update_policy:
556         Ref: ImageUpdatePolicy
557       flavor:
558         Ref: OvercloudControlFlavor
559       key_name:
560         Ref: KeyName
561       user_data_format: SOFTWARE_CONFIG
562   controller0Deployment:
563     Type: OS::Heat::StructuredDeployment
564     Properties:
565       config: {Ref: controllerConfig}
566       server: {Ref: controller0}
567       input_values:
568         bootstack_nodeid:
569           Fn::Select:
570           - name
571           - Fn::GetAtt:
572             - controller0
573             - show
574         controller_host:
575           Fn::Select:
576             - 0
577             - Fn::Select:
578               - ctlplane
579               - Fn::GetAtt:
580                 - controller0
581                 - networks
582         heat.watch_server_url:
583           Fn::Join:
584             - ''
585             - - 'http://'
586               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
587               - ':8003'
588         heat.metadata_server_url:
589           Fn::Join:
590             - ''
591             - - 'http://'
592               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
593               - ':8000'
594         heat.waitcondition_server_url:
595           Fn::Join:
596             - ''
597             - - 'http://'
598               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
599               - ':8000/v1/waitcondition'
600         hosts:
601           Fn::Join:
602           - "\n"
603           - - Fn::Join:
604               - "\n"
605               - Merge::Map:
606                   NovaCompute0:
607                     Fn::Join:
608                     - ' '
609                     - - Fn::Select:
610                         - 0
611                         - Fn::Select:
612                           - ctlplane
613                           - Fn::GetAtt:
614                             - NovaCompute0
615                             - networks
616                       - Fn::Select:
617                         - name
618                         - Fn::GetAtt:
619                           - NovaCompute0
620                           - show
621                       - Fn::Join:
622                         - '.'
623                         - - Fn::Select:
624                             - name
625                             - Fn::GetAtt:
626                               - NovaCompute0
627                               - show
628                           - 'novalocal'
629             - Fn::Join:
630               - "\n"
631               - Merge::Map:
632                   controller0:
633                     Fn::Join:
634                     - ' '
635                     - - Fn::Select:
636                         - 0
637                         - Fn::Select:
638                           - ctlplane
639                           - Fn::GetAtt:
640                             - controller0
641                             - networks
642                       - Fn::Select:
643                         - name
644                         - Fn::GetAtt:
645                           - controller0
646                           - show
647                       - Fn::Join:
648                         - '.'
649                         - - Fn::Select:
650                             - name
651                             - Fn::GetAtt:
652                               - controller0
653                               - show
654                           - 'novalocal'
655                       - {Ref: CloudName}
656         controller_virtual_ip:
657           {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
658   controller0SSLDeployment:
659     Type: OS::Heat::StructuredDeployment
660     Properties:
661       config: {Ref: SSLConfig}
662       server: {Ref: controller0}
663       signal_transport: NO_SIGNAL
664       input_values:
665         ssl_certificate: {Ref: SSLCertificate}
666         ssl_key: {Ref: SSLKey}
667         ssl_ca_certificate: {Ref: SSLCACertificate}
668   controller0Passthrough:
669     Type: OS::Heat::StructuredDeployment
670     Properties:
671       config: {Ref: controllerPassthrough}
672       server: {Ref: controller0}
673       signal_transport: NO_SIGNAL
674       input_values:
675         passthrough_config: {Ref: ExtraConfig}
676 Outputs:
677   KeystoneURL:
678     Description: URL for the Overcloud Keystone service
679     Value:
680       Fn::Join:
681       - ''
682       - - http://
683         - Fn::Select:
684           - ip_address
685           - Fn::Select:
686             - 0
687             - Fn::GetAtt:
688               - ControlVirtualIP
689               - fixed_ips
690         - :5000/v2.0/