19f1f02aaf70e6e2c786f7f1aa733bbf4e38b757
[apex-tripleo-heat-templates.git] / puppet / services / nova-compute.yaml
1 heat_template_version: 2016-04-08
2
3 description: >
4   OpenStack Nova Compute service configured with Puppet
5
6 parameters:
7   EndpointMap:
8     default: {}
9     description: Mapping of service endpoint -> protocol. Typically set
10                  via parameter_defaults in the resource registry.
11     type: json
12   NovaRbdPoolName:
13     default: vms
14     type: string
15   CephClientUserName:
16     default: openstack
17     type: string
18   CinderEnableNfsBackend:
19     default: false
20     description: Whether to enable or not the NFS backend for Cinder
21     type: boolean
22   CinderEnableRbdBackend:
23     default: false
24     description: Whether to enable or not the Rbd backend for Cinder
25     type: boolean
26   NovaEnableRbdBackend:
27     default: false
28     description: Whether to enable or not the Rbd backend for Nova
29     type: boolean
30   NovaComputeLibvirtVifDriver:
31     default: ''
32     description: Libvirt VIF driver configuration for the network
33     type: string
34
35 resources:
36   NovaBase:
37     type: ./nova-base.yaml
38     properties:
39       EndpointMap: {get_param: EndpointMap}
40
41 outputs:
42   role_data:
43     description: Role data for the Nova Compute service.
44     value:
45       service_name: nova_compute
46       config_settings:
47         map_merge:
48           - get_attr: [NovaBase, role_data, config_settings]
49           - nova::compute::libvirt::manage_libvirt_services: false
50             # we manage migration in nova common puppet profile
51             nova::compute::libvirt::migration_support: false
52             tripleo::profile::base::nova::manage_migration: true
53             tripleo::profile::base::nova::nova_compute_enabled: true
54             nova::compute::rbd::libvirt_images_rbd_pool: {get_param: NovaRbdPoolName}
55             nova::compute::rbd::libvirt_rbd_user: {get_param: CephClientUserName}
56             tripleo::profile::base::nova::compute::cinder_nfs_backend: {get_param: CinderEnableNfsBackend}
57             rbd_persistent_storage: {get_param: CinderEnableRbdBackend}
58             nova::compute::rbd::rbd_keyring:
59               list_join:
60               - '.'
61               - - 'client'
62                 - {get_param: CephClientUserName}
63             nova::compute::rbd::libvirt_rbd_secret_uuid: '"%{hiera(\"ceph::profile::params::fsid\")}"'
64             nova::compute::instance_usage_audit: true
65             nova::compute::instance_usage_audit_period: 'hour'
66             nova::compute::rbd::ephemeral_storage: {get_param: NovaEnableRbdBackend}
67             # TUNNELLED mode provides a security enhancement when using shared
68             # storage but is not supported when not using shared storage.
69             # See https://bugzilla.redhat.com/show_bug.cgi?id=1301986#c12
70             # In future versions of QEMU (2.6, mostly), danpb's native
71             # encryption work will obsolete the need to use TUNNELLED transport
72             # mode.
73             nova::migration::live_migration_tunnelled: {get_param: NovaEnableRbdBackend}
74             # Changing the default from 512MB. The current templates can not deploy
75             # overclouds with swap. On an idle compute node, we see ~1024MB of RAM
76             # used. 2048 is suggested to account for other possible operations for
77             # example openvswitch.
78             nova::compute::reserved_host_memory: 2048
79             nova::compute::neutron::libvirt_vif_driver: {get_param: NovaComputeLibvirtVifDriver}
80
81       step_config: |
82         # TODO(emilien): figure how to deal with libvirt profile.
83         # We'll probably treat it like we do with Neutron plugins.
84         # Until then, just include it in the default nova-compute role.
85         include tripleo::profile::base::nova::compute::libvirt