diff --git a/examples/allinone.yaml b/examples/allinone.yaml index 9506307e..6d7844ed 100644 --- a/examples/allinone.yaml +++ b/examples/allinone.yaml @@ -135,6 +135,13 @@ openstack::swift::hash_suffix: 'pop-bang' openstack::nova::libvirt_type: 'kvm' openstack::nova::password: 'quuk-paj' +openstack::nova::libvirt_rbd_user: 'cinder' +openstack::nova::libvirt_rbd_secret_uuid: 'a31a9344-a280-4d27-bdb9-8ec99f499a71' +openstack::nova::libvirt_rbd_secret_key: 'aGVmc2FmZGZkc2Zhc2ZkYXNkZmRzZmFkZGZsCg==' +openstack::nova::libvirt_images_rbd_pool: 'rbd' +openstack::nova::rbd_keyring: 'client.nova' +openstack::nova::ephemeral_storage: false + ######## Neutron openstack::neutron::password: 'whi-rtuz' diff --git a/examples/common.yaml b/examples/common.yaml index d7c6d50e..642f57f1 100644 --- a/examples/common.yaml +++ b/examples/common.yaml @@ -135,6 +135,13 @@ openstack::swift::hash_suffix: 'pop-bang' openstack::nova::libvirt_type: 'kvm' openstack::nova::password: 'quuk-paj' +openstack::nova::libvirt_rbd_user: 'cinder' +openstack::nova::libvirt_rbd_secret_uuid: 'a31a9344-a280-4d27-bdb9-8ec99f499a71' +openstack::nova::libvirt_rbd_secret_key: 'aGVmc2FmZGZkc2Zhc2ZkYXNkZmRzZmFkZGZsCg==' +openstack::nova::libvirt_images_rbd_pool: 'rbd' +openstack::nova::rbd_keyring: 'client.nova' +openstack::nova::ephemeral_storage: false + ######## Neutron openstack::neutron::password: 'whi-rtuz' diff --git a/manifests/config.pp b/manifests/config.pp index ea7ac5d3..8cdabc24 100644 --- a/manifests/config.pp +++ b/manifests/config.pp @@ -52,6 +52,12 @@ $swift_hash_suffix = undef, $nova_libvirt_type = undef, $nova_password = undef, + $libvirt_rbd_user = undef, + $libvirt_rbd_secret_uuid = undef, + $libvirt_rbd_secret_key = undef, + $libvirt_images_rbd_pool = undef, + $rbd_keyring = undef, + $ephemeral_storage = undef, $neutron_password = undef, $neutron_shared_secret = undef, $neutron_core_plugin = 'neutron.plugins.ml2.plugin.Ml2Plugin', diff --git a/manifests/init.pp b/manifests/init.pp index 288fe23c..c6d7345f 100644 --- a/manifests/init.pp +++ b/manifests/init.pp @@ -231,6 +231,34 @@ # [*nova_password*] # The password for the nova user in Keystone. # +# [*libvirt_rbd_user*] +# (Required) The RADOS client name for accessing rbd volumes. +# +# [*libvirt_rbd_secret_uuid*] +# (optional) The libvirt uuid of the secret for the rbd_user. +# Required to use cephx. +# Default to false. +# +# [*libvirt_rbd_secret_key*] +# (optional) The cephx key to use as key for the libvirt secret, +# it must be base64 encoded; when not provided this key will be +# requested to the ceph cluster, which assumes the node is +# provided of the client.admin keyring as well. +# Default to undef. +# +# [*libvirt_images_rbd_pool*] +# (optional) The RADOS pool in which rbd volumes are stored. +# Defaults to 'rbd'. +# +# [*rbd_keyring*] +# (optional) The keyring name to use when retrieving the RBD secret +# Default to undef. +# +# [*ephemeral_storage*] +# (optional) Wether or not to use the rbd driver for the nova +# ephemeral storage or for the cinder volumes only. +# Defaults to false. +# # == Neutron # [*neutron_password*] # The password for the neutron user in Keystone. @@ -421,6 +449,12 @@ $swift_hash_suffix = undef, $nova_libvirt_type = undef, $nova_password = undef, + $libvirt_rbd_user = undef, + $libvirt_rbd_secret_uuid = undef, + $libvirt_rbd_secret_key = undef, + $libvirt_images_rbd_pool = undef, + $rbd_keyring = undef, + $ephemeral_storage = false, $neutron_password = undef, $neutron_shared_secret = undef, $neutron_core_plugin = undef, @@ -510,6 +544,12 @@ swift_hash_suffix => hiera(openstack::swift::hash_suffix), nova_libvirt_type => hiera(openstack::nova::libvirt_type), nova_password => hiera(openstack::nova::password), + libvirt_rbd_user => hiera(openstack::nova::libvirt_rbd_user, undef), + libvirt_rbd_secret_uuid => hiera(openstack::nova::libvirt_rbd_secret_uuid, undef), + libvirt_rbd_secret_key => hiera(openstack::nova::libvirt_rbd_secret_key, undef), + libvirt_images_rbd_pool => hiera(openstack::nova::libvirt_images_rbd_pool, 'rbd'), + rbd_keyring => hiera(openstack::nova::rbd_keyring, undef), + ephemeral_storage => hiera(openstack::nova::ephemeral_storage, false), neutron_password => hiera(openstack::neutron::password), neutron_shared_secret => hiera(openstack::neutron::shared_secret), neutron_core_plugin => hiera(openstack::neutron::core_plugin), @@ -604,6 +644,12 @@ swift_hash_suffix => $swift_hash_suffix, nova_libvirt_type => $nova_libvirt_type, nova_password => $nova_password, + libvirt_rbd_user => $libvirt_rbd_user, + libvirt_rbd_secret_uuid => $libvirt_rbd_secret_uuid, + libvirt_rbd_secret_key => $libvirt_rbd_secret_key, + libvirt_images_rbd_pool => pick($libvirt_images_rbd_pool, 'rbd'), + rbd_keyring => $rbd_keyring, + ephemeral_storage => pick($ephemeral_storage, false), neutron_password => $neutron_password, neutron_shared_secret => $neutron_shared_secret, neutron_core_plugin => $neutron_core_plugin, diff --git a/manifests/profile/nova/compute.pp b/manifests/profile/nova/compute.pp index 3dda1e40..884083c2 100644 --- a/manifests/profile/nova/compute.pp +++ b/manifests/profile/nova/compute.pp @@ -21,6 +21,15 @@ class { 'nova::migration::libvirt': } + class { '::nova::compute::rbd': + libvirt_rbd_user => $::openstack::config::libvirt_rbd_user, + libvirt_rbd_secret_uuid => $::openstack::config::libvirt_rbd_secret_uuid, + libvirt_rbd_secret_key => $::openstack::config::libvirt_rbd_secret_key, + libvirt_images_rbd_pool => $::openstack::config::libvirt_images_rbd_pool, + rbd_keyring => $::openstack::config::rbd_keyring, + ephemeral_storage => $::openstack::config::ephemeral_storage, + } + file { '/etc/libvirt/qemu.conf': ensure => present, source => 'puppet:///modules/openstack/qemu.conf',