9cbc2030bd7e378775eecc2381da43a9fd7c9422
[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           bootstrap_nodeid:
365             Fn::Select:
366             - 0
367             - Fn::Select:
368               - 0
369               - Merge::Map:
370                   controller0:
371                   - Fn::Select:
372                     - name
373                     - Fn::GetAtt:
374                       - controller0
375                       - show
376           public_interface_ip:
377             Ref: NeutronPublicInterfaceIP
378           nodeid: {get_input: bootstack_nodeid}
379         cinder:
380           db: mysql://cinder:unset@localhost/cinder
381           volume_size_mb:
382             Ref: CinderLVMLoopDeviceSize
383           service-password:
384             Ref: CinderPassword
385           iscsi-helper:
386             Ref: CinderISCSIHelper
387         controller-address:
388           get_input: controller_host
389         db-password: unset
390         glance:
391           backend: swift
392           db: mysql://glance:unset@localhost/glance
393           host:
394             get_input: controller_host
395           service-password:
396             Ref: GlancePassword
397           swift-store-user: service:glance
398           swift-store-key:
399             Ref: GlancePassword
400           notifier-strategy:
401             Ref: GlanceNotifierStrategy
402           log-file:
403             Ref: GlanceLogFile
404         heat:
405           admin_password:
406             Ref: HeatPassword
407           admin_tenant_name: service
408           admin_user: heat
409           auth_encryption_key: unset___________
410           db: mysql://heat:unset@localhost/heat
411           stack_domain_admin_password: {Ref: HeatStackDomainAdminPassword}
412           watch_server_url: {get_input: heat.watch_server_url}
413           metadata_server_url: {get_input: heat.metadata_server_url}
414           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
415         hosts: {get_input: hosts}
416         keystone:
417           db: mysql://keystone:unset@localhost/keystone
418           host:
419             get_input: controller_host
420         mysql:
421           innodb_buffer_pool_size: {Ref: MysqlInnodbBufferPoolSize}
422         neutron:
423           flat-networks: {Ref: NeutronFlatNetworks}
424           host:
425             get_input: controller_host
426           metadata_proxy_shared_secret: unset
427           ovs:
428             enable_tunneling: 'True'
429             local_ip:
430               get_input: controller_host
431             bridge_mappings: {Ref: NeutronBridgeMappings}
432             public_interface:
433               Ref: NeutronPublicInterface
434             public_interface_raw_device:
435               Ref: NeutronPublicInterfaceRawDevice
436             public_interface_route:
437               Ref: NeutronPublicInterfaceDefaultRoute
438             physical_bridge: br-ex
439             tenant_network_type: gre
440           ovs_db: mysql://neutron:unset@localhost/ovs_neutron?charset=utf8
441           service-password:
442             Ref: NeutronPassword
443           dnsmasq-options:
444             Ref: NeutronDnsmasqOptions
445         ceilometer:
446           db: mysql://ceilometer:unset@localhost/ceilometer
447           metering_secret: {Ref: CeilometerMeteringSecret}
448           service-password:
449             Ref: CeilometerPassword
450         snmpd:
451           export_MIB: UCD-SNMP-MIB
452           readonly_user_name:
453             Ref: SnmpdReadonlyUserName
454           readonly_user_password:
455             Ref: SnmpdReadonlyUserPassword
456         nova:
457           compute_driver: libvirt.LibvirtDriver
458           db: mysql://nova:unset@localhost/nova
459           default_floating_pool:
460             ext-net
461           host:
462             get_input: controller_host
463           metadata-proxy: true
464           service-password:
465             Ref: NovaPassword
466         rabbit:
467           host:
468             get_input: controller_host
469           username:
470             Ref: RabbitUserName
471           password:
472             Ref: RabbitPassword
473           cookie:
474             Fn::GetAtt:
475             - RabbitCookie
476             - value
477         ntp:
478           servers:
479               - {server: {Ref: NtpServer}, fudge: "stratum 0"}
480         keepalived:
481           keepalive_interface:
482             Ref: NeutronPublicInterface
483           priority: 101
484         virtual_ips:
485             -
486               ip: {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
487               interface:
488                 Ref: ControlVirtualInterface
489   controllerPassthrough:
490     Type: OS::Heat::StructuredConfig
491     Properties:
492       group: os-apply-config
493       config: {get_input: passthrough_config}
494   controller0:
495     Type: OS::Nova::Server
496     Properties:
497       image:
498         Ref: controllerImage
499       image_update_policy:
500         Ref: ImageUpdatePolicy
501       flavor:
502         Ref: OvercloudControlFlavor
503       key_name:
504         Ref: KeyName
505       user_data_format: SOFTWARE_CONFIG
506   controller0Deployment:
507     Type: OS::Heat::StructuredDeployment
508     Properties:
509       config: {Ref: controllerConfig}
510       server: {Ref: controller0}
511       input_values:
512         bootstack_nodeid:
513           Fn::Select:
514           - name
515           - Fn::GetAtt:
516             - controller0
517             - show
518         controller_host:
519           Fn::Select:
520             - 0
521             - Fn::Select:
522               - ctlplane
523               - Fn::GetAtt:
524                 - controller0
525                 - networks
526         heat.watch_server_url:
527           Fn::Join:
528             - ''
529             - - 'http://'
530               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
531               - ':8003'
532         heat.metadata_server_url:
533           Fn::Join:
534             - ''
535             - - 'http://'
536               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
537               - ':8000'
538         heat.waitcondition_server_url:
539           Fn::Join:
540             - ''
541             - - 'http://'
542               - {'Fn::Select': [ip_address, 'Fn::Select': [0, 'Fn::GetAtt': [ControlVirtualIP, fixed_ips]]]}
543               - ':8000/v1/waitcondition'
544         hosts:
545           Fn::Join:
546           - "\n"
547           - - Fn::Join:
548               - "\n"
549               - Merge::Map:
550                   NovaCompute0:
551                     Fn::Join:
552                     - ' '
553                     - - Fn::Select:
554                         - 0
555                         - Fn::Select:
556                           - ctlplane
557                           - Fn::GetAtt:
558                             - NovaCompute0
559                             - networks
560                       - Fn::Select:
561                         - name
562                         - Fn::GetAtt:
563                           - NovaCompute0
564                           - show
565                       - Fn::Join:
566                         - '.'
567                         - - Fn::Select:
568                             - name
569                             - Fn::GetAtt:
570                               - NovaCompute0
571                               - show
572                           - 'novalocal'
573             - Fn::Join:
574               - "\n"
575               - Merge::Map:
576                   controller0:
577                     Fn::Join:
578                     - ' '
579                     - - Fn::Select:
580                         - 0
581                         - Fn::Select:
582                           - ctlplane
583                           - Fn::GetAtt:
584                             - controller0
585                             - networks
586                       - Fn::Select:
587                         - name
588                         - Fn::GetAtt:
589                           - controller0
590                           - show
591                       - Fn::Join:
592                         - '.'
593                         - - Fn::Select:
594                             - name
595                             - Fn::GetAtt:
596                               - controller0
597                               - show
598                           - 'novalocal'
599                       - {Ref: CloudName}
600   controller0SSLDeployment:
601     Type: OS::Heat::StructuredDeployment
602     Properties:
603       config: {Ref: SSLConfig}
604       server: {Ref: controller0}
605       signal_transport: NO_SIGNAL
606       input_values:
607         ssl_certificate: {Ref: SSLCertificate}
608         ssl_key: {Ref: SSLKey}
609   controller0Passthrough:
610     Type: OS::Heat::StructuredDeployment
611     Properties:
612       config: {Ref: controllerPassthrough}
613       server: {Ref: controller0}
614       signal_transport: NO_SIGNAL
615       input_values:
616         passthrough_config: {Ref: ExtraConfig}
617 Outputs:
618   KeystoneURL:
619     Description: URL for the Overcloud Keystone service
620     Value:
621       Fn::Join:
622       - ''
623       - - http://
624         - Fn::Select:
625           - ip_address
626           - Fn::Select:
627             - 0
628             - Fn::GetAtt:
629               - ControlVirtualIP
630               - fixed_ips
631         - :5000/v2.0/