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