Merge "Convert noop NetworkExtraConfig to OS::Heat::None"
[apex-tripleo-heat-templates.git] / puppet / compute.yaml
1 heat_template_version: 2015-10-15
2
3 description: >
4   OpenStack hypervisor node configured via Puppet.
5
6 parameters:
7   AdminPassword:
8     description: The password for the keystone admin account, used for monitoring, querying neutron etc.
9     type: string
10     hidden: true
11   CeilometerComputeAgent:
12     description: Indicates whether the Compute agent is present and expects nova-compute to be configured accordingly
13     type: string
14     default: ''
15     constraints:
16     - allowed_values: ['', Present]
17   CeilometerMeteringSecret:
18     description: Secret shared by the ceilometer services.
19     type: string
20     hidden: true
21   CeilometerPassword:
22     description: The password for the ceilometer service account.
23     type: string
24     hidden: true
25   CinderEnableNfsBackend:
26     default: false
27     description: Whether to enable or not the NFS backend for Cinder
28     type: boolean
29   CinderEnableRbdBackend:
30     default: false
31     description: Whether to enable or not the Rbd backend for Cinder
32     type: boolean
33   Debug:
34     default: ''
35     description: Set to True to enable debugging on all services.
36     type: string
37   ExtraConfig:
38     default: {}
39     description: |
40       Additional hiera configuration to inject into the cluster. Note
41       that NovaComputeExtraConfig takes precedence over ExtraConfig.
42     type: json
43   Flavor:
44     description: Flavor for the nova compute node
45     type: string
46     constraints:
47       - custom_constraint: nova.flavor
48   GlanceHost:
49     type: string
50     default: ''  # Has to be here because of the ignored empty value bug
51   Image:
52     type: string
53     default: overcloud-compute
54     constraints:
55       - custom_constraint: glance.image
56   ImageUpdatePolicy:
57     default: 'REBUILD_PRESERVE_EPHEMERAL'
58     description: What policy to use when reconstructing instances. REBUILD for rebuilds, REBUILD_PRESERVE_EPHEMERAL to preserve /mnt.
59     type: string
60   KeyName:
61     description: Name of an existing Nova key pair to enable SSH access to the instances
62     type: string
63     default: default
64     constraints:
65       - custom_constraint: nova.keypair
66   KeystoneAdminApiVirtualIP:
67     type: string
68     default: ''
69   KeystonePublicApiVirtualIP:
70      type: string
71      default: ''
72   NeutronBridgeMappings:
73     description: >
74       The OVS logical->physical bridge mappings to use. See the Neutron
75       documentation for details. Defaults to mapping br-ex - the external
76       bridge on hosts - to a physical name 'datacentre' which can be used
77       to create provider networks (and we use this for the default floating
78       network) - if changing this either use different post-install network
79       scripts or be sure to keep 'datacentre' as a mapping network name.
80     type: comma_delimited_list
81     default: "datacentre:br-ex"
82   NeutronEnableTunnelling:
83     type: string
84     default: "True"
85   NeutronEnableL2Pop:
86     type: string
87     description: >
88         Enable/disable the L2 population feature in the Neutron agents.
89     default: "False"
90   NeutronFlatNetworks:
91     type: comma_delimited_list
92     default: 'datacentre'
93     description: >
94       If set, flat networks to configure in neutron plugins.
95   NeutronHost:
96     type: string
97     default: ''  # Has to be here because of the ignored empty value bug
98   NeutronNetworkType:
99     type: comma_delimited_list
100     description: The tenant network type for Neutron.
101     default: 'vxlan'
102   NeutronNetworkVLANRanges:
103     default: 'datacentre:1:1000'
104     description: >
105       The Neutron ML2 and OpenVSwitch vlan mapping range to support. See the
106       Neutron documentation for permitted values. Defaults to permitting any
107       VLAN on the 'datacentre' physical network (See NeutronBridgeMappings).
108     type: comma_delimited_list
109   NeutronPassword:
110     description: The password for the neutron service account, used by neutron agents.
111     type: string
112     hidden: true
113   NeutronPhysicalBridge:
114     default: 'br-ex'
115     description: An OVS bridge to create for accessing external networks.
116     type: string
117   NeutronPublicInterface:
118     default: nic1
119     description: A port to add to the NeutronPhysicalBridge.
120     type: string
121   NeutronTenantMtu:
122     description: >
123       The default MTU for tenant networks. For VXLAN/GRE tunneling, this should
124       be at least 50 bytes smaller than the MTU on the physical network. This
125       value will be used to set the MTU on the virtual Ethernet device.
126       This number is related to the value of NeutronDnsmasqOptions, since that
127       will determine the MTU that is assigned to the VM host through DHCP.
128     default: 1400
129     type: number
130   NeutronTunnelTypes:
131     type: comma_delimited_list
132     description: |
133         The tunnel types for the Neutron tenant network.
134     default: 'vxlan'
135   NeutronTunnelIdRanges:
136     description: |
137         Comma-separated list of <tun_min>:<tun_max> tuples enumerating ranges
138         of GRE tunnel IDs that are available for tenant network allocation
139     default: ["1:4094", ]
140     type: comma_delimited_list
141   NeutronVniRanges:
142     description: |
143         Comma-separated list of <vni_min>:<vni_max> tuples enumerating ranges
144         of VXLAN VNI IDs that are available for tenant network allocation
145     default: ["1:4094", ]
146     type: comma_delimited_list
147   NeutronMetadataProxySharedSecret:
148     description: Shared secret to prevent spoofing
149     type: string
150     hidden: true
151   NeutronCorePlugin:
152     default: 'ml2'
153     description: |
154         The core plugin for Neutron. The value should be the entrypoint to be loaded
155         from neutron.core_plugins namespace.
156     type: string
157   NeutronServicePlugins:
158     default: "router,qos"
159     description: |
160         Comma-separated list of service plugin entrypoints to be loaded from the
161         neutron.service_plugins namespace.
162     type: comma_delimited_list
163   NeutronTypeDrivers:
164     default: "vxlan,vlan,flat,gre"
165     description: |
166         Comma-separated list of network type driver entrypoints to be loaded.
167     type: comma_delimited_list
168   NeutronMechanismDrivers:
169     default: 'openvswitch'
170     description: |
171         The mechanism drivers for the Neutron tenant network.
172     type: comma_delimited_list
173   NeutronAgentExtensions:
174     default: "qos"
175     description: |
176         Comma-separated list of extensions enabled for the Neutron agents.
177     type: comma_delimited_list
178   # Not relevant for Computes, should be removed
179   NeutronAllowL3AgentFailover:
180     default: 'True'
181     description: Allow automatic l3-agent failover
182     type: string
183   # Not relevant for Computes, should be removed
184   NeutronL3HA:
185     default: 'False'
186     description: Whether to enable l3-agent HA
187     type: string
188   NodeIndex:
189     type: number
190     default: 0
191   NovaApiHost:
192     type: string
193     default: ''  # Has to be here because of the ignored empty value bug
194   NovaComputeDriver:
195     type: string
196     default: libvirt.LibvirtDriver
197   NovaComputeExtraConfig:
198     default: {}
199     description: |
200       NovaCompute specific configuration to inject into the cluster. Same
201       structure as ExtraConfig.
202     type: json
203   NovaComputeIPs:
204     default: {}
205     type: json
206   NovaComputeLibvirtType:
207     type: string
208     default: kvm
209   NovaComputeLibvirtVifDriver:
210     default: ''
211     description: Libvirt VIF driver configuration for the network
212     type: string
213   NovaEnableRbdBackend:
214     default: false
215     description: Whether to enable or not the Rbd backend for Nova
216     type: boolean
217   NovaIPv6:
218     default: false
219     description: Enable IPv6 features in Nova
220     type: boolean
221   NovaPassword:
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   NovaOVSBridge:
229     default: 'br-int'
230     description: Name of integration bridge used by Open vSwitch
231     type: string
232   NovaSecurityGroupAPI:
233     default: 'neutron'
234     description: The full class name of the security API class
235     type: string
236   RabbitHost:
237     type: string
238     default: ''  # Has to be here because of the ignored empty value bug
239   RabbitPassword:
240     description: The password for RabbitMQ
241     type: string
242     hidden: true
243   RabbitUserName:
244     default: guest
245     description: The username for RabbitMQ
246     type: string
247   RabbitClientUseSSL:
248     default: false
249     description: >
250         Rabbit client subscriber parameter to specify
251         an SSL connection to the RabbitMQ host.
252     type: string
253   RabbitClientPort:
254     default: 5672
255     description: Set rabbit subscriber port, change this if using SSL
256     type: number
257   SnmpdReadonlyUserName:
258     default: ro_snmp_user
259     description: The user name for SNMPd with readonly rights running on all Overcloud nodes
260     type: string
261   SnmpdReadonlyUserPassword:
262     description: The user password for SNMPd with readonly rights running on all Overcloud nodes
263     type: string
264     hidden: true
265   UpgradeLevelNovaCompute:
266     type: string
267     description: Nova Compute upgrade level
268     default: ''
269   EnablePackageInstall:
270     default: 'false'
271     description: Set to true to enable package installation via Puppet
272     type: boolean
273   ServiceNetMap:
274     default: {}
275     description: Mapping of service_name -> network name. Typically set
276                  via parameter_defaults in the resource registry.
277     type: json
278   EndpointMap:
279     default: {}
280     description: Mapping of service endpoint -> protocol. Typically set
281                  via parameter_defaults in the resource registry.
282     type: json
283   TimeZone:
284     default: 'UTC'
285     description: The timezone to be set on compute nodes.
286     type: string
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   HostnameMap:
297     type: json
298     default: {}
299     description: Optional mapping to override hostnames
300   NetworkDeploymentActions:
301     type: comma_delimited_list
302     description: >
303       Heat action when to apply network configuration changes
304     default: ['CREATE']
305   SoftwareConfigTransport:
306     default: POLL_SERVER_CFN
307     description: |
308       How the server should receive the metadata required for software configuration.
309     type: string
310     constraints:
311     - allowed_values: [POLL_SERVER_CFN, POLL_SERVER_HEAT, POLL_TEMP_URL, ZAQAR_MESSAGE]
312   CloudDomain:
313     default: ''
314     type: string
315     description: >
316       The DNS domain used for the hosts. This should match the dhcp_domain
317       configured in the Undercloud neutron. Defaults to localdomain.
318   ServerMetadata:
319     default: {}
320     description: >
321       Extra properties or metadata passed to Nova for the created nodes in
322       the overcloud. It's accessible via the Nova metadata API.
323     type: json
324   SchedulerHints:
325     type: json
326     description: Optional scheduler hints to pass to nova
327     default: {}
328   ServiceConfigSettings:
329     type: json
330     default: {}
331
332 resources:
333
334   NovaCompute:
335     type: OS::Nova::Server
336     properties:
337       image:
338         {get_param: Image}
339       image_update_policy:
340         get_param: ImageUpdatePolicy
341       flavor: {get_param: Flavor}
342       key_name: {get_param: KeyName}
343       networks:
344         - network: ctlplane
345       user_data_format: SOFTWARE_CONFIG
346       user_data: {get_resource: UserData}
347       name:
348         str_replace:
349             template: {get_param: Hostname}
350             params: {get_param: HostnameMap}
351       software_config_transport: {get_param: SoftwareConfigTransport}
352       metadata: {get_param: ServerMetadata}
353       scheduler_hints: {get_param: SchedulerHints}
354
355   # Combine the NodeAdminUserData and NodeUserData mime archives
356   UserData:
357     type: OS::Heat::MultipartMime
358     properties:
359       parts:
360       - config: {get_resource: NodeAdminUserData}
361         type: multipart
362       - config: {get_resource: NodeUserData}
363         type: multipart
364
365   # Creates the "heat-admin" user if configured via the environment
366   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
367   NodeAdminUserData:
368     type: OS::TripleO::NodeAdminUserData
369
370   # For optional operator additional userdata
371   # Should return a OS::Heat::MultipartMime reference via OS::stack_id
372   NodeUserData:
373     type: OS::TripleO::NodeUserData
374
375   ExternalPort:
376     type: OS::TripleO::Compute::Ports::ExternalPort
377     properties:
378       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
379       IPPool: {get_param: NovaComputeIPs}
380       NodeIndex: {get_param: NodeIndex}
381
382   InternalApiPort:
383     type: OS::TripleO::Compute::Ports::InternalApiPort
384     properties:
385       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
386       IPPool: {get_param: NovaComputeIPs}
387       NodeIndex: {get_param: NodeIndex}
388
389   StoragePort:
390     type: OS::TripleO::Compute::Ports::StoragePort
391     properties:
392       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
393       IPPool: {get_param: NovaComputeIPs}
394       NodeIndex: {get_param: NodeIndex}
395
396   StorageMgmtPort:
397     type: OS::TripleO::Compute::Ports::StorageMgmtPort
398     properties:
399       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
400       IPPool: {get_param: NovaComputeIPs}
401       NodeIndex: {get_param: NodeIndex}
402
403   TenantPort:
404     type: OS::TripleO::Compute::Ports::TenantPort
405     properties:
406       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
407       IPPool: {get_param: NovaComputeIPs}
408       NodeIndex: {get_param: NodeIndex}
409
410   ManagementPort:
411     type: OS::TripleO::Compute::Ports::ManagementPort
412     properties:
413       ControlPlaneIP: {get_attr: [NovaCompute, networks, ctlplane, 0]}
414       IPPool: {get_param: NovaComputeIPs}
415       NodeIndex: {get_param: NodeIndex}
416
417   NetIpMap:
418     type: OS::TripleO::Network::Ports::NetIpMap
419     properties:
420       ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]}
421       ExternalIp: {get_attr: [ExternalPort, ip_address]}
422       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
423       ExternalIpUri: {get_attr: [ExternalPort, ip_address_uri]}
424       InternalApiIp: {get_attr: [InternalApiPort, ip_address]}
425       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
426       InternalApiIpUri: {get_attr: [InternalApiPort, ip_address_uri]}
427       StorageIp: {get_attr: [StoragePort, ip_address]}
428       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
429       StorageIpUri: {get_attr: [StoragePort, ip_address_uri]}
430       StorageMgmtIp: {get_attr: [StorageMgmtPort, ip_address]}
431       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
432       StorageMgmtIpUri: {get_attr: [StorageMgmtPort, ip_address_uri]}
433       TenantIp: {get_attr: [TenantPort, ip_address]}
434       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
435       TenantIpUri: {get_attr: [TenantPort, ip_address_uri]}
436       ManagementIp: {get_attr: [ManagementPort, ip_address]}
437       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
438       ManagementIpUri: {get_attr: [ManagementPort, ip_address_uri]}
439
440   NetworkConfig:
441     type: OS::TripleO::Compute::Net::SoftwareConfig
442     properties:
443       ControlPlaneIp: {get_attr: [NovaCompute, networks, ctlplane, 0]}
444       ExternalIpSubnet: {get_attr: [ExternalPort, ip_subnet]}
445       InternalApiIpSubnet: {get_attr: [InternalApiPort, ip_subnet]}
446       StorageIpSubnet: {get_attr: [StoragePort, ip_subnet]}
447       StorageMgmtIpSubnet: {get_attr: [StorageMgmtPort, ip_subnet]}
448       TenantIpSubnet: {get_attr: [TenantPort, ip_subnet]}
449       ManagementIpSubnet: {get_attr: [ManagementPort, ip_subnet]}
450
451   NetworkDeployment:
452     type: OS::TripleO::SoftwareDeployment
453     properties:
454       name: NetworkDeployment
455       config: {get_resource: NetworkConfig}
456       server: {get_resource: NovaCompute}
457       actions: {get_param: NetworkDeploymentActions}
458       input_values:
459         bridge_name: {get_param: NeutronPhysicalBridge}
460         interface_name: {get_param: NeutronPublicInterface}
461
462   NovaComputeConfig:
463     type: OS::Heat::StructuredConfig
464     properties:
465       group: os-apply-config
466       config:
467         hiera:
468           hierarchy:
469             - '"%{::uuid}"'
470             - heat_config_%{::deploy_config_name}
471             - compute_extraconfig
472             - extraconfig
473             - service_configs
474             - compute
475             - ceph_cluster # provided by CephClusterConfig
476             - ceph
477             - all_nodes # provided by allNodesConfig
478             - '"%{::osfamily}"'
479             - common
480             - network
481             - neutron_bigswitch_data # Optionally provided by ComputeExtraConfigPre
482             - cisco_n1kv_data  # Optionally provided by ComputeExtraConfigPre
483             - nova_nuage_data  # Optionally provided by ComputeExtraConfigPre
484             - midonet_data # Optionally provided by AllNodesExtraConfig
485             - neutron_opencontrail_data  # Optionally provided by ComputeExtraConfigPre
486           merge_behavior: deeper
487           datafiles:
488             service_configs:
489               mapped_data: {get_param: ServiceConfigSettings}
490             compute_extraconfig:
491               mapped_data: {get_param: NovaComputeExtraConfig}
492             extraconfig:
493               mapped_data: {get_param: ExtraConfig}
494             common:
495               raw_data: {get_file: hieradata/common.yaml}
496             network:
497               mapped_data:
498                 net_ip_map: {get_attr: [NetIpMap, net_ip_map]}
499                 net_ip_subnet_map: {get_attr: [NetIpMap, net_ip_subnet_map]}
500                 net_ip_uri_map: {get_attr: [NetIpMap, net_ip_uri_map]}
501             ceph:
502               raw_data: {get_file: hieradata/ceph.yaml}
503             compute:
504               raw_data: {get_file: hieradata/compute.yaml}
505               mapped_data:
506                 cinder_enable_nfs_backend: {get_input: cinder_enable_nfs_backend}
507                 nova::use_ipv6: {get_input: nova_ipv6}
508                 nova::debug: {get_input: debug}
509                 nova::rabbit_userid: {get_input: rabbit_username}
510                 nova::rabbit_password: {get_input: rabbit_password}
511                 nova::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
512                 nova::rabbit_port: {get_input: rabbit_client_port}
513                 nova::upgrade_level_compute: {get_input: upgrade_level_nova_compute}
514                 nova_compute_driver: {get_input: nova_compute_driver}
515                 nova::compute::libvirt::libvirt_virt_type: {get_input: nova_compute_libvirt_type}
516                 nova::compute::neutron::libvirt_vif_driver: {get_input: nova_compute_libvirt_vif_driver}
517                 nova_api_host: {get_input: nova_api_host}
518                 nova::compute::vncproxy_host: {get_input: nova_public_ip}
519                 nova::compute::rbd::ephemeral_storage: {get_input: nova_enable_rbd_backend}
520                 # TUNNELLED mode provides a security enhancement when using shared storage but is not
521                 # supported when not using shared storage.
522                 # See https://bugzilla.redhat.com/show_bug.cgi?id=1301986#c12
523                 # In future versions of QEMU (2.6, mostly), Dan's native encryption
524                 # work will obsolete the need to use TUNNELLED transport mode.
525                 nova::migration::live_migration_tunnelled: {get_input: nova_enable_rbd_backend}
526                 rbd_persistent_storage: {get_input: cinder_enable_rbd_backend}
527                 nova_password: {get_input: nova_password}
528                 nova::compute::network_device_mtu: {get_input: neutron_tenant_mtu}
529                 nova::compute::vncserver_proxyclient_address: {get_input: nova_vnc_proxyclient_address}
530                 nova::vncproxy::common::vncproxy_protocol: {get_input: nova_vncproxy_protocol}
531                 nova::vncproxy::common::vncproxy_host: {get_input: nova_vncproxy_host}
532                 nova::vncproxy::common::vncproxy_port: {get_input: nova_vncproxy_port}
533                 nova::network::neutron::neutron_ovs_bridge: {get_input: nova_ovs_bridge}
534                 nova::network::neutron::security_group_api: {get_input: nova_security_group_api}
535                 ceilometer::debug: {get_input: debug}
536                 ceilometer::rabbit_userid: {get_input: rabbit_username}
537                 ceilometer::rabbit_password: {get_input: rabbit_password}
538                 ceilometer::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
539                 ceilometer::rabbit_port: {get_input: rabbit_client_port}
540                 ceilometer::telemetry_secret: {get_input: ceilometer_metering_secret}
541                 ceilometer::agent::auth::auth_password: {get_input: ceilometer_password}
542                 ceilometer::agent::auth::auth_url: {get_input: ceilometer_agent_auth_url}
543                 ceilometer_compute_agent: {get_input: ceilometer_compute_agent}
544                 snmpd_readonly_user_name: {get_input: snmpd_readonly_user_name}
545                 snmpd_readonly_user_password: {get_input: snmpd_readonly_user_password}
546                 nova::glance_api_servers: {get_input: glance_api_servers}
547                 neutron::debug: {get_input: debug}
548                 neutron::rabbit_password: {get_input: rabbit_password}
549                 neutron::rabbit_user: {get_input: rabbit_username}
550                 neutron::rabbit_use_ssl: {get_input: rabbit_client_use_ssl}
551                 neutron::rabbit_port: {get_input: rabbit_client_port}
552                 neutron::plugins::ml2::flat_networks: {get_input: neutron_flat_networks}
553                 neutron_host: {get_input: neutron_host}
554                 neutron::agents::ml2::ovs::local_ip: {get_input: neutron_local_ip}
555
556                 neutron::network_device_mtu: {get_input: neutron_tenant_mtu}
557                 neutron::plugins::ml2::tenant_network_types: {get_input: neutron_tenant_network_types}
558                 neutron::agents::ml2::ovs::tunnel_types: {get_input: neutron_tunnel_types}
559                 neutron::agents::ml2::ovs::extensions: {get_input: neutron_agent_extensions}
560                 neutron::plugins::ml2::network_vlan_ranges: {get_input: neutron_network_vlan_ranges}
561                 neutron::plugins::ml2::tunnel_id_ranges: {get_input: neutron_tunnel_id_ranges}
562                 neutron::plugins::ml2::vni_ranges: {get_input: neutron_vni_ranges}
563                 neutron::agents::ml2::ovs::bridge_mappings: {get_input: neutron_bridge_mappings}
564                 neutron::agents::ml2::ovs::enable_tunneling: {get_input: neutron_enable_tunneling}
565                 neutron::agents::ml2::ovs::l2_population: {get_input: neutron_enable_l2pop}
566                 neutron_physical_bridge: {get_input: neutron_physical_bridge}
567                 neutron_public_interface: {get_input: neutron_public_interface}
568                 nova::network::neutron::neutron_password: {get_input: neutron_password}
569                 nova::network::neutron::neutron_url: {get_input: neutron_internal_url}
570                 nova::network::neutron::neutron_auth_url: {get_input: neutron_auth_url}
571                 neutron_metadata_proxy_shared_secret: {get_input: neutron_metadata_proxy_shared_secret}
572                 neutron::core_plugin: {get_input: neutron_core_plugin}
573                 neutron::service_plugins: {get_input: neutron_service_plugins}
574                 neutron::plugins::ml2::type_drivers: {get_input: neutron_type_drivers}
575                 neutron::plugins::ml2::mechanism_drivers: {get_input: neutron_mechanism_drivers}
576                 keystone_public_api_virtual_ip: {get_input: keystone_vip}
577                 admin_password: {get_input: admin_password}
578                 timezone::timezone: {get_input: timezone}
579                 tripleo::packages::enable_install: {get_input: enable_package_install}
580                 tripleo::packages::enable_upgrade: {get_input: enable_package_upgrade}
581
582   NovaComputeDeployment:
583     type: OS::TripleO::SoftwareDeployment
584     depends_on: NetworkDeployment
585     properties:
586       name: NovaComputeDeployment
587       config: {get_resource: NovaComputeConfig}
588       server: {get_resource: NovaCompute}
589       input_values:
590         cinder_enable_nfs_backend: {get_param: CinderEnableNfsBackend}
591         debug: {get_param: Debug}
592         nova_compute_driver: {get_param: NovaComputeDriver}
593         nova_compute_libvirt_type: {get_param: NovaComputeLibvirtType}
594         nova_compute_libvirt_vif_driver: {get_param: NovaComputeLibvirtVifDriver}
595         nova_public_ip: {get_param: NovaPublicIP}
596         nova_api_host: {get_param: NovaApiHost}
597         nova_password: {get_param: NovaPassword}
598         nova_enable_rbd_backend: {get_param: NovaEnableRbdBackend}
599         nova_ipv6: {get_param: NovaIPv6}
600         cinder_enable_rbd_backend: {get_param: CinderEnableRbdBackend}
601         nova_vnc_proxyclient_address: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NovaVncProxyNetwork]}]}
602         nova_vncproxy_protocol: {get_param: [EndpointMap, NovaVNCProxyPublic, protocol]}
603         # Remove brackets that may come if the IP address is IPv6.
604         # For DNS names and IPv4, this will just get the NovaVNCProxyPublic value
605         nova_vncproxy_host:
606           str_replace:
607             template: {get_param: [EndpointMap, NovaVNCProxyPublic, host]}
608             params:
609               '[': ''
610               ']': ''
611         nova_vncproxy_port: {get_param: [EndpointMap, NovaVNCProxyPublic, port]}
612         nova_ovs_bridge: {get_param: NovaOVSBridge}
613         nova_security_group_api: {get_param: NovaSecurityGroupAPI}
614         upgrade_level_nova_compute: {get_param: UpgradeLevelNovaCompute}
615         ceilometer_metering_secret: {get_param: CeilometerMeteringSecret}
616         ceilometer_password: {get_param: CeilometerPassword}
617         ceilometer_compute_agent: {get_param: CeilometerComputeAgent}
618         ceilometer_agent_auth_url: {get_param: [EndpointMap, KeystoneInternal, uri]}
619         snmpd_readonly_user_name: {get_param: SnmpdReadonlyUserName}
620         snmpd_readonly_user_password: {get_param: SnmpdReadonlyUserPassword}
621         glance_api_servers: {get_param: [EndpointMap, GlanceInternal, uri]}
622         neutron_flat_networks:
623           str_replace:
624             template: NETWORKS
625             params:
626               NETWORKS: {get_param: NeutronFlatNetworks}
627         neutron_host: {get_param: NeutronHost}
628         neutron_local_ip: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, NeutronTenantNetwork]}]}
629         neutron_tunnel_id_ranges:
630           str_replace:
631             template: RANGES
632             params:
633               RANGES: {get_param: NeutronTunnelIdRanges}
634         neutron_vni_ranges:
635           str_replace:
636             template: RANGES
637             params:
638               RANGES: {get_param: NeutronVniRanges}
639         neutron_tenant_network_types:
640           str_replace:
641             template: TYPES
642             params:
643               TYPES: {get_param: NeutronNetworkType}
644         neutron_tunnel_types:
645           str_replace:
646             template: TYPES
647             params:
648               TYPES: {get_param: NeutronTunnelTypes}
649         neutron_network_vlan_ranges:
650           str_replace:
651             template: RANGES
652             params:
653               RANGES: {get_param: NeutronNetworkVLANRanges}
654         neutron_bridge_mappings:
655           str_replace:
656             template: MAPPINGS
657             params:
658               MAPPINGS: {get_param: NeutronBridgeMappings}
659         neutron_tenant_mtu: {get_param: NeutronTenantMtu}
660         neutron_enable_tunneling: {get_param: NeutronEnableTunnelling}
661         neutron_enable_l2pop: {get_param: NeutronEnableL2Pop}
662         neutron_physical_bridge: {get_param: NeutronPhysicalBridge}
663         neutron_public_interface: {get_param: NeutronPublicInterface}
664         neutron_password: {get_param: NeutronPassword}
665         neutron_metadata_proxy_shared_secret: {get_param: NeutronMetadataProxySharedSecret}
666         neutron_core_plugin: {get_param: NeutronCorePlugin}
667         neutron_service_plugins:
668           str_replace:
669             template: PLUGINS
670             params:
671               PLUGINS: {get_param: NeutronServicePlugins}
672         neutron_type_drivers:
673           str_replace:
674             template: DRIVERS
675             params:
676               DRIVERS: {get_param: NeutronTypeDrivers}
677         neutron_mechanism_drivers:
678           str_replace:
679             template: MECHANISMS
680             params:
681               MECHANISMS: {get_param: NeutronMechanismDrivers}
682         neutron_agent_extensions:
683           str_replace:
684             template: AGENT_EXTENSIONS
685             params:
686               AGENT_EXTENSIONS: {get_param: NeutronAgentExtensions}
687         neutron_internal_url: {get_param: [EndpointMap, NeutronInternal, uri]}
688         neutron_auth_url: {get_param: [EndpointMap, KeystoneV3Admin, uri]}
689         keystone_vip: {get_param: KeystonePublicApiVirtualIP}
690         admin_password: {get_param: AdminPassword}
691         rabbit_username: {get_param: RabbitUserName}
692         rabbit_password: {get_param: RabbitPassword}
693         rabbit_client_use_ssl: {get_param: RabbitClientUseSSL}
694         rabbit_client_port: {get_param: RabbitClientPort}
695         timezone: {get_param: TimeZone}
696         enable_package_install: {get_param: EnablePackageInstall}
697         enable_package_upgrade: {get_attr: [UpdateDeployment, update_managed_packages]}
698
699   # Resource for site-specific injection of root certificate
700   NodeTLSCAData:
701     depends_on: NovaComputeDeployment
702     type: OS::TripleO::NodeTLSCAData
703     properties:
704       server: {get_resource: NovaCompute}
705
706   # Hook for site-specific additional pre-deployment config, e.g extra hieradata
707   ComputeExtraConfigPre:
708     depends_on: NovaComputeDeployment
709     type: OS::TripleO::ComputeExtraConfigPre
710     properties:
711         server: {get_resource: NovaCompute}
712
713   # Hook for site-specific additional pre-deployment config,
714   # applying to all nodes, e.g node registration/unregistration
715   NodeExtraConfig:
716     depends_on: [ComputeExtraConfigPre, NodeTLSCAData]
717     type: OS::TripleO::NodeExtraConfig
718     properties:
719         server: {get_resource: NovaCompute}
720
721   UpdateConfig:
722     type: OS::TripleO::Tasks::PackageUpdate
723
724   UpdateDeployment:
725     type: OS::Heat::SoftwareDeployment
726     properties:
727       name: UpdateDeployment
728       config: {get_resource: UpdateConfig}
729       server: {get_resource: NovaCompute}
730       input_values:
731         update_identifier:
732           get_param: UpdateIdentifier
733
734 outputs:
735   ip_address:
736     description: IP address of the server in the ctlplane network
737     value: {get_attr: [NovaCompute, networks, ctlplane, 0]}
738   external_ip_address:
739     description: IP address of the server in the external network
740     value: {get_attr: [ExternalPort, ip_address]}
741   internal_api_ip_address:
742     description: IP address of the server in the internal_api network
743     value: {get_attr: [InternalApiPort, ip_address]}
744   storage_ip_address:
745     description: IP address of the server in the storage network
746     value: {get_attr: [StoragePort, ip_address]}
747   storage_mgmt_ip_address:
748     description: IP address of the server in the storage_mgmt network
749     value: {get_attr: [StorageMgmtPort, ip_address]}
750   tenant_ip_address:
751     description: IP address of the server in the tenant network
752     value: {get_attr: [TenantPort, ip_address]}
753   management_ip_address:
754     description: IP address of the server in the management network
755     value: {get_attr: [ManagementPort, ip_address]}
756   hostname:
757     description: Hostname of the server
758     value: {get_attr: [NovaCompute, name]}
759   hosts_entry:
760     description: >
761       Server's IP address and hostname in the /etc/hosts format
762     value:
763       str_replace:
764         template: |
765           PRIMARYIP PRIMARYHOST.DOMAIN PRIMARYHOST
766           EXTERNALIP EXTERNALHOST.DOMAIN EXTERNALHOST
767           INTERNAL_APIIP INTERNAL_APIHOST.DOMAIN INTERNAL_APIHOST
768           STORAGEIP STORAGEHOST.DOMAIN STORAGEHOST
769           STORAGE_MGMTIP STORAGE_MGMTHOST.DOMAIN STORAGE_MGMTHOST
770           TENANTIP TENANTHOST.DOMAIN TENANTHOST
771           MANAGEMENTIP MANAGEMENTHOST.DOMAIN MANAGEMENTHOST
772         params:
773           PRIMARYIP: {get_attr: [NetIpMap, net_ip_map, {get_param: [ServiceNetMap, ComputeHostnameResolveNetwork]}]}
774           DOMAIN: {get_param: CloudDomain}
775           PRIMARYHOST: {get_attr: [NovaCompute, name]}
776           EXTERNALIP: {get_attr: [ExternalPort, ip_address]}
777           EXTERNALHOST:
778             list_join:
779             - '.'
780             - - {get_attr: [NovaCompute, name]}
781               - external
782           INTERNAL_APIIP: {get_attr: [InternalApiPort, ip_address]}
783           INTERNAL_APIHOST:
784             list_join:
785             - '.'
786             - - {get_attr: [NovaCompute, name]}
787               - internalapi
788           STORAGEIP: {get_attr: [StoragePort, ip_address]}
789           STORAGEHOST:
790             list_join:
791             - '.'
792             - - {get_attr: [NovaCompute, name]}
793               - storage
794           STORAGE_MGMTIP: {get_attr: [StorageMgmtPort, ip_address]}
795           STORAGE_MGMTHOST:
796             list_join:
797             - '.'
798             - - {get_attr: [NovaCompute, name]}
799               - storagemgmt
800           TENANTIP: {get_attr: [TenantPort, ip_address]}
801           TENANTHOST:
802             list_join:
803             - '.'
804             - - {get_attr: [NovaCompute, name]}
805               - tenant
806           MANAGEMENTIP: {get_attr: [ManagementPort, ip_address]}
807           MANAGEMENTHOST:
808             list_join:
809             - '.'
810             - - {get_attr: [NovaCompute, name]}
811               - management
812   nova_server_resource:
813     description: Heat resource handle for the Nova compute server
814     value:
815       {get_resource: NovaCompute}
816   config_identifier:
817     description: identifier which changes if the node configuration may need re-applying
818     value:
819       list_join:
820       - ','
821       - - {get_attr: [NovaComputeDeployment, deploy_stdout]}
822         - {get_attr: [NodeTLSCAData, deploy_stdout]}
823         - {get_attr: [ComputeExtraConfigPre, deploy_stdout]}
824         - {get_param: UpdateIdentifier}