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