diff --git a/defaults/main.yml b/defaults/main.yml index cf0d95df..4ab145bc 100644 --- a/defaults/main.yml +++ b/defaults/main.yml @@ -235,6 +235,11 @@ nova_scheduler_program_name: nova-scheduler # If you want to regenerate the nova users SSH keys, on each run, set this var to True # Otherwise keys will be generated on the first run and not regenerated each run. nova_recreate_keys: False +# Nova Ceph rbd +# Enble and define nova_libvirt_images_rbd_pool to use rbd as nova backend +#nova_libvirt_images_rbd_pool: vms +nova_ceph_client: '{{ cinder_ceph_client }}' +nova_ceph_client_uuid: 517a4663-3927-44bc-9ea7-4a90e1cd4c66 ## General Neutron configuration # If ``nova_osapi_compute_workers`` is unset the system will use half the number of available VCPUS to diff --git a/templates/nova.conf.j2 b/templates/nova.conf.j2 index 47e6bb3e..02b7aa78 100644 --- a/templates/nova.conf.j2 +++ b/templates/nova.conf.j2 @@ -239,3 +239,19 @@ use_virtio_for_bridges = True cpu_mode = {{ nova_cpu_mode }} virt_type = {{ nova_virt_type }} remove_unused_resized_minimum_age_seconds = {{ nova_remove_unused_resized_minimum_age_seconds }} + +{% if cinder_backends_rbd_inuse|bool or nova_libvirt_images_rbd_pool is defined %} +rbd_user = {{ nova_ceph_client }} +rbd_secret_uuid = {{ nova_ceph_client_uuid }} +{% endif %} +{% if nova_libvirt_images_rbd_pool is defined %} +# ceph rbd support +images_type = rbd +images_rbd_pool = {{ nova_libvirt_images_rbd_pool }} +images_rbd_ceph_conf = /etc/ceph/ceph.conf +inject_password = false +inject_key = false +inject_partition = -2 +live_migration_flag="VIR_MIGRATE_UNDEFINE_SOURCE,VIR_MIGRATE_PEER2PEER,VIR_MIGRATE_LIVE,VIR_MIGRATE_PERSIST_DEST" +{% endif %} +