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