Skip to content
This repository has been archived by the owner on May 14, 2019. It is now read-only.

support for deploying ceph resource on compute node #218

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 7 additions & 0 deletions examples/allinone.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
7 changes: 7 additions & 0 deletions examples/common.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down
6 changes: 6 additions & 0 deletions manifests/config.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down
46 changes: 46 additions & 0 deletions manifests/init.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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),
Expand Down Expand Up @@ -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,
Expand Down
9 changes: 9 additions & 0 deletions manifests/profile/nova/compute.pp
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down