Add parameter to manage usage of Neutron l3_ha option
[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     description: Flavor for control nodes to request when deploying.
98     type: string
99     constraints:
100       - custom_constraint: nova.flavor
101   GlanceNotifierStrategy:
102     description: Strategy to use for Glance notification queue
103     type: string
104     default: noop
105   GlanceLogFile:
106     description: The filepath of the file to use for logging messages from Glance.
107     type: string
108     default: ''
109   GlancePassword:
110     default: unset
111     description: The password for the glance service account, used by the glance services.
112     type: string
113     hidden: true
114   GlancePort:
115     default: "9292"
116     description: Glance port.
117     type: string
118   GlanceProtocol:
119     default: http
120     description: Protocol to use when connecting to glance, set to https for SSL.
121     type: string
122   HeatPassword:
123     default: unset
124     description: The password for the Heat service account, used by the Heat services.
125     type: string
126     hidden: true
127   HeatStackDomainAdminPassword:
128     description: Password for heat_domain_admin user.
129     type: string
130     default: ''
131     hidden: true
132   Image:
133     type: string
134     default: overcloud-control
135     constraints:
136       - custom_constraint: glance.image
137   ImageUpdatePolicy:
138     default: 'REBUILD_PRESERVE_EPHEMERAL'
139     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
140     type: string
141   KeyName:
142     default: default
143     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
144     type: string
145     constraints:
146       - custom_constraint: nova.keypair
147   KeystoneCACertificate:
148     default: ''
149     description: Keystone self-signed certificate authority certificate.
150     type: string
151   KeystoneSigningCertificate:
152     default: ''
153     description: Keystone certificate for verifying token validity.
154     type: string
155   KeystoneSigningKey:
156     default: ''
157     description: Keystone key for signing tokens.
158     type: string
159     hidden: true
160   KeystoneSSLCertificate:
161     default: ''
162     description: Keystone certificate for verifying token validity.
163     type: string
164   KeystoneSSLCertificateKey:
165     default: ''
166     description: Keystone key for signing tokens.
167     type: string
168     hidden: true
169   MysqlClusterUniquePart:
170     description: A unique identifier of the MySQL cluster the controller is in.
171     type: string
172     default: 'unset'  # Has to be here because of the ignored empty value bug
173     # Drop the validation: https://bugs.launchpad.net/tripleo/+bug/1405446
174     # constraints:
175     # - length: {min: 4, max: 10}
176   MysqlInnodbBufferPoolSize:
177     description: >
178         Specifies the size of the buffer pool in megabytes. Setting to
179         zero should be interpreted as "no value" and will defer to the
180         lower level default.
181     type: number
182     default: 0
183   MysqlRootPassword:
184     type: string
185     hidden: true
186     default: ''  # Has to be here because of the ignored empty value bug
187   NeutronBridgeMappings:
188     description: >
189       The OVS logical->physical bridge mappings to use. See the Neutron
190       documentation for details. Defaults to mapping br-ex - the external
191       bridge on hosts - to a physical name 'datacentre' which can be used
192       to create provider networks (and we use this for the default floating
193       network) - if changing this either use different post-install network
194       scripts or be sure to keep 'datacentre' as a mapping network name.
195     type: string
196     default: ""
197   NeutronDnsmasqOptions:
198     default: 'dhcp-option-force=26,1400'
199     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.
200     type: string
201   NeutronAgentMode:
202     default: 'dvr_snat'
203     description: Agent mode for the neutron-l3-agent on the controller hosts
204     type: string
205   NeutronDVR:
206     default: 'False'
207     description: Whether to configure Neutron Distributed Virtual Routers
208     type: string
209   NeutronMetadataProxySharedSecret:
210     default: 'unset'
211     description: Shared secret to prevent spoofing
212     type: string
213   NeutronMechanismDrivers:
214     default: 'openvswitch'
215     description: |
216         The mechanism drivers for the Neutron tenant network. To specify multiple
217         values, use a comma separated string, like so: 'openvswitch,l2_population'
218     type: string
219   NeutronAllowL3AgentFailover:
220     default: 'True'
221     description: Allow automatic l3-agent failover
222     type: string
223   NeutronL3HA:
224     default: 'False'
225     description: Whether to enable l3-agent HA
226     type: string
227   NeutronEnableTunnelling:
228     type: string
229     default: "True"
230   NeutronFlatNetworks:
231     type: string
232     default: ''
233     description: If set, flat networks to configure in neutron plugins.
234   NeutronNetworkType:
235     default: 'gre'
236     description: The tenant network type for Neutron, either gre or vxlan.
237     type: string
238   NeutronNetworkVLANRanges:
239     default: 'datacentre'
240     description: >
241       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
242       Neutron documentation for permitted values. Defaults to permitting any
243       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
244     type: string
245   NeutronPassword:
246     default: unset
247     description: The password for the neutron service account, used by neutron agents.
248     type: string
249     hidden: true
250   NeutronPublicInterface:
251     default: nic1
252     description: What interface to bridge onto br-ex for network nodes.
253     type: string
254   NeutronPublicInterfaceTag:
255     default: ''
256     description: >
257       VLAN tag for creating a public VLAN. The tag will be used to
258       create an access port on the exterior bridge for each control plane node,
259       and that port will be given the IP address returned by neutron from the
260       public network. Set CONTROLEXTRA=overcloud-vlan-port.yaml when compiling
261       overcloud.yaml to include the deployment of VLAN ports to the control
262       plane.
263     type: string
264   NeutronPublicInterfaceDefaultRoute:
265     default: ''
266     description: A custom default route for the NeutronPublicInterface.
267     type: string
268   NeutronPublicInterfaceIP:
269     default: ''
270     description: A custom IP address to put onto the NeutronPublicInterface.
271     type: string
272   NeutronPublicInterfaceRawDevice:
273     default: ''
274     description: If set, the public interface is a vlan with this device as the raw device.
275     type: string
276   NeutronTunnelTypes:
277     default: 'gre'
278     description: |
279         The tunnel types for the Neutron tenant network. To specify multiple
280         values, use a comma separated string, like so: 'gre,vxlan'
281     type: string
282   NovaPassword:
283     default: unset
284     description: The password for the nova service account, used by nova-api.
285     type: string
286     hidden: true
287   NtpServer:
288     type: string
289     default: ''
290   PublicVirtualInterface:
291     default: 'br-ex'
292     description: >
293         Specifies the interface where the public-facing virtual ip will be assigned.
294         This should be int_public when a VLAN is being used.
295     type: string
296   PublicVirtualIP:
297     type: string
298     default: ''  # Has to be here because of the ignored empty value bug
299   RabbitCookie:
300     type: string
301     default: ''  # Has to be here because of the ignored empty value bug
302     hidden: true
303   RabbitPassword:
304     default: guest
305     description: The password for RabbitMQ
306     type: string
307     hidden: true
308   RabbitUserName:
309     default: guest
310     description: The username for RabbitMQ
311     type: string
312   RabbitClientUseSSL:
313     default: false
314     description: >
315         Rabbit client subscriber parameter to specify
316         an SSL connection to the RabbitMQ host.
317     type: string
318   RabbitClientPort:
319     default: 5672
320     description: Set rabbit subscriber port, change this if using SSL
321     type: number
322   SnmpdReadonlyUserName:
323     default: ro_snmp_user
324     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
325     type: string
326   SnmpdReadonlyUserPassword:
327     default: unset
328     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
329     type: string
330     hidden: true
331   SSLCACertificate:
332     default: ''
333     description: If set, the contents of an SSL certificate authority file.
334     type: string
335   SSLCertificate:
336     default: ''
337     description: If set, the contents of an SSL certificate .crt file for encrypting SSL endpoints.
338     type: string
339     hidden: true
340   SSLKey:
341     default: ''
342     description: If set, the contents of an SSL certificate .key file for encrypting SSL endpoints.
343     type: string
344     hidden: true
345   SwiftHashSuffix:
346     default: unset
347     description: A random string to be used as a salt when hashing to determine mappings
348       in the ring.
349     hidden: true
350     type: string
351   SwiftPartPower:
352     default: 10
353     description: Partition Power to use when building Swift rings
354     type: number
355   SwiftPassword:
356     default: unset
357     description: The password for the swift service account, used by the swift proxy
358       services.
359     hidden: true
360     type: string
361   SwiftReplicas:
362     type: number
363     default: 1
364     description: How many replicas to use in the swift rings.
365   VirtualIP:
366     type: string
367     default: ''  # Has to be here because of the ignored empty value bug
368
369
370 resources:
371
372   Controller:
373     type: OS::Nova::Server
374     properties:
375       image: {get_param: Image}
376       image_update_policy: {get_param: ImageUpdatePolicy}
377       flavor: {get_param: Flavor}
378       key_name: {get_param: KeyName}
379       networks:
380         - network: ctlplane
381       user_data_format: SOFTWARE_CONFIG
382
383   NetworkConfig:
384     type: OS::TripleO::Net::SoftwareConfig
385
386   NetworkDeployment:
387     type: OS::TripleO::SoftwareDeployment
388     properties:
389       signal_transport: NO_SIGNAL
390       config: {get_attr: [NetworkConfig, config_id]}
391       server: {get_resource: Controller}
392       input_values:
393         bridge_name: br-ex
394         interface_name: {get_param: NeutronPublicInterface}
395
396   ControllerConfig:
397     type: OS::TripleO::Controller::SoftwareConfig
398     properties:
399       # allow configs to create sub-resources attached to the controller
400       controller_id: {get_resource: Controller}
401
402   ControllerPassthroughConfig:
403     type: OS::Heat::StructuredConfig
404     properties:
405       group: os-apply-config
406       config: {get_input: passthrough_config}
407
408   ControllerPassthroughConfigSpecific:
409     type: OS::Heat::StructuredConfig
410     properties:
411       group: os-apply-config
412       config: {get_input: passthrough_config_specific}
413
414   ControllerDeployment:
415     type: OS::TripleO::SoftwareDeployment
416     properties:
417       signal_transport: NO_SIGNAL
418       config: {get_attr: [ControllerConfig, config_id]}
419       server: {get_resource: Controller}
420       input_values:
421         bootstack_nodeid: {get_attr: [Controller, name]}
422         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
423         controller_virtual_ip: {get_param: VirtualIP}
424         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
425         heat.watch_server_url:
426           list_join:
427             - ''
428             - - 'http://'
429               - {get_param: VirtualIP}
430               - ':8003'
431         heat.metadata_server_url:
432           list_join:
433             - ''
434             - - 'http://'
435               - {get_param: VirtualIP}
436               - ':8000'
437         heat.waitcondition_server_url:
438           list_join:
439             - ''
440             - - 'http://'
441               - {get_param: VirtualIP}
442               - ':8000/v1/waitcondition'
443         admin_password: {get_param: AdminPassword}
444         admin_token: {get_param: AdminToken}
445         neutron_public_interface_ip: {get_param: NeutronPublicInterfaceIP}
446         debug: {get_param: Debug}
447         cinder_lvm_loop_device_size: {get_param: CinderLVMLoopDeviceSize}
448         cinder_password: {get_param: CinderPassword}
449         cinder_iscsi_helper: {get_param: CinderISCSIHelper}
450         cinder_dsn:
451           list_join:
452             - ''
453             - - 'mysql://cinder:unset@'
454               - {get_param: VirtualIP}
455               - '/cinder'
456         glance_port: {get_param: GlancePort}
457         glance_protocol: {get_param: GlanceProtocol}
458         glance_password: {get_param: GlancePassword}
459         glance_notifier_strategy: {get_param: GlanceNotifierStrategy}
460         glance_log_file: {get_param: GlanceLogFile}
461         glance_dsn:
462           list_join:
463             - ''
464             - - 'mysql://glance:unset@'
465               - {get_param: VirtualIP}
466               - '/glance'
467         heat_password: {get_param: HeatPassword}
468         heat_stack_domain_admin_password: {get_param: HeatStackDomainAdminPassword}
469         heat_dsn:
470           list_join:
471             - ''
472             - - 'mysql://heat:unset@'
473               - {get_param: VirtualIP}
474               - '/heat'
475         keystone_ca_certificate: {get_param: KeystoneCACertificate}
476         keystone_signing_key: {get_param: KeystoneSigningKey}
477         keystone_signing_certificate: {get_param: KeystoneSigningCertificate}
478         keystone_ssl_certificate: {get_param: KeystoneSSLCertificate}
479         keystone_ssl_certificate_key: {get_param: KeystoneSSLCertificateKey}
480         keystone_dsn:
481           list_join:
482             - ''
483             - - 'mysql://keystone:unset@'
484               - {get_param: VirtualIP}
485               - '/keystone'
486         mysql_innodb_buffer_pool_size: {get_param: MysqlInnodbBufferPoolSize}
487         mysql_root_password: {get_param: MysqlRootPassword}
488         mysql_cluster_name:
489           str_replace:
490             template: tripleo-CLUSTER
491             params:
492               CLUSTER: {get_param: MysqlClusterUniquePart}
493         neutron_flat_networks: {get_param: NeutronFlatNetworks}
494         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
495         neutron_agent_mode: {get_param: NeutronAgentMode}
496         neutron_router_distributed: {get_param: NeutronDVR}
497         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
498         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
499         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
500         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
501         neutron_public_interface: {get_param: NeutronPublicInterface}
502         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
503         neutron_public_interface_default_route: {get_param: NeutronPublicInterfaceDefaultRoute}
504         neutron_public_interface_tag: {get_param: NeutronPublicInterfaceTag}
505         neutron_tenant_network_type: {get_param: NeutronNetworkType}
506         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
507         neutron_password: {get_param: NeutronPassword}
508         neutron_dnsmasq_options: {get_param: NeutronDnsmasqOptions}
509         neutron_dsn:
510           list_join:
511             - ''
512             - - 'mysql://neutron:unset@'
513               - {get_param: VirtualIP}
514               - '/ovs_neutron?charset=utf8'
515         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
516         ceilometer_password: {get_param: CeilometerPassword}
517         ceilometer_dsn:
518           list_join:
519             - ''
520             - - 'mysql://ceilometer:unset@'
521               - {get_param: VirtualIP}
522               - '/ceilometer'
523         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
524         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
525         nova_password: {get_param: NovaPassword}
526         nova_dsn:
527           list_join:
528             - ''
529             - - 'mysql://nova:unset@'
530               - {get_param: VirtualIP}
531               - '/nova'
532         rabbit_username: {get_param: RabbitUserName}
533         rabbit_password: {get_param: RabbitPassword}
534         rabbit_cookie: {get_param: RabbitCookie}
535         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
536         rabbit_client_port: {get_param: RabbitClientPort}
537         ntp_server: {get_param: NtpServer}
538         control_virtual_interface: {get_param: ControlVirtualInterface}
539         public_virtual_interface: {get_param: PublicVirtualInterface}
540         public_virtual_ip: {get_param: PublicVirtualIP}
541
542   SSLConfig:
543     type: OS::Heat::StructuredConfig
544     properties:
545       group: os-apply-config
546       config:
547         ssl:
548           ca_certificate: {get_input: ssl_ca_certificate}
549         stunnel:
550           cert: {get_input: ssl_certificate}
551           key: {get_input: ssl_key}
552           cacert: {get_input: ssl_ca_certificate}
553           ports:
554            - name: 'ec2'
555              accept: 13773
556              connect: 8773
557              connect_host: {get_input: controller_host}
558            - name: 'image'
559              accept: 13292
560              connect: 9292
561              connect_host: {get_input: controller_host}
562            - name: 'identity'
563              accept: 13000
564              connect: 5000
565              connect_host: {get_input: controller_host}
566            - name: 'network'
567              accept: 13696
568              connect: 9696
569              connect_host: {get_input: controller_host}
570            - name: 'compute'
571              accept: 13774
572              connect: 8774
573              connect_host: {get_input: controller_host}
574            - name: 'swift-proxy'
575              accept: 13080
576              connect: 8080
577              connect_host: {get_input: controller_host}
578            - name: 'cinder'
579              accept: 13776
580              connect: 8776
581              connect_host: {get_input: controller_host}
582            - name: 'ceilometer'
583              accept: 13777
584              connect: 8777
585              connect_host: {get_input: controller_host}
586
587   ControllerSSLDeployment:
588     type: OS::Heat::StructuredDeployment
589     properties:
590       config: {get_resource: SSLConfig}
591       server: {get_resource: Controller}
592       signal_transport: NO_SIGNAL
593       input_values:
594         controller_host: {get_attr: [Controller, networks, ctlplane, 0]}
595         ssl_certificate: {get_param: SSLCertificate}
596         ssl_key: {get_param: SSLKey}
597         ssl_ca_certificate: {get_param: SSLCACertificate}
598
599   ControllerPassthroughDeployment:
600     type: OS::Heat::StructuredDeployment
601     properties:
602       config: {get_resource: ControllerPassthroughConfig}
603       server: {get_resource: Controller}
604       signal_transport: NO_SIGNAL
605       input_values:
606         passthrough_config: {get_param: ExtraConfig}
607
608   ControllerPassthroughSpecificDeployment:
609     depends_on: [ControllerPassthroughDeployment]
610     type: OS::Heat::StructuredDeployment
611     properties:
612       config: {get_resource: ControllerPassthroughConfigSpecific}
613       server: {get_resource: Controller}
614       signal_transport: NO_SIGNAL
615       input_values:
616         passthrough_config_specific: {get_param: ControllerExtraConfig}
617
618   SwiftConfig:
619     type: OS::Heat::StructuredConfig
620     properties:
621       group: os-apply-config
622       config:
623         swift:
624           hash: { get_input: swift_hash_suffix }
625           part-power: { get_input: swift_part_power }
626           replicas: {get_input: swift_replicas }
627           service-password: { get_input: swift_password }
628
629   SwiftStorageDeploy:
630     type: OS::Heat::StructuredDeployment
631     properties:
632       server: {get_resource: Controller}
633       config: {get_resource: SwiftConfig}
634       signal_transport: NO_SIGNAL
635       input_values:
636         swift_hash_suffix: {get_param: SwiftHashSuffix}
637         swift_password: {get_param: SwiftPassword}
638         swift_part_power: {get_param: SwiftPartPower}
639         swift_replicas: { get_param: SwiftReplicas}
640
641 outputs:
642   ip_address:
643     description: IP address of the server in the ctlplane network
644     value: {get_attr: [Controller, networks, ctlplane, 0]}
645   hostname:
646     description: Hostname of the server
647     value: {get_attr: [Controller, name]}
648   corosync_node:
649     description: >
650       Node object in the format {ip: ..., name: ...} format that the corosync
651       element expects
652     value:
653       ip: {get_attr: [Controller, networks, ctlplane, 0]}
654       name: {get_attr: [Controller, name]}
655   hosts_entry:
656     description: >
657       Server's IP address and hostname in the /etc/hosts format
658     value:
659       str_replace:
660         template: IP HOST HOST.novalocal CLOUDNAME
661         params:
662           IP: {get_attr: [Controller, networks, ctlplane, 0]}
663           HOST: {get_attr: [Controller, name]}
664           CLOUDNAME: {get_param: CloudName}
665   nova_server_resource:
666     description: Heat resource handle for the Nova compute server
667     value:
668       {get_resource: Controller}
669   swift_device:
670     description: Swift device formatted for swift-ring-builder
671     value:
672       str_replace:
673         template: 'r1z1-IP:%PORT%/d1'
674         params:
675           IP: {get_attr: [Controller, networks, ctlplane, 0]}
676   swift_proxy_memcache:
677     description: Swift proxy-memcache value
678     value:
679       str_replace:
680         template: "IP:11211"
681         params:
682           IP: {get_attr: [Controller, networks, ctlplane, 0]}