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