459b7f75ecb654b4fa1411209aa3c059e3f67de3
[apex-tripleo-heat-templates.git] / controller.yaml
1 heat_template_version: 2014-10-16
2
3 description: >
4   OpenStack control plane node. Can be wrapped in a ResourceGroup for scaling.
5
6 parameters:
7   AdminPassword:
8     default: unset
9     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
10     type: string
11     hidden: true
12   AdminToken:
13     default: unset
14     description: The keystone auth secret.
15     type: string
16     hidden: true
17   CeilometerMeteringSecret:
18     default: unset
19     description: Secret shared by the ceilometer services.
20     type: string
21     hidden: true
22   CeilometerPassword:
23     default: unset
24     description: The password for the ceilometer service account.
25     type: string
26     hidden: true
27   CinderISCSIHelper:
28     default: tgtadm
29     description: The iSCSI helper to use with cinder.
30     type: string
31   CinderLVMLoopDeviceSize:
32     default: 5000
33     description: The size of the loopback file used by the cinder LVM driver.
34     type: number
35   CinderPassword:
36     default: unset
37     description: The password for the cinder service account, used by cinder-api.
38     type: string
39     hidden: true
40   CloudName:
41     default: ''
42     description: The DNS name of this cloud. E.g. ci-overcloud.tripleo.org
43     type: string
44   ControllerExtraConfig:
45     default: {}
46     description: |
47       Controller specific configuration to inject into the cluster. Same
48       structure as ExtraConfig.
49     type: json
50   ControlVirtualInterface:
51     default: 'br-ex'
52     description: Interface where virtual ip will be assigned.
53     type: string
54   Debug:
55     default: ''
56     description: Set to True to enable debugging on all services.
57     type: string
58   ExtraConfig:
59     default: {}
60     description: |
61       Additional configuration to inject into the cluster. The JSON should have
62       the following structure:
63         {"FILEKEY":
64           {"config":
65             [{"section": "SECTIONNAME",
66               "values":
67                 [{"option": "OPTIONNAME",
68                   "value": "VALUENAME"
69                  }
70                 ]
71              }
72             ]
73           }
74         }
75       For instance:
76         {"nova":
77           {"config":
78             [{"section": "default",
79               "values":
80                 [{"option": "compute_manager",
81                   "value": "ironic.nova.compute.manager.ClusterComputeManager"
82                  }
83                 ]
84              },
85              {"section": "cells",
86               "values":
87                 [{"option": "driver",
88                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
89                  }
90                 ]
91              }
92             ]
93           }
94         }
95     type: json
96   Flavor:
97     default: baremetal
98     description: Flavor for control nodes to request when deploying.
99     type: string
100   GlanceNotifierStrategy:
101     description: Strategy to use for Glance notification queue
102     type: string
103     default: noop
104   GlanceLogFile:
105     description: The filepath of the file to use for logging messages from Glance.
106     type: string
107     default: ''
108   GlancePassword:
109     default: unset
110     description: The password for the glance service account, used by the glance services.
111     type: string
112     hidden: true
113   GlancePort:
114     default: "9292"
115     description: Glance port.
116     type: string
117   GlanceProtocol:
118     default: http
119     description: Protocol to use when connecting to glance, set to https for SSL.
120     type: string
121   HeatPassword:
122     default: unset
123     description: The password for the Heat service account, used by the Heat services.
124     type: string
125     hidden: true
126   HeatStackDomainAdminPassword:
127     description: Password for heat_domain_admin user.
128     type: string
129     default: ''
130     hidden: true
131   Image:
132     type: string
133     default: overcloud-control
134   ImageUpdatePolicy:
135     default: 'REBUILD_PRESERVE_EPHEMERAL'
136     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
137     type: string
138   KeyName:
139     default: default
140     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
141     type: string
142   KeystoneCACertificate:
143     default: ''
144     description: Keystone self-signed certificate authority certificate.
145     type: string
146   KeystoneSigningCertificate:
147     default: ''
148     description: Keystone certificate for verifying token validity.
149     type: string
150   KeystoneSigningKey:
151     default: ''
152     description: Keystone key for signing tokens.
153     type: string
154     hidden: true
155   MysqlClusterUniquePart:
156     description: A unique identifier of the MySQL cluster the controller is in.
157     type: string
158     default: 'unset'  # Has to be here because of the ignored empty value bug
159     constraints:
160     - length: {min: 4, max: 10}
161   MysqlInnodbBufferPoolSize:
162     description: >
163         Specifies the size of the buffer pool in megabytes. Setting to
164         zero should be interpreted as "no value" and will defer to the
165         lower level default.
166     type: number
167     default: 0
168   MysqlRootPassword:
169     type: string
170     hidden: true
171     default: ''  # Has to be here because of the ignored empty value bug
172   NeutronBridgeMappings:
173     description: >
174       The OVS logical->physical bridge mappings to use. See the Neutron
175       documentation for details. Defaults to mapping br-ex - the external
176       bridge on hosts - to a physical name 'datacentre' which can be used
177       to create provider networks (and we use this for the default floating
178       network) - if changing this either use different post-install network
179       scripts or be sure to keep 'datacentre' as a mapping network name.
180     type: string
181     default: ""
182   NeutronDnsmasqOptions:
183     default: 'dhcp-option-force=26,1400'
184     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.
185     type: string
186   NeutronEnableTunnelling:
187     type: string
188     default: "True"
189   NeutronFlatNetworks:
190     type: string
191     default: ''
192     description: If set, flat networks to configure in neutron plugins.
193   NeutronNetworkType:
194     default: 'gre'
195     description: The tenant network type for Neutron, either gre or vxlan.
196     type: string
197   NeutronNetworkVLANRanges:
198     default: 'datacentre'
199     description: >
200       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
201       Neutron documentation for permitted values. Defaults to permitting any
202       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
203     type: string
204   NeutronPassword:
205     default: unset
206     description: The password for the neutron service account, used by neutron agents.
207     type: string
208     hidden: true
209   NeutronPublicInterface:
210     default: eth0
211     description: What interface to bridge onto br-ex for network nodes.
212     type: string
213   NeutronPublicInterfaceTag:
214     default: ''
215     description: >
216       VLAN tag for creating a public VLAN. The tag will be used to
217       create an access port on the exterior bridge for each control plane node,
218       and that port will be given the IP address returned by neutron from the
219       public network. Set CONTROLEXTRA=overcloud-vlan-port.yaml when compiling
220       overcloud.yaml to include the deployment of VLAN ports to the control
221       plane.
222     type: string
223   NeutronPublicInterfaceDefaultRoute:
224     default: ''
225     description: A custom default route for the NeutronPublicInterface.
226     type: string
227   NeutronPublicInterfaceIP:
228     default: ''
229     description: A custom IP address to put onto the NeutronPublicInterface.
230     type: string
231   NeutronPublicInterfaceRawDevice:
232     default: ''
233     description: If set, the public interface is a vlan with this device as the raw device.
234     type: string
235   NeutronTunnelTypes:
236     default: 'gre'
237     description: |
238         The tunnel types for the Neutron tenant network. To specify multiple
239         values, use a comma separated string, like so: 'gre,vxlan'
240     type: string
241   NovaPassword:
242     default: unset
243     description: The password for the nova service account, used by nova-api.
244     type: string
245     hidden: true
246   NtpServer:
247     type: string
248     default: ''
249   PublicVirtualInterface:
250     default: 'br-ex'
251     description: >
252         Specifies the interface where the public-facing virtual ip will be assigned.
253         This should be int_public when a VLAN is being used.
254     type: string
255   PublicVirtualIP:
256     type: string
257     default: ''  # Has to be here because of the ignored empty value bug
258   RabbitCookie:
259     type: string
260     default: ''  # Has to be here because of the ignored empty value bug
261     hidden: true
262   RabbitPassword:
263     default: guest
264     description: The password for RabbitMQ
265     type: string
266     hidden: true
267   RabbitUserName:
268     default: guest
269     description: The username for RabbitMQ
270     type: string
271   SnmpdReadonlyUserName:
272     default: ro_snmp_user
273     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
274     type: string
275   SnmpdReadonlyUserPassword:
276     default: unset
277     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
278     type: string
279     hidden: true
280   SSLCACertificate:
281     default: ''
282     description: If set, the contents of an SSL certificate authority file.
283     type: string
284   SSLCertificate:
285     default: ''
286     description: If set, the contents of an SSL certificate .crt file for encrypting SSL endpoints.
287     type: string
288     hidden: true
289   SSLKey:
290     default: ''
291     description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints.
292     type: string
293     hidden: true
294   SwiftHashSuffix:
295     default: unset
296     description: A random string to be used as a salt when hashing to determine mappings
297       in the ring.
298     hidden: true
299     type: string
300   SwiftPartPower:
301     default: 10
302     description: Partition Power to use when building Swift rings
303     type: number
304   SwiftPassword:
305     default: unset
306     description: The password for the swift service account, used by the swift proxy
307       services.
308     hidden: true
309     type: string
310   SwiftReplicas:
311     type: number
312     default: 1
313     description: How many replicas to use in the swift rings.
314   VirtualIP:
315     type: string
316     default: ''  # Has to be here because of the ignored empty value bug
317
318
319 resources:
320
321   Controller:
322     type: OS::Nova::Server
323     properties:
324       image: {get_param: Image}
325       image_update_policy: {get_param: ImageUpdatePolicy}
326       flavor: {get_param: Flavor}
327       key_name: {get_param: KeyName}
328       networks:
329         - network: ctlplane
330       user_data_format: SOFTWARE_CONFIG
331
332   ControllerConfig:
333     type: OS::Heat::StructuredConfig
334     properties:
335       group: os-apply-config
336       config:
337         admin-password: {get_param: AdminPassword}
338         admin-token: {get_param: AdminToken}
339         bootstack:
340           public_interface_ip: {get_param: NeutronPublicInterfaceIP}
341         bootstrap_host:
342           nodeid: {get_input: bootstack_nodeid}
343         database:
344           host: &database_host
345             {get_param: VirtualIP}
346         cinder:
347           db:
348             list_join:
349               - ''
350               - - mysql://cinder:unset@
351                 - *database_host
352                 - /cinder
353           debug: {get_param: Debug}
354           volume_size_mb: {get_param: CinderLVMLoopDeviceSize}
355           service-password: {get_param: CinderPassword}
356           iscsi-helper: {get_param: CinderISCSIHelper}
357         controller-address: {get_input: controller_host}
358         corosync:
359           bindnetaddr: {get_input: controller_host}
360           mcastport: 5577
361         pacemaker:
362           stonith_enabled : false
363           recheck_interval : 5
364           quorum_policy : ignore
365         db-password: unset
366         glance:
367           registry:
368             host: {get_input: controller_virtual_ip}
369           backend: swift
370           db:
371             list_join:
372               - ''
373               - - mysql://glance:unset@
374                 - *database_host
375                 - /glance
376           debug: {get_param: Debug}
377           host: {get_input: controller_virtual_ip}
378           port: {get_param: GlancePort}
379           protocol: {get_param: GlanceProtocol}
380           service-password: {get_param: GlancePassword}
381           swift-store-user: service:glance
382           swift-store-key: {get_param: GlancePassword}
383           notifier-strategy: {get_param: GlanceNotifierStrategy}
384           log-file: {get_param: GlanceLogFile}
385         heat:
386           admin_password: {get_param: HeatPassword}
387           admin_tenant_name: service
388           admin_user: heat
389           auth_encryption_key: unset___________
390           db:
391             list_join:
392               - ''
393               - - mysql://heat:unset@
394                 - *database_host
395                 - /heat
396           debug: {get_param: Debug}
397           stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
398           watch_server_url: {get_input: heat.watch_server_url}
399           metadata_server_url: {get_input: heat.metadata_server_url}
400           waitcondition_server_url: {get_input: heat.waitcondition_server_url}
401         keystone:
402           db:
403             list_join:
404               - ''
405               - - mysql://keystone:unset@
406                 - *database_host
407                 - /keystone
408           debug: {get_param: Debug}
409           host: {get_input: controller_virtual_ip}
410           ca_certificate: {get_param: KeystoneCACertificate}
411           signing_key: {get_param: KeystoneSigningKey}
412           signing_certificate: {get_param: KeystoneSigningCertificate}
413         mysql:
414           innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
415           local_bind: true
416           root-password: {get_param: MysqlRootPassword}
417           cluster_name:
418             str_replace:
419               template: tripleo-CLUSTER
420               params:
421                 CLUSTER: {get_param: MysqlClusterUniquePart}
422         neutron:
423           debug: {get_param: Debug}
424           flat-networks: {get_param: NeutronFlatNetworks}
425           host: {get_input: controller_virtual_ip}
426           metadata_proxy_shared_secret: unset
427           ovs:
428             enable_tunneling: {get_input: neutron_enable_tunneling}
429             local_ip: {get_input: controller_host}
430             network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
431             bridge_mappings: {get_param: NeutronBridgeMappings}
432             public_interface: {get_param: NeutronPublicInterface}
433             public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
434             public_interface_route: {get_param: NeutronPublicInterfaceDefaultRoute}
435             public_interface_tag: {get_param: NeutronPublicInterfaceTag}
436             physical_bridge: br-ex
437             tenant_network_type: {get_param: NeutronNetworkType}
438             tunnel_types: {get_param: NeutronTunnelTypes}
439           ovs_db:
440             list_join:
441               - ''
442               - - mysql://neutron:unset@
443                 - *database_host
444                 - /ovs_neutron?charset=utf8
445           service-password: {get_param: NeutronPassword}
446           dnsmasq-options: {get_param: NeutronDnsmasqOptions}
447         ceilometer:
448           db:
449             list_join:
450               - ''
451               - - mysql://ceilometer:unset@
452                 - *database_host
453                 - /ceilometer
454           debug: {get_param: Debug}
455           metering_secret: {get_param: CeilometerMeteringSecret}
456           service-password: {get_param: CeilometerPassword}
457         snmpd:
458           export_MIB: UCD-SNMP-MIB
459           readonly_user_name: {get_param: SnmpdReadonlyUserName}
460           readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
461         nova:
462           compute_driver: libvirt.LibvirtDriver
463           db:
464             list_join:
465               - ''
466               - - mysql://nova:unset@
467                 - *database_host
468                 - /nova
469           default_floating_pool:
470             ext-net
471           host: {get_input: controller_virtual_ip}
472           metadata-proxy: true
473           service-password: {get_param: NovaPassword}
474         rabbit:
475           host: {get_input: controller_virtual_ip}
476           username: {get_param: RabbitUserName}
477           password: {get_param: RabbitPassword}
478           cookie: {get_param: RabbitCookie}
479         ntp:
480           servers:
481               - {server: {get_param: NtpServer}, fudge: "stratum 0"}
482         virtual_interfaces:
483           instances:
484             - vrrp_instance_name: VI_CONTROL
485               virtual_router_id: 51
486               keepalive_interface: {get_param: ControlVirtualInterface}
487               priority: 101
488               virtual_ips:
489               - ip: {get_param: VirtualIP}
490                 interface: {get_param: ControlVirtualInterface}
491             - vrrp_instance_name: VI_PUBLIC
492               virtual_router_id: 52
493               keepalive_interface: {get_param: PublicVirtualInterface}
494               priority: 101
495               virtual_ips:
496               - ip: {get_param: PublicVirtualIP}
497                 interface: {get_param: PublicVirtualInterface}
498           vrrp_sync_groups:
499             - name: VG1
500               members:
501                 - VI_CONTROL
502                 - VI_PUBLIC
503         keepalived:
504           keepalive_interface: {get_param: PublicVirtualInterface}
505           priority: 101
506         virtual_ips:
507             -
508               ip: {get_param: VirtualIP}
509               interface: {get_param: ControlVirtualInterface}
510             -
511               ip: {get_param: PublicVirtualIP}
512               interface: {get_param: PublicVirtualInterface}
513         haproxy:
514           net_binds:
515             - ip: {get_param: VirtualIP}
516           services:
517             - name: keystone_admin
518               port: 35357
519               net_binds: &public_binds
520                 - ip: {get_param: VirtualIP}
521                 - ip: {get_param: PublicVirtualIP}
522             - name: keystone_public
523               port: 5000
524               net_binds: *public_binds
525             - name: horizon
526               port: 80
527               net_binds: *public_binds
528             - name: neutron
529               port: 9696
530               net_binds: *public_binds
531             - name: cinder
532               port: 8776
533               net_binds: *public_binds
534             - name: glance_api
535               port: 9292
536               net_binds: *public_binds
537             - name: glance_registry
538               port: 9191
539               net_binds: *public_binds
540             - name: heat_api
541               port: 8004
542               net_binds: *public_binds
543             - name: heat_cloudwatch
544               port: 8003
545               net_binds: *public_binds
546             - name: heat_cfn
547               port: 8000
548               net_binds: *public_binds
549             - name: mysql
550               port: 3306
551               extra_server_params:
552                 - backup
553               options:
554                 - timeout client 0
555                 - timeout server 0
556             - name: nova_ec2
557               port: 8773
558             - name: nova_osapi
559               port: 8774
560               net_binds: *public_binds
561             - name: nova_metadata
562               port: 8775
563               net_binds: *public_binds
564             - name: ceilometer
565               port: 8777
566               net_binds: *public_binds
567             - name: swift_proxy_server
568               port: 8080
569               net_binds: *public_binds
570             - name: rabbitmq
571               port: 5672
572               options:
573                 - timeout client 0
574                 - timeout server 0
575
576   ControllerPassthroughConfig:
577     type: OS::Heat::StructuredConfig
578     properties:
579       group: os-apply-config
580       config: {get_input: passthrough_config}
581
582   ControllerPassthroughConfigSpecific:
583     type: OS::Heat::StructuredConfig
584     properties:
585       group: os-apply-config
586       config: {get_input: passthrough_config_specific}
587
588   ControllerDeployment:
589     type: OS::Heat::StructuredDeployment
590     properties:
591       signal_transport: NO_SIGNAL
592       config: {get_resource: ControllerConfig}
593       server: {get_resource: Controller}
594       input_values:
595         bootstack_nodeid: {get_attr: [Controller, name]}
596         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
597         controller_virtual_ip: {get_param: VirtualIP}
598         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
599         heat.watch_server_url:
600           list_join:
601             - ''
602             - - 'http://'
603               - {get_param: VirtualIP}
604               - ':8003'
605         heat.metadata_server_url:
606           list_join:
607             - ''
608             - - 'http://'
609               - {get_param: VirtualIP}
610               - ':8000'
611         heat.waitcondition_server_url:
612           list_join:
613             - ''
614             - - 'http://'
615               - {get_param: VirtualIP}
616               - ':8000/v1/waitcondition'
617
618   SSLConfig:
619     type: OS::Heat::StructuredConfig
620     properties:
621       group: os-apply-config
622       config:
623         ssl:
624           ca_certificate: {get_input: ssl_ca_certificate}
625         stunnel:
626           cert: {get_input: ssl_certificate}
627           key: {get_input: ssl_key}
628           cacert: {get_input: ssl_ca_certificate}
629           ports:
630            - name: 'ec2'
631              accept: 13773
632              connect: 8773
633              connect_host: {get_input: controller_host}
634            - name: 'image'
635              accept: 13292
636              connect: 9292
637              connect_host: {get_input: controller_host}
638            - name: 'identity'
639              accept: 13000
640              connect: 5000
641              connect_host: {get_input: controller_host}
642            - name: 'network'
643              accept: 13696
644              connect: 9696
645              connect_host: {get_input: controller_host}
646            - name: 'compute'
647              accept: 13774
648              connect: 8774
649              connect_host: {get_input: controller_host}
650            - name: 'swift-proxy'
651              accept: 13080
652              connect: 8080
653              connect_host: {get_input: controller_host}
654            - name: 'cinder'
655              accept: 13776
656              connect: 8776
657              connect_host: {get_input: controller_host}
658            - name: 'ceilometer'
659              accept: 13777
660              connect: 8777
661              connect_host: {get_input: controller_host}
662
663   ControllerSSLDeployment:
664     type: OS::Heat::StructuredDeployment
665     properties:
666       config: {get_resource: SSLConfig}
667       server: {get_resource: Controller}
668       signal_transport: NO_SIGNAL
669       input_values:
670         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
671         ssl_certificate: {get_param: SSLCertificate}
672         ssl_key: {get_param: SSLKey}
673         ssl_ca_certificate: {get_param: SSLCACertificate}
674
675   ControllerPassthroughDeployment:
676     type: OS::Heat::StructuredDeployment
677     properties:
678       config: {get_resource: ControllerPassthroughConfig}
679       server: {get_resource: Controller}
680       signal_transport: NO_SIGNAL
681       input_values:
682         passthrough_config: {get_param: ExtraConfig}
683
684   ControllerPassthroughSpecificDeployment:
685     depends_on: [ControllerPassthroughDeployment]
686     type: OS::Heat::StructuredDeployment
687     properties:
688       config: {get_resource: ControllerPassthroughConfigSpecific}
689       server: {get_resource: Controller}
690       signal_transport: NO_SIGNAL
691       input_values:
692         passthrough_config_specific: {get_param: ControllerExtraConfig}
693
694   SwiftConfig:
695     type: OS::Heat::StructuredConfig
696     properties:
697       group: os-apply-config
698       config:
699         swift:
700           hash: { get_input: swift_hash_suffix }
701           part-power: { get_input: swift_part_power }
702           replicas: {get_input: swift_replicas }
703           service-password: { get_input: swift_password }
704
705   SwiftStorageDeploy:
706     type: OS::Heat::StructuredDeployment
707     properties:
708       server: {get_resource: Controller}
709       config: {get_resource: SwiftConfig}
710       signal_transport: NO_SIGNAL
711       input_values:
712         swift_hash_suffix: {get_param: SwiftHashSuffix}
713         swift_password: {get_param: SwiftPassword}
714         swift_part_power: {get_param: SwiftPartPower}
715         swift_replicas: { get_param: SwiftReplicas}
716
717 outputs:
718   ip_address:
719     description: IP address of the server in the ctlplane network
720     value: {get_attr: [Controller, networks, ctlplane, 0]}
721   hostname:
722     description: Hostname of the server
723     value: {get_attr: [Controller, name]}
724   corosync_node:
725     description: >
726       Node object in the format {ip: ..., name: ...} format that the corosync
727       element expects
728     value:
729       ip: {get_attr: [Controller, networks, ctlplane, 0]}
730       name: {get_attr: [Controller, name]}
731   hosts_entry:
732     description: >
733       Server's IP address and hostname in the /etc/hosts format
734     value:
735       str_replace:
736         template: IP HOST HOST.novalocal CLOUDNAME
737         params:
738           IP: {get_attr: [Controller, networks, ctlplane, 0]}
739           HOST: {get_attr: [Controller, name]}
740           CLOUDNAME: {get_param: CloudName}
741   nova_server_resource:
742     description: Heat resource handle for the Nova compute server
743     value:
744       {get_resource: Controller}
745   swift_device:
746     description: Swift device formatted for swift-ring-builder
747     value:
748       str_replace:
749         template: 'r1z1-IP:%PORT%/d1'
750         params:
751           IP: {get_attr: [Controller, networks, ctlplane, 0]}
752   swift_proxy_memcache:
753     description: Swift proxy-memcache value
754     value:
755       str_replace:
756         template: "IP:11211"
757         params:
758           IP: {get_attr: [Controller, networks, ctlplane, 0]}