NFS backend for Cinder
[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   NeutronPublicInterfaceRawDevice:
160     default: ''
161     type: string
162   NeutronDVR:
163     default: 'False'
164     type: string
165   NeutronMetadataProxySharedSecret:
166     default: 'unset'
167     description: Shared secret to prevent spoofing
168     type: string
169   NeutronMechanismDrivers:
170     default: 'openvswitch'
171     description: |
172         The mechanism drivers for the Neutron tenant network. To specify multiple
173         values, use a comma separated string, like so: 'openvswitch,l2_population'
174     type: string
175   # Not relevant for Computes, should be removed
176   NeutronAllowL3AgentFailover:
177     default: 'True'
178     description: Allow automatic l3-agent failover
179     type: string
180   # Not relevant for Computes, should be removed
181   NeutronL3HA:
182     default: 'False'
183     description: Whether to enable l3-agent HA
184     type: string
185   NeutronAgentMode:
186     default: 'dvr_snat'
187     description: Agent mode for the neutron-l3-agent on the controller hosts
188     type: string
189   NovaApiHost:
190     type: string
191     default: ''  # Has to be here because of the ignored empty value bug
192   NovaComputeDriver:
193     type: string
194     default: libvirt.LibvirtDriver
195   NovaComputeExtraConfig:
196     default: {}
197     description: |
198       NovaCompute specific configuration to inject into the cluster. Same
199       structure as ExtraConfig.
200     type: json
201   NovaComputeLibvirtType:
202     type: string
203     default: ''
204   NovaEnableRbdBackend:
205     default: false
206     description: Whether to enable or not the Rbd backend for Nova
207     type: boolean
208   NovaPassword:
209     default: unset
210     description: The password for the nova service account, used by nova-api.
211     type: string
212     hidden: true
213   NovaPublicIP:
214     type: string
215     default: ''  # Has to be here because of the ignored empty value bug
216   NtpServer:
217     type: string
218     default: ''
219   RabbitHost:
220     type: string
221     default: ''  # Has to be here because of the ignored empty value bug
222   RabbitPassword:
223     default: guest
224     description: The password for RabbitMQ
225     type: string
226     hidden: true
227   RabbitUserName:
228     default: guest
229     description: The username for RabbitMQ
230     type: string
231   RabbitClientUseSSL:
232     default: false
233     description: >
234         Rabbit client subscriber parameter to specify
235         an SSL connection to the RabbitMQ host.
236     type: string
237   RabbitClientPort:
238     default: 5672
239     description: Set rabbit subscriber port, change this if using SSL
240     type: number
241   SnmpdReadonlyUserName:
242     default: ro_snmp_user
243     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
244     type: string
245   SnmpdReadonlyUserPassword:
246     default: unset
247     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
248     type: string
249     hidden: true
250   ServiceNetMap:
251     default: {}
252     description: Mapping of service_name -> network name. Typically set
253                  via parameter_defaults in the resource registry.
254     type: json
255   UpdateIdentifier:
256     default: ''
257     type: string
258     description: >
259       Setting to a previously unused value during stack-update will trigger
260       package update on all nodes
261   Hostname:
262     type: string
263     default: '' # Defaults to Heat created hostname
264
265 resources:
266
267   NovaCompute:
268     type: OS::Nova::Server
269     properties:
270       image:
271         {get_param: Image}
272       image_update_policy:
273         get_param: ImageUpdatePolicy
274       flavor: {get_param: Flavor}
275       key_name: {get_param: KeyName}
276       networks:
277         - network: ctlplane
278       user_data_format: SOFTWARE_CONFIG
279       user_data: {get_resource: NodeUserData}
280       name: {get_param: Hostname}
281
282   NodeUserData:
283     type: OS::TripleO::NodeUserData
284
285   InternalApiPort:
286     type: OS::TripleO::Compute::Ports::InternalApiPort
287     properties:
288       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
289
290   StoragePort:
291     type: OS::TripleO::Compute::Ports::StoragePort
292     properties:
293       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
294
295   TenantPort:
296     type: OS::TripleO::Compute::Ports::TenantPort
297     properties:
298       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
299
300   NetworkConfig:
301     type: OS::TripleO::Compute::Net::SoftwareConfig
302     properties:
303       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
304       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
305       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
306
307   NetworkDeployment:
308     type: OS::TripleO::SoftwareDeployment
309     properties:
310       signal_transport: NO_SIGNAL
311       config: {get_resource: NetworkConfig}
312       server: {get_resource: NovaCompute}
313       input_values:
314         bridge_name: {get_param: NeutronPhysicalBridge}
315         interface_name: {get_param: NeutronPublicInterface}
316
317   NovaComputeConfig:
318     type: OS::Heat::StructuredConfig
319     properties:
320       group: os-apply-config
321       config:
322         nova:
323           compute_driver: { get_input: nova_compute_driver }
324           compute_libvirt_type: { get_input: nova_compute_libvirt_type }
325           debug: {get_input: debug}
326           host: {get_input: nova_api_host}
327           public_ip: {get_input: nova_public_ip}
328           service-password: {get_input: nova_password}
329         ceilometer:
330           debug: {get_input: debug}
331           metering_secret: {get_input: ceilometer_metering_secret}
332           service-password: {get_input: ceilometer_password}
333           compute_agent: {get_input: ceilometer_compute_agent}
334         snmpd:
335           export_MIB: UCD-SNMP-MIB
336           readonly_user_name: {get_input: snmpd_readonly_user_name}
337           readonly_user_password: {get_input: snmpd_readonly_user_password}
338         glance:
339           debug: {get_input: debug}
340           host: {get_input: glance_host}
341           port: {get_input: glance_port}
342           protocol: {get_input: glance_protocol}
343         keystone:
344           debug: {get_input: debug}
345           host: {get_input: keystone_host}
346         neutron:
347           debug: {get_input: debug}
348           flat-networks: {get_input: neutron_flat_networks}
349           host: {get_input: neutron_host}
350           router_distributed: {get_input: neutron_router_distributed}
351           agent_mode: {get_input: neutron_agent_mode}
352           ovs_db: {get_input: neutron_dsn}
353           metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
354           mechanism_drivers: {get_input: neutron_mechanism_drivers}
355           allow_automatic_l3agent_failover: {get_input: neutron_allow_l3agent_failover}
356           l3_ha: {get_input: neutron_l3_ha}
357           ovs:
358             local_ip: {get_input: neutron_local_ip}
359             tenant_network_type: {get_input: neutron_tenant_network_type}
360             tunnel_types: {get_input: neutron_tunnel_types}
361             network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
362             bridge_mappings: {get_input: neutron_bridge_mappings}
363             enable_tunneling: {get_input: neutron_enable_tunneling}
364             physical_bridge: {get_input: neutron_physical_bridge}
365             public_interface: {get_input: neutron_public_interface}
366             public_interface_raw_device: {get_input: neutron_public_interface_raw_device}
367           service-password: {get_input: neutron_password}
368         admin-password: {get_input: admin_password}
369         rabbit:
370           host: {get_input: rabbit_host}
371           username: {get_input: rabbit_username}
372           password: {get_input: rabbit_password}
373         ntp:
374           servers:
375               - {server: {get_input: ntp_server}}
376
377   NovaComputeDeployment:
378     type: OS::TripleO::SoftwareDeployment
379     properties:
380       signal_transport: NO_SIGNAL
381       config: {get_resource: NovaComputeConfig}
382       server: {get_resource: NovaCompute}
383       input_values:
384         debug: {get_param: Debug}
385         nova_compute_driver: {get_param: NovaComputeDriver}
386         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
387         nova_public_ip: {get_param: NovaPublicIP}
388         nova_api_host: {get_param: NovaApiHost}
389         nova_password: {get_param: NovaPassword}
390         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
391         ceilometer_password: {get_param: CeilometerPassword}
392         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
393         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
394         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
395         glance_host: {get_param: GlanceHost}
396         glance_port: {get_param: GlancePort}
397         glance_protocol: {get_param: GlanceProtocol}
398         keystone_host: {get_param: KeystoneHost}
399         neutron_flat_networks: {get_param: NeutronFlatNetworks}
400         neutron_host: {get_param: NeutronHost}
401         neutron_local_ip: {get_attr: [NovaCompute, networks, ctlplane, 0]}
402         neutron_tenant_network_type: {get_param: NeutronNetworkType}
403         neutron_tunnel_types: {get_param: NeutronTunnelTypes}
404         neutron_network_vlan_ranges: {get_param: NeutronNetworkVLANRanges}
405         neutron_bridge_mappings: {get_param: NeutronBridgeMappings}
406         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
407         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
408         neutron_public_interface: {get_param: NeutronPublicInterface}
409         neutron_password: {get_param: NeutronPassword}
410         neutron_agent_mode: {get_param: NeutronAgentMode}
411         neutron_router_distributed: {get_param: NeutronDVR}
412         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
413         neutron_mechanism_drivers: {get_param: NeutronMechanismDrivers}
414         neutron_allow_l3agent_failover: {get_param: NeutronAllowL3AgentFailover}
415         neutron_l3_ha: {get_param: NeutronL3HA}
416         neutron_public_interface_raw_device: {get_param: NeutronPublicInterfaceRawDevice}
417         admin_password: {get_param: AdminPassword}
418         rabbit_host: {get_param: RabbitHost}
419         rabbit_username: {get_param: RabbitUserName}
420         rabbit_password: {get_param: RabbitPassword}
421         ntp_server: {get_param: NtpServer}
422
423   NovaComputePassthrough:
424     type: OS::Heat::StructuredConfig
425     properties:
426       group: os-apply-config
427       config: {get_input: passthrough_config}
428
429   NovaComputePassthroughSpecific:
430     type: OS::Heat::StructuredConfig
431     properties:
432       group: os-apply-config
433       config: {get_input: passthrough_config_specific}
434
435   NovaComputePassthroughDeployment:
436     depends_on: [NovaComputeDeployment]
437     type: OS::Heat::StructuredDeployment
438     properties:
439       config: {get_resource: NovaComputePassthrough}
440       server: {get_resource: NovaCompute}
441       signal_transport: NO_SIGNAL
442       input_values:
443         passthrough_config: {get_param: ExtraConfig}
444
445   NovaComputePassthroughDeploymentSpecific:
446     depends_on: [NovaComputePassthroughDeployment]
447     type: OS::Heat::StructuredDeployment
448     properties:
449       config: {get_resource: NovaComputePassthroughSpecific}
450       server: {get_resource: NovaCompute}
451       signal_transport: NO_SIGNAL
452       input_values:
453         passthrough_config_specific: {get_param: NovaComputeExtraConfig}
454
455 outputs:
456   ip_address:
457     description: IP address of the server in the ctlplane network
458     value: {get_attr: [NovaCompute, networks, ctlplane, 0]}
459   internal_api_ip_address:
460     description: IP address of the server in the internal_api network
461     value: {get_attr: [InternalApiPort, ip_address]}
462   storage_ip_address:
463     description: IP address of the server in the storage network
464     value: {get_attr: [StoragePort, ip_address]}
465   tenant_ip_address:
466     description: IP address of the server in the tenant network
467     value: {get_attr: [TenantPort, ip_address]}
468   hostname:
469     description: Hostname of the server
470     value: {get_attr: [NovaCompute, name]}
471   hosts_entry:
472     description: >
473       Server's IP address and hostname in the /etc/hosts format
474     value:
475       str_replace:
476         template: "IP HOST"
477         params:
478           IP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
479           HOST: {get_attr: [NovaCompute, name]}
480   nova_server_resource:
481     description: Heat resource handle for the Nova compute server
482     value:
483       {get_resource: NovaCompute}
484   config_identifier:
485     description: identifier which changes if the node configuration may need re-applying
486     value: "None - NO_SIGNAL"