Compute and controller templates without merge.py
[apex-tripleo-heat-templates.git] / overcloud-without-mergepy.yaml
1 heat_template_version: 2014-10-16
2
3 description: >
4   Nova API,Keystone,Heat Engine and API,Glance,Neutron,Dedicated MySQL
5   server,Dedicated RabbitMQ Server,Group of Nova Computes
6
7
8 # TODO(shadower): we should probably use the parameter groups to put
9 # some order in here.
10 parameters:
11
12   # Common parameters (not specific to a role)
13   AdminPassword:
14     default: unset
15     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
16     type: string
17     hidden: true
18   CeilometerMeteringSecret:
19     default: unset
20     description: Secret shared by the ceilometer services.
21     type: string
22     hidden: true
23   CeilometerPassword:
24     default: unset
25     description: The password for the ceilometer service account.
26     type: string
27     hidden: true
28   CloudName:
29     default: ''
30     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
31     type: string
32   ControlFixedIPs:
33     default: []
34     description: Should be used for arbitrary ips.
35     type: json
36   Debug:
37     default: ''
38     description: Set to True to enable debugging on all services.
39     type: string
40   DefaultSignalTransport:
41     default: CFN_SIGNAL
42     description: Transport to use for software-config signals.
43     type: string
44     constraints:
45       - allowed_values: [ CFN_SIGNAL, HEAT_SIGNAL, NO_SIGNAL ]
46   GlancePort:
47     default: "9292"
48     description: Glance port.
49     type: string
50   GlanceProtocol:
51     default: http
52     description: Protocol to use when connecting to glance, set to https for SSL.
53     type: string
54   ImageUpdatePolicy:
55     default: 'REBUILD_PRESERVE_EPHEMERAL'
56     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
57     type: string
58   KeyName:
59     default: default
60     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
61     type: string
62   NeutronBridgeMappings:
63     description: >
64       The OVS logical->physical bridge mappings to use. See the Neutron
65       documentation for details. Defaults to mapping br-ex - the external
66       bridge on hosts - to a physical name 'datacentre' which can be used
67       to create provider networks (and we use this for the default floating
68       network) - if changing this either use different post-install network
69       scripts or be sure to keep 'datacentre' as a mapping network name.
70     type: string
71     default: "datacentre:br-ex"
72   NeutronControlPlaneID:
73     default: ''
74     type: string
75     description: Neutron ID for ctlplane network.
76   NeutronEnableTunnelling:
77     type: string
78     default: "True"
79   NeutronFlatNetworks:
80     type: string
81     default: 'datacentre'
82     description: >
83       If set, flat networks to configure in neutron plugins. Defaults to
84       'datacentre' to permit external network creation.
85   NeutronNetworkType:
86     default: 'gre'
87     description: The tenant network type for Neutron, either gre or vxlan.
88     type: string
89   NeutronPassword:
90     default: unset
91     description: The password for the neutron service account, used by neutron agents.
92     type: string
93     hidden: true
94   NeutronPublicInterface:
95     default: eth0
96     description: What interface to bridge onto br-ex for network nodes.
97     type: string
98   NeutronPublicInterfaceTag:
99     default: ''
100     description: >
101       VLAN tag for creating a public VLAN. The tag will be used to
102       create an access port on the exterior bridge for each control plane node,
103       and that port will be given the IP address returned by neutron from the
104       public network. Set CONTROLEXTRA=overcloud-vlan-port.yaml when compiling
105       overcloud.yaml to include the deployment of VLAN ports to the control
106       plane.
107     type: string
108   NeutronTunnelTypes:
109     default: 'gre'
110     description: |
111         The tunnel types for the Neutron tenant network. To specify multiple
112         values, use a comma separated string, like so: 'gre,vxlan'
113     type: string
114   NovaPassword:
115     default: unset
116     description: The password for the nova service account, used by nova-api.
117     type: string
118     hidden: true
119   NtpServer:
120     type: string
121     default: ''
122   PublicVirtualFixedIPs:
123     default: []
124     description: >
125         Control the IP allocation for the PublicVirtualInterface port. E.g.
126         [{'ip_address':'1.2.3.4'}]
127     type: json
128   PublicVirtualNetwork:
129     default: 'ctlplane'
130     type: string
131     description: >
132         Neutron network to allocate public virtual IP port on.
133   RabbitCookieSalt:
134     type: string
135     default: unset
136     description: Salt for the rabbit cookie, change this to force the randomly generated rabbit cookie to change.
137   RabbitUserName:
138     default: guest
139     description: The username for RabbitMQ
140     type: string
141   RabbitPassword:
142     default: guest
143     description: The password for RabbitMQ
144     type: string
145     hidden: true
146   SnmpdReadonlyUserName:
147     default: ro_snmp_user
148     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
149     type: string
150   SnmpdReadonlyUserPassword:
151     default: unset
152     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
153     type: string
154     hidden: true
155
156
157   # Controller-specific params
158   AdminToken:
159     default: unset
160     description: The keystone auth secret.
161     type: string
162     hidden: true
163   CinderLVMLoopDeviceSize:
164     default: 5000
165     description: The size of the loopback file used by the cinder LVM driver.
166     type: number
167   CinderPassword:
168     default: unset
169     description: The password for the cinder service account, used by cinder-api.
170     type: string
171     hidden: true
172   CinderISCSIHelper:
173     default: tgtadm
174     description: The iSCSI helper to use with cinder.
175     type: string
176   ControllerCount:
177     type: number
178     default: 1
179   controllerExtraConfig:
180     default: {}
181     description: |
182       Controller specific configuration to inject into the cluster. Same
183       structure as ExtraConfig.
184     type: json
185   controllerImage:
186     type: string
187     default: overcloud-control
188   OvercloudControlFlavor:
189     default: baremetal
190     description: Flavor for control nodes to request when deploying.
191     type: string
192   ControlVirtualInterface:
193     default: 'br-ex'
194     description: Interface where virtual ip will be assigned.
195     type: string
196   ExtraConfig:
197     default: {}
198     description: |
199       Additional configuration to inject into the cluster. The JSON should have
200       the following structure:
201         {"FILEKEY":
202           {"config":
203             [{"section": "SECTIONNAME",
204               "values":
205                 [{"option": "OPTIONNAME",
206                   "value": "VALUENAME"
207                  }
208                 ]
209              }
210             ]
211           }
212         }
213       For instance:
214         {"nova":
215           {"config":
216             [{"section": "default",
217               "values":
218                 [{"option": "force_config_drive",
219                   "value": "always"
220                  }
221                 ]
222              },
223              {"section": "cells",
224               "values":
225                 [{"option": "driver",
226                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
227                  }
228                 ]
229              }
230             ]
231           }
232         }
233     type: json
234   GlanceLogFile:
235     description: The filepath of the file to use for logging messages from Glance.
236     type: string
237     default: ''
238   GlanceNotifierStrategy:
239     description: Strategy to use for Glance notification queue
240     type: string
241     default: noop
242   GlancePassword:
243     default: unset
244     description: The password for the glance service account, used by the glance services.
245     type: string
246     hidden: true
247   HeatPassword:
248     default: unset
249     description: The password for the Heat service account, used by the Heat services.
250     type: string
251     hidden: true
252   HeatStackDomainAdminPassword:
253     description: Password for heat_domain_admin user.
254     type: string
255     default: ''
256     hidden: true
257   KeystoneCACertificate:
258     default: ''
259     description: Keystone self-signed certificate authority certificate.
260     type: string
261   KeystoneSigningCertificate:
262     default: ''
263     description: Keystone certificate for verifying token validity.
264     type: string
265   KeystoneSigningKey:
266     default: ''
267     description: Keystone key for signing tokens.
268     type: string
269     hidden: true
270   MysqlInnodbBufferPoolSize:
271     description: >
272         Specifies the size of the buffer pool in megabytes. Setting to
273         zero should be interpreted as "no value" and will defer to the
274         lower level default.
275     type: number
276     default: 0
277   NeutronDnsmasqOptions:
278     default: 'dhcp-option-force=26,1400'
279     description: Dnsmasq options for neutron-dhcp-agent. The default value here forces MTU to be set to 1400 to account for the tunnel overhead.
280     type: string
281   NeutronPublicInterfaceDefaultRoute:
282     default: ''
283     description: A custom default route for the NeutronPublicInterface.
284     type: string
285   NeutronPublicInterfaceIP:
286     default: ''
287     description: A custom IP address to put onto the NeutronPublicInterface.
288     type: string
289   NeutronPublicInterfaceRawDevice:
290     default: ''
291     description: If set, the public interface is a vlan with this device as the raw device.
292     type: string
293   PublicVirtualInterface:
294     default: 'br-ex'
295     description: >
296         Specifies the interface where the public-facing virtual ip will be assigned.
297         This should be int_public when a VLAN is being used.
298     type: string
299   SSLCertificate:
300     default: ''
301     description: If set, the contents of an SSL certificate .crt file for encrypting SSL endpoints.
302     type: string
303     hidden: true
304   SSLKey:
305     default: ''
306     description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints.
307     type: string
308     hidden: true
309   SSLCACertificate:
310     default: ''
311     description: If set, the contents of an SSL certificate authority file.
312     type: string
313   SwiftHashSuffix:
314     default: unset
315     description: A random string to be used as a salt when hashing to determine mappings in the ring.
316     type: string
317     hidden: true
318   SwiftPassword:
319     default: unset
320     description: The password for the swift service account, used by the swift proxy services.
321     type: string
322     hidden: true
323   SwiftPartPower:
324     default: 10
325     description: Partition Power to use when building Swift rings
326     type: number
327   SwiftReplicas:
328     type: number
329     default: 1
330     description: How many replicas to use in the swift rings.
331
332 # Compute-specific params
333   CeilometerComputeAgent:
334     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
335     type: string
336     default: ''
337     constraints:
338     - allowed_values: ['', Present]
339   ComputeCount:
340     type: number
341     default: 1
342   HypervisorNeutronPhysicalBridge:
343     default: 'br-ex'
344     description: >
345       An OVS bridge to create on each hypervisor. This defaults to br-ex the
346       same as the control plane nodes, as we have a uniform configuration of
347       the openvswitch agent. Typically should not need to be changed.
348     type: string
349   HypervisorNeutronPublicInterface:
350     default: 'eth0'
351     description: What interface to add to the HypervisorNeutronPhysicalBridge.
352     type: string
353   LiveUpdateComputeImage:
354     type: string
355     description: The image ID for live-updates to the overcloud compute nodes.
356     default: ''
357   LiveUpdateHost:
358     type: string
359     description: The IP address for the undercloud Glance API.
360     default: ''
361   LiveUpdatePassword:
362     type: string
363     default: ''
364     description: The live-update password for the undercloud Glance API.
365     hidden: true
366   LiveUpdateTenantName:
367     type: string
368     description: The live-update tenant name for the undercloud Glance API.
369     default: ''
370   LiveUpdateUserName:
371     type: string
372     description: The live-update username for the undercloud Glance API.
373     default: ''
374   NeutronNetworkVLANRanges:
375     default: 'datacentre'
376     description: >
377       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
378       Neutron documentation for permitted values. Defaults to permitting any
379       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
380     type: string
381   NovaComputeDriver:
382     type: string
383     default: libvirt.LibvirtDriver
384   NovaComputeExtraConfig:
385     default: {}
386     description: |
387       NovaCompute specific configuration to inject into the cluster. Same
388       structure as ExtraConfig.
389     type: json
390   NovaComputeLibvirtType:
391     default: ''
392     type: string
393   NovaImage:
394     type: string
395     default: overcloud-compute
396   OvercloudComputeFlavor:
397     description: Use this flavor
398     type: string
399     default: baremetal
400
401
402 resources:
403
404   Controller:
405     type: OS::Heat::ResourceGroup
406     properties:
407       count: {get_param: ControllerCount}
408       resource_def:
409         type: OS::TripleO::Controller
410         properties:
411           AdminPassword: {get_param: AdminPassword}
412           AdminToken: {get_param: AdminToken}
413           CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
414           CeilometerPassword: {get_param: CeilometerPassword}
415           CinderLVMLoopDeviceSize: {get_param: CinderLVMLoopDeviceSize}
416           CinderPassword: {get_param: CinderPassword}
417           CinderISCSIHelper: {get_param: CinderISCSIHelper}
418           CloudName: {get_param: CloudName}
419           ControlVirtualInterface: {get_param: ControlVirtualInterface}
420           ControllerExtraConfig: {get_param: controllerExtraConfig}
421           ExtraConfig: {get_param: ExtraConfig}
422           Flavor: {get_param: OvercloudControlFlavor}
423           GlancePort: {get_param: GlancePort}
424           GlanceProtocol: {get_param: GlanceProtocol}
425           GlancePassword: {get_param: GlancePassword}
426           GlanceNotifierStrategy: {get_param: GlanceNotifierStrategy}
427           GlanceLogFile: {get_param: GlanceLogFile}
428           HeatPassword: {get_param: HeatPassword}
429           HeatStackDomainAdminPassword: {get_param: HeatStackDomainAdminPassword}
430           Image: {get_param: controllerImage}
431           ImageUpdatePolicy: {get_param: ImageUpdatePolicy}
432           KeyName: {get_param: KeyName}
433           KeystoneCACertificate: {get_param: KeystoneCACertificate}
434           KeystoneSigningCertificate: {get_param: KeystoneSigningCertificate}
435           KeystoneSigningKey: {get_param: KeystoneSigningKey}
436           MysqlClusterUniquePart: {get_attr: [MysqlClusterUniquePart, value]}
437           MysqlInnodbBufferPoolSize: {get_param: MysqlInnodbBufferPoolSize}
438           MysqlRootPassword: {get_attr: [MysqlRootPassword, value]}
439           NeutronPublicInterfaceIP: {get_param: NeutronPublicInterfaceIP}
440           NeutronFlatNetworks: {get_param: NeutronFlatNetworks}
441           NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
442           NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
443           NeutronPublicInterface: {get_param: NeutronPublicInterface}
444           NeutronPublicInterfaceDefaultRoute: {get_param: NeutronPublicInterfaceDefaultRoute}
445           NeutronPublicInterfaceRawDevice: {get_param: NeutronPublicInterfaceRawDevice}
446           NeutronPassword: {get_param: NeutronPassword}
447           NeutronDnsmasqOptions: {get_param: NeutronDnsmasqOptions}
448           NovaPassword: {get_param: NovaPassword}
449           NtpServer: {get_param: NtpServer}
450           PublicVirtualInterface: {get_param: PublicVirtualInterface}
451           RabbitUserName: {get_param: RabbitUserName}
452           RabbitPassword: {get_param: RabbitPassword}
453           RabbitCookie: {get_attr: [RabbitCookie, value]}
454           SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName}
455           SnmpdReadonlyUserPassword: {get_param: SnmpdReadonlyUserPassword}
456           SSLCertificate: {get_param: SSLCertificate}
457           SSLKey: {get_param: SSLKey}
458           SSLCACertificate: {get_param: SSLCACertificate}
459           VirtualIP: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
460           PublicVirtualIP: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
461
462   Compute:
463     type: OS::Heat::ResourceGroup
464     properties:
465       count: {get_param: ComputeCount}
466       resource_def:
467         type: OS::TripleO::Compute
468         properties:
469           AdminPassword: {get_param: AdminPassword}
470           CeilometerComputeAgent: {get_param: CeilometerComputeAgent}
471           CeilometerMeteringSecret: {get_param: CeilometerMeteringSecret}
472           CeilometerPassword: {get_param: CeilometerPassword}
473           ExtraConfig: {get_param: ExtraConfig}
474           Flavor: {get_param: OvercloudComputeFlavor}
475           GlanceHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
476           GlancePort: {get_param: GlancePort}
477           GlanceProtocol: {get_param: GlanceProtocol}
478           Image: {get_param: NovaImage}
479           ImageUpdatePolicy: {get_param: ImageUpdatePolicy}
480           KeyName: {get_param: KeyName}
481           KeystoneHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
482           LiveUpdateComputeImage: {get_param: LiveUpdateComputeImage}
483           LiveUpdateHost: {get_param: LiveUpdateHost}
484           LiveUpdatePassword: {get_param: LiveUpdatePassword}
485           LiveUpdateTenantName: {get_param: LiveUpdateTenantName}
486           LiveUpdateUserName: {get_param: LiveUpdateUserName}
487           NeutronBridgeMappings: {get_param: NeutronBridgeMappings}
488           NeutronEnableTunnelling: {get_param: NeutronEnableTunnelling}
489           NeutronFlatNetworks: {get_param: NeutronFlatNetworks}
490           NeutronHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
491           NeutronNetworkType: {get_param: NeutronNetworkType}
492           NeutronTunnelTypes: {get_param: NeutronTunnelTypes}
493           NeutronNetworkVLANRanges: {get_param: NeutronNetworkVLANRanges}
494           NeutronPassword: {get_param: NeutronPassword}
495           NeutronPhysicalBridge: {get_param: HypervisorNeutronPhysicalBridge}
496           NeutronPublicInterface: {get_param: HypervisorNeutronPublicInterface}
497           NovaApiHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
498           NovaComputeDriver: {get_param: NovaComputeDriver}
499           NovaComputeExtraConfig: {get_param: NovaComputeExtraConfig}
500           NovaComputeLibvirtType: {get_param: NovaComputeLibvirtType}
501           NovaPublicIP: {get_attr: [PublicVirtualIP, fixed_ips, 0, ip_address]}
502           NovaPassword: {get_param: NovaPassword}
503           NtpServer: {get_param: NtpServer}
504           RabbitHost: {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
505           RabbitPassword: {get_param: RabbitPassword}
506           RabbitUserName: {get_param: RabbitUserName}
507           SnmpdReadonlyUserName: {get_param: SnmpdReadonlyUserName}
508           SnmpdReadonlyUserPassword: {get_param: SnmpdReadonlyUserPassword}
509           NovaDSN:
510             list_join:
511               - ''
512               - - mysql://nova:unset@
513                 - &compute_database_host {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
514                 - /nova
515           CeilometerDSN:
516             list_join:
517               - ''
518               - - mysql://ceilometer:unset@
519                 - *compute_database_host
520                 - /ceilometer
521           NeutronDSN:
522             list_join:
523               - ''
524               - - mysql://neutron:unset@
525                 - *compute_database_host
526                 - /ovs_neutron
527
528   allNodesConfig:
529     type: OS::Heat::StructuredConfig
530     properties:
531       config:
532         completion-signal: {get_input: deploy_signal_id}
533         hosts:
534           list_join:
535           - "\n"
536           - - list_join:
537               - "\n"
538               - {get_attr: [Compute, hosts_entry]}
539             - list_join:
540               - "\n"
541               - {get_attr: [Controller, hosts_entry]}
542               # TODO: ADD BLOCK STORAGE ENTRY HERE
543               # TODO: ADD SWIFT STORAGE ENTRY HERE
544         rabbit:
545           nodes:
546             list_join:
547             - ','
548             - {get_attr: [Controller, hostname]}
549
550   MysqlRootPassword:
551     type: OS::Heat::RandomString
552     properties:
553       length: 10
554
555   MysqlClusterUniquePart:
556     type: OS::Heat::RandomString
557     properties:
558       length: 10
559
560   RabbitCookie:
561     type: OS::Heat::RandomString
562     properties:
563       length: 20
564       salt: {get_param: RabbitCookieSalt}
565
566   ControlVirtualIP:
567     type: OS::Neutron::Port
568     properties:
569       name: control_virtual_ip
570       network_id: {get_param: NeutronControlPlaneID}
571       fixed_ips: {get_param: ControlFixedIPs}
572
573   PublicVirtualIP:
574     type: OS::Neutron::Port
575     properties:
576       name: public_virtual_ip
577       network: {get_param: PublicVirtualNetwork}
578       fixed_ips: {get_param: PublicVirtualFixedIPs}
579
580   ControllerBootstrapNodeConfig:
581     type: OS::Heat::StructuredConfig
582     properties:
583       group: os-apply-config
584       config:
585         bootstrap_host:
586           bootstrap_nodeid: {get_attr: [Controller, resource.0.hostname]}
587
588   ControllerBootstrapNodeDeployment:
589     type: OS::Heat::StructuredDeployments
590     properties:
591       config: {get_resource: ControllerBootstrapNodeConfig}
592       servers: {get_attr: [Controller, attributes, nova_server_resource]}
593       signal_transport: NO_SIGNAL
594
595   ControllerSwiftDeployment:
596     type: OS::Heat::StructuredDeployments
597     properties:
598       config: {get_resource: ControllerSwiftConfig}
599       servers: {get_attr: [Controller, attributes, nova_server_resource]}
600       signal_transport: NO_SIGNAL
601       input_values:
602         swift_hash_suffix: {get_param: SwiftHashSuffix}
603         swift_password: {get_param: SwiftPassword}
604         swift_part_power: {get_param: SwiftPartPower}
605         swift_replicas: { get_param: SwiftReplicas}
606
607   ControllerSwiftConfig:
608     type: OS::Heat::StructuredConfig
609     properties:
610       group: os-apply-config
611       config:
612         swift:
613           devices:
614             list_join:
615             - ", "
616             - - list_join:
617                 - ", "
618                 - {get_attr: [Controller, swift_device]}
619               - list_join:
620                 - ", "
621                 # TODO: replace the empty list with this:
622                 # - {get_attr: [ObjectStorage, swift_device]}
623                 # Once we have the swift/object-storage role
624                 - []
625           hash: { get_input: swift_hash_suffix }
626           part-power: { get_input: swift_part_power }
627           proxy-memcache:
628             list_join:
629             - ","
630             - {get_attr: [Controller, swift_proxy_memcache]}
631           replicas: {get_input: swift_replicas }
632           service-password: { get_input: swift_password }
633
634   ControllerClusterConfig:
635     type: OS::Heat::StructuredConfig
636     properties:
637       config:
638         corosync:
639           nodes: {get_attr: [Controller, corosync_node]}
640         horizon:
641           caches:
642             memcached:
643               nodes: {get_attr: [Controller, hostname]}
644         mysql:
645           nodes: {get_attr: [Controller, corosync_node]}
646         haproxy:
647           nodes: {get_attr: [Controller, corosync_node]}
648
649   ControllerClusterDeployment:
650     type: OS::Heat::StructuredDeployments
651     properties:
652       config: {get_resource: ControllerClusterConfig}
653       servers: {get_attr: [Controller, attributes, nova_server_resource]}
654       signal_transport: NO_SIGNAL
655
656   ControllerAllNodesDeployment:
657     type: OS::Heat::StructuredDeployments
658     properties:
659       config: {get_resource: allNodesConfig}
660       servers: {get_attr: [Controller, attributes, nova_server_resource]}
661
662   ComputeAllNodesDeployment:
663     type: OS::Heat::StructuredDeployments
664     properties:
665       config: {get_resource: allNodesConfig}
666       servers: {get_attr: [Compute, attributes, nova_server_resource]}
667
668
669 outputs:
670   KeystoneURL:
671     description: URL for the Overcloud Keystone service
672     value:
673       list_join:
674       - ''
675       - - http://
676         - {get_attr: [ControlVirtualIP, fixed_ips, 0, ip_address]}
677         - :5000/v2.0/