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