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