Merge "Set rabbitmq heatbeat timeout threshold to 60"
[apex-tripleo-heat-templates.git] / compute.yaml
1 heat_template_version: 2015-04-30
2
3 description: >
4   OpenStack hypervisor 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   CeilometerComputeAgent:
13     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
14     type: string
15     default: ''
16     constraints:
17     - allowed_values: ['', Present]
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   CinderEnableNfsBackend:
29     default: false
30     description: Whether to enable or not the NFS backend for Cinder
31     type: boolean
32   Debug:
33     default: ''
34     description: Set to True to enable debugging on all services.
35     type: string
36   ExtraConfig:
37     default: {}
38     description: |
39       Additional configuration to inject into the cluster. The JSON should have
40       the following structure:
41         {"FILEKEY":
42           {"config":
43             [{"section": "SECTIONNAME",
44               "values":
45                 [{"option": "OPTIONNAME",
46                   "value": "VALUENAME"
47                  }
48                 ]
49              }
50             ]
51           }
52         }
53       For instance:
54         {"nova":
55           {"config":
56             [{"section": "default",
57               "values":
58                 [{"option": "force_config_drive",
59                   "value": "always"
60                  }
61                 ]
62              },
63              {"section": "cells",
64               "values":
65                 [{"option": "driver",
66                   "value": "nova.cells.rpc_driver.CellsRPCDriver"
67                  }
68                 ]
69              }
70             ]
71           }
72         }
73     type: json
74   Flavor:
75     description: Flavor for the nova compute node
76     type: string
77     constraints:
78       - custom_constraint: nova.flavor
79   GlanceHost:
80     type: string
81     default: ''  # Has to be here because of the ignored empty value bug
82   GlancePort:
83     default: "9292"
84     description: Glance port.
85     type: string
86   GlanceProtocol:
87     default: http
88     description: Protocol to use when connecting to glance, set to https for SSL.
89     type: string
90   Image:
91     type: string
92     default: overcloud-compute
93     constraints:
94       - custom_constraint: glance.image
95   ImageUpdatePolicy:
96     default: 'REBUILD_PRESERVE_EPHEMERAL'
97     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
98     type: string
99   KeyName:
100     description: Name of an existing EC2 KeyPair to enable SSH access to the instances
101     type: string
102     default: default
103     constraints:
104       - custom_constraint: nova.keypair
105   KeystoneHost:
106     type: string
107     default: ''
108   NeutronBridgeMappings:
109     description: >
110       The OVS logical->physical bridge mappings to use. See the Neutron
111       documentation for details. Defaults to mapping br-ex - the external
112       bridge on hosts - to a physical name 'datacentre' which can be used
113       to create provider networks (and we use this for the default floating
114       network) - if changing this either use different post-install network
115       scripts or be sure to keep 'datacentre' as a mapping network name.
116     type: string
117     default: "datacentre:br-ex"
118   NeutronEnableTunnelling:
119     type: string
120     default: "True"
121   NeutronFlatNetworks:
122     type: string
123     default: 'datacentre'
124     description: >
125       If set, flat networks to configure in neutron plugins.
126   NeutronHost:
127     type: string
128     default: ''  # Has to be here because of the ignored empty value bug
129   NeutronNetworkType:
130     type: string
131     description: The tenant network type for Neutron, either gre or vxlan.
132     default: 'gre'
133   NeutronNetworkVLANRanges:
134     default: 'datacentre'
135     description: >
136       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
137       Neutron documentation for permitted values. Defaults to permitting any
138       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
139     type: comma_delimited_list
140   NeutronPassword:
141     default: unset
142     description: The password for the neutron service account, used by neutron agents.
143     type: string
144     hidden: true
145   NeutronPhysicalBridge:
146     default: ''
147     description: An OVS bridge to create for accessing external networks.
148     type: string
149   NeutronPublicInterface:
150     default: nic1
151     description: A port to add to the NeutronPhysicalBridge.
152     type: string
153   NeutronTunnelTypes:
154     type: string
155     description: |
156         The tunnel types for the Neutron tenant network. To specify multiple
157         values, use a comma separated string, like so: 'gre,vxlan'
158     default: 'gre'
159   NeutronTunnelIdRanges:
160     description: |
161         Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges
162         of GRE tunnel IDs that are available for tenant network allocation
163     default: ["1:1000", ]
164     type: comma_delimited_list
165   NeutronVniRanges:
166     description: |
167         Comma-separated list of <vni_min>:<vni_max> tuples enumerating ranges
168         of VXLAN VNI IDs that are available for tenant network allocation
169     default: ["1:1000", ]
170     type: comma_delimited_list
171   NeutronPublicInterfaceRawDevice:
172     default: ''
173     type: string
174   NeutronDVR:
175     default: 'False'
176     type: string
177   NeutronMetadataProxySharedSecret:
178     default: 'unset'
179     description: Shared secret to prevent spoofing
180     type: string
181   NeutronMechanismDrivers:
182     default: 'openvswitch'
183     description: |
184         The mechanism drivers for the Neutron tenant network. To specify multiple
185         values, use a comma separated string, like so: 'openvswitch,l2_population'
186     type: string
187   # Not relevant for Computes, should be removed
188   NeutronAllowL3AgentFailover:
189     default: 'True'
190     description: Allow automatic l3-agent failover
191     type: string
192   # Not relevant for Computes, should be removed
193   NeutronL3HA:
194     default: 'False'
195     description: Whether to enable l3-agent HA
196     type: string
197   NeutronAgentMode:
198     default: 'dvr_snat'
199     description: Agent mode for the neutron-l3-agent on the controller hosts
200     type: string
201   NovaApiHost:
202     type: string
203     default: ''  # Has to be here because of the ignored empty value bug
204   NovaComputeDriver:
205     type: string
206     default: libvirt.LibvirtDriver
207   NovaComputeExtraConfig:
208     default: {}
209     description: |
210       NovaCompute specific configuration to inject into the cluster. Same
211       structure as ExtraConfig.
212     type: json
213   NovaComputeLibvirtType:
214     type: string
215     default: ''
216   NovaEnableRbdBackend:
217     default: false
218     description: Whether to enable or not the Rbd backend for Nova
219     type: boolean
220   NovaPassword:
221     default: unset
222     description: The password for the nova service account, used by nova-api.
223     type: string
224     hidden: true
225   NovaPublicIP:
226     type: string
227     default: ''  # Has to be here because of the ignored empty value bug
228   NtpServer:
229     type: string
230     default: ''
231   RabbitHost:
232     type: string
233     default: ''  # Has to be here because of the ignored empty value bug
234   RabbitPassword:
235     default: guest
236     description: The password for RabbitMQ
237     type: string
238     hidden: true
239   RabbitUserName:
240     default: guest
241     description: The username for RabbitMQ
242     type: string
243   RabbitClientUseSSL:
244     default: false
245     description: >
246         Rabbit client subscriber parameter to specify
247         an SSL connection to the RabbitMQ host.
248     type: string
249   RabbitClientPort:
250     default: 5672
251     description: Set rabbit subscriber port, change this if using SSL
252     type: number
253   SnmpdReadonlyUserName:
254     default: ro_snmp_user
255     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
256     type: string
257   SnmpdReadonlyUserPassword:
258     default: unset
259     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
260     type: string
261     hidden: true
262   ServiceNetMap:
263     default: {}
264     description: Mapping of service_name -> network name. Typically set
265                  via parameter_defaults in the resource registry.
266     type: json
267   UpdateIdentifier:
268     default: ''
269     type: string
270     description: >
271       Setting to a previously unused value during stack-update will trigger
272       package update on all nodes
273   Hostname:
274     type: string
275     default: '' # Defaults to Heat created hostname
276
277 resources:
278
279   NovaCompute:
280     type: OS::Nova::Server
281     properties:
282       image:
283         {get_param: Image}
284       image_update_policy:
285         get_param: ImageUpdatePolicy
286       flavor: {get_param: Flavor}
287       key_name: {get_param: KeyName}
288       networks:
289         - network: ctlplane
290       user_data_format: SOFTWARE_CONFIG
291       user_data: {get_resource: NodeUserData}
292       name: {get_param: Hostname}
293
294   NodeUserData:
295     type: OS::TripleO::NodeUserData
296
297   InternalApiPort:
298     type: OS::TripleO::Compute::Ports::InternalApiPort
299     properties:
300       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
301
302   StoragePort:
303     type: OS::TripleO::Compute::Ports::StoragePort
304     properties:
305       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
306
307   TenantPort:
308     type: OS::TripleO::Compute::Ports::TenantPort
309     properties:
310       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
311
312   NetworkConfig:
313     type: OS::TripleO::Compute::Net::SoftwareConfig
314     properties:
315       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
316       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
317       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
318
319   NetworkDeployment:
320     type: OS::TripleO::SoftwareDeployment
321     properties:
322       signal_transport: NO_SIGNAL
323       config: {get_resource: NetworkConfig}
324       server: {get_resource: NovaCompute}
325       input_values:
326         bridge_name: {get_param: NeutronPhysicalBridge}
327         interface_name: {get_param: NeutronPublicInterface}
328
329   NovaComputeConfig:
330     type: OS::Heat::StructuredConfig
331     properties:
332       group: os-apply-config
333       config:
334         nova:
335           compute_driver: { get_input: nova_compute_driver }
336           compute_libvirt_type: { get_input: nova_compute_libvirt_type }
337           debug: {get_input: debug}
338           host: {get_input: nova_api_host}
339           public_ip: {get_input: nova_public_ip}
340           service-password: {get_input: nova_password}
341         ceilometer:
342           debug: {get_input: debug}
343           metering_secret: {get_input: ceilometer_metering_secret}
344           service-password: {get_input: ceilometer_password}
345           compute_agent: {get_input: ceilometer_compute_agent}
346         snmpd:
347           export_MIB: UCD-SNMP-MIB
348           readonly_user_name: {get_input: snmpd_readonly_user_name}
349           readonly_user_password: {get_input: snmpd_readonly_user_password}
350         glance:
351           debug: {get_input: debug}
352           host: {get_input: glance_host}
353           port: {get_input: glance_port}
354           protocol: {get_input: glance_protocol}
355         keystone:
356           debug: {get_input: debug}
357           host: {get_input: keystone_host}
358         neutron:
359           debug: {get_input: debug}
360           flat-networks: {get_input: neutron_flat_networks}
361           host: {get_input: neutron_host}
362           router_distributed: {get_input: neutron_router_distributed}
363           agent_mode: {get_input: neutron_agent_mode}
364           ovs_db: {get_input: neutron_dsn}
365           metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
366           mechanism_drivers: {get_input: neutron_mechanism_drivers}
367           allow_automatic_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
368           l3_ha: {get_input: neutron_l3_ha}
369           ovs:
370             local_ip: {get_input: neutron_local_ip}
371             tenant_network_type: {get_input: neutron_tenant_network_type}
372             tunnel_types: {get_input: neutron_tunnel_types}
373             network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
374             tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges}
375             vni_ranges: {get_input: neutron_vni_ranges}
376             bridge_mappings: {get_input: neutron_bridge_mappings}
377             enable_tunneling: {get_input: neutron_enable_tunneling}
378             physical_bridge: {get_input: neutron_physical_bridge}
379             public_interface: {get_input: neutron_public_interface}
380             public_interface_raw_device: {get_input: neutron_public_interface_raw_device}
381           service-password: {get_input: neutron_password}
382         admin-password: {get_input: admin_password}
383         rabbit:
384           host: {get_input: rabbit_host}
385           username: {get_input: rabbit_username}
386           password: {get_input: rabbit_password}
387         ntp:
388           servers:
389               - {server: {get_input: ntp_server}}
390
391   NovaComputeDeployment:
392     type: OS::TripleO::SoftwareDeployment
393     properties:
394       signal_transport: NO_SIGNAL
395       config: {get_resource: NovaComputeConfig}
396       server: {get_resource: NovaCompute}
397       input_values:
398         debug: {get_param: Debug}
399         nova_compute_driver: {get_param: NovaComputeDriver}
400         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
401         nova_public_ip: {get_param: NovaPublicIP}
402         nova_api_host: {get_param: NovaApiHost}
403         nova_password: {get_param: NovaPassword}
404         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
405         ceilometer_password: {get_param: CeilometerPassword}
406         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
407         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
408         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
409         glance_host: {get_param: GlanceHost}
410         glance_port: {get_param: GlancePort}
411         glance_protocol: {get_param: GlanceProtocol}
412         keystone_host: {get_param: KeystoneHost}
413         neutron_flat_networks: {get_param: NeutronFlatNetworks}
414         neutron_host: {get_param: NeutronHost}
415         neutron_local_ip: {get_attr: [NovaCompute, networks, ctlplane, 0]}
416         neutron_tenant_network_type: {get_param: NeutronNetworkType}
417         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
418         neutron_tunnel_id_ranges:
419           str_replace:
420             template: "['RANGES']"
421             params:
422               RANGES:
423                 list_join:
424                 - "','"
425                 - {get_param: NeutronTunnelIdRanges}
426         neutron_vni_ranges:
427           str_replace:
428             template: "['RANGES']"
429             params:
430               RANGES:
431                 list_join:
432                 - "','"
433                 - {get_param: NeutronVniRanges}
434         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
435         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
436         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
437         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
438         neutron_public_interface: {get_param: NeutronPublicInterface}
439         neutron_password: {get_param: NeutronPassword}
440         neutron_agent_mode: {get_param: NeutronAgentMode}
441         neutron_router_distributed: {get_param: NeutronDVR}
442         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
443         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
444         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
445         neutron_l3_ha: {get_param: NeutronL3HA}
446         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
447         admin_password: {get_param: AdminPassword}
448         rabbit_host: {get_param: RabbitHost}
449         rabbit_username: {get_param: RabbitUserName}
450         rabbit_password: {get_param: RabbitPassword}
451         ntp_server: {get_param: NtpServer}
452
453   NovaComputePassthrough:
454     type: OS::Heat::StructuredConfig
455     properties:
456       group: os-apply-config
457       config: {get_input: passthrough_config}
458
459   NovaComputePassthroughSpecific:
460     type: OS::Heat::StructuredConfig
461     properties:
462       group: os-apply-config
463       config: {get_input: passthrough_config_specific}
464
465   NovaComputePassthroughDeployment:
466     depends_on: [NovaComputeDeployment]
467     type: OS::Heat::StructuredDeployment
468     properties:
469       config: {get_resource: NovaComputePassthrough}
470       server: {get_resource: NovaCompute}
471       signal_transport: NO_SIGNAL
472       input_values:
473         passthrough_config: {get_param: ExtraConfig}
474
475   NovaComputePassthroughDeploymentSpecific:
476     depends_on: [NovaComputePassthroughDeployment]
477     type: OS::Heat::StructuredDeployment
478     properties:
479       config: {get_resource: NovaComputePassthroughSpecific}
480       server: {get_resource: NovaCompute}
481       signal_transport: NO_SIGNAL
482       input_values:
483         passthrough_config_specific: {get_param: NovaComputeExtraConfig}
484
485 outputs:
486   ip_address:
487     description: IP address of the server in the ctlplane network
488     value: {get_attr: [NovaCompute, networks, ctlplane, 0]}
489   internal_api_ip_address:
490     description: IP address of the server in the internal_api network
491     value: {get_attr: [InternalApiPort, ip_address]}
492   storage_ip_address:
493     description: IP address of the server in the storage network
494     value: {get_attr: [StoragePort, ip_address]}
495   tenant_ip_address:
496     description: IP address of the server in the tenant network
497     value: {get_attr: [TenantPort, ip_address]}
498   hostname:
499     description: Hostname of the server
500     value: {get_attr: [NovaCompute, name]}
501   hosts_entry:
502     description: >
503       Server's IP address and hostname in the /etc/hosts format
504     value:
505       str_replace:
506         template: "IP HOST"
507         params:
508           IP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
509           HOST: {get_attr: [NovaCompute, name]}
510   nova_server_resource:
511     description: Heat resource handle for the Nova compute server
512     value:
513       {get_resource: NovaCompute}
514   config_identifier:
515     description: identifier which changes if the node configuration may need re-applying
516     value: "None - NO_SIGNAL"