summaryrefslogtreecommitdiffstats
path: root/puppet/manifests
diff options
context:
space:
mode:
authorYanis Guenane <yanis.guenane@enovance.com>2015-03-11 05:14:35 -0400
committerGiulio Fidente <gfidente@redhat.com>2015-03-18 12:42:51 -0400
commitabcfd88ee31bbf0ff232500ea312f3077ea60435 (patch)
tree1c12bb30d9f08a6d6bfc1e50b74160136fe8f942 /puppet/manifests
parent5e7928431e0ba0afd91ef924d43ca5fb28b345fa (diff)
Add support for Ceph as a Cinder and Nova backend
This commit aims to add support for Ceph as a cinder and a nova backend. * Allows creation of Ceph pools from heat (Default: volumes, vms) * Creates the proper ceph user and inject the keys * Applies the proper configuration in cinder.conf and nova.conf * Enable the backend out of the box Co-Authored-By: Giulio Fidente <gfidente@redhat.com> Change-Id: Ic17d7a665de81a8bab5e34035abe90eda4bc889f
Diffstat (limited to 'puppet/manifests')
-rw-r--r--puppet/manifests/overcloud_compute.pp12
-rw-r--r--puppet/manifests/overcloud_controller.pp45
2 files changed, 54 insertions, 3 deletions
diff --git a/puppet/manifests/overcloud_compute.pp b/puppet/manifests/overcloud_compute.pp
index 0d2790b2..0c870c35 100644
--- a/puppet/manifests/overcloud_compute.pp
+++ b/puppet/manifests/overcloud_compute.pp
@@ -45,6 +45,18 @@ nova_config {
'DEFAULT/linuxnet_interface_driver': value => 'nova.network.linux_net.LinuxOVSInterfaceDriver';
}
+$nova_enable_rbd_backend = hiera('nova_enable_rbd_backend', false)
+if $nova_enable_rbd_backend {
+ include ::ceph::profile::client
+ include ::nova::compute::rbd
+ ceph::key { 'client.openstack' :
+ secret => hiera('ceph::profile::params::mon_key'),
+ cap_mon => hiera('ceph_openstack_default_cap_mon'),
+ cap_osd => hiera('ceph_openstack_default_cap_osd'),
+ user => 'nova',
+ }
+}
+
include ::nova::compute::libvirt
class { 'nova::network::neutron':
diff --git a/puppet/manifests/overcloud_controller.pp b/puppet/manifests/overcloud_controller.pp
index 87cc7ec0..41363039 100644
--- a/puppet/manifests/overcloud_controller.pp
+++ b/puppet/manifests/overcloud_controller.pp
@@ -156,14 +156,26 @@ if hiera('step') >= 2 {
# pre-install swift here so we can build rings
include ::swift
- # don't install Ceph if FSID is not provided
- if hiera('ceph::profile::params::fsid', false) {
+ $cinder_enable_rbd_backend = hiera('cinder_enable_rbd_backend', false)
+ $enable_ceph = $cinder_enable_rbd_backend
+
+ if $enable_ceph {
class { 'ceph::profile::params':
mon_initial_members => downcase(hiera('ceph_mon_initial_members'))
}
include ::ceph::profile::mon
}
+ if $cinder_enable_rbd_backend {
+ ceph::key { 'client.openstack' :
+ secret => hiera('ceph::profile::params::mon_key'),
+ cap_mon => hiera('ceph_openstack_default_cap_mon'),
+ cap_osd => hiera('ceph_openstack_default_cap_osd'),
+ user => 'cinder',
+ inject => 'true',
+ }
+ }
+
} #END STEP 2
if hiera('step') >= 3 {
@@ -278,7 +290,34 @@ if hiera('step') >= 3 {
}
}
- $cinder_enabled_backends = any2array($cinder_iscsi_backend)
+ if $enable_ceph {
+
+ Ceph_pool {
+ pg_num => hiera('ceph::profile::params::osd_pool_default_pg_num'),
+ pgp_num => hiera('ceph::profile::params::osd_pool_default_pgp_num'),
+ size => hiera('ceph::profile::params::osd_pool_default_size'),
+ }
+
+ $ceph_pools = hiera('ceph_pools')
+ ceph::pool { $ceph_pools : }
+ }
+
+ if $cinder_enable_rbd_backend {
+ $cinder_rbd_backend = 'tripleo_ceph'
+
+ cinder_config {
+ "${cinder_rbd_backend}/host": value => 'hostgroup';
+ }
+
+ cinder::backend::rbd { $cinder_rbd_backend :
+ rbd_pool => 'volumes',
+ rbd_user => 'openstack',
+ rbd_secret_uuid => hiera('ceph::profile::params::fsid'),
+ require => Ceph::Pool['volumes'],
+ }
+ }
+
+ $cinder_enabled_backends = concat(any2array($cinder_iscsi_backend), $cinder_rbd_backend)
class { '::cinder::backends' :
enabled_backends => $cinder_enabled_backends,
}