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