From bde476d7573076d38cfda115348dffb9cf50fdb5 Mon Sep 17 00:00:00 2001 From: Emilien Macchi Date: Fri, 10 Jan 2014 11:58:50 +0100 Subject: [PATCH] image: change driver from swift to ceph Signed-off-by: Emilien Macchi --- manifests/image.pp | 9 +++++---- spec/classes/privatecloud_image_spec.rb | 11 ++++++----- 2 files changed, 11 insertions(+), 9 deletions(-) diff --git a/manifests/image.pp b/manifests/image.pp index 64f2b869..846e3550 100644 --- a/manifests/image.pp +++ b/manifests/image.pp @@ -66,6 +66,8 @@ class privatecloud::image( $rabbit_password = $os_params::rabbit_password, $rabbit_host = $os_params::rabbit_hosts[0], $api_eth = $os_params::api_eth, + $rbd_store_pool = 'ceph_glance', + $rbd_store_user = 'glance', $verbose = $os_params::verbose, $debug = $os_params::debug ) { @@ -93,10 +95,9 @@ class privatecloud::image( } # TODO(EmilienM) We should migrate the backend to Ceph (WIP). For now, I let Swift. - class { 'glance::backend::swift': - swift_store_user => 'services:glance', - swift_store_key => $ks_glance_password, - swift_store_auth_address => $ks_keystone_internal_host, + class { 'glance::backend::rbd': + rbd_store_user => $rbd_store_user, + rbd_store_pool => $rbd_store_pool } class { 'glance::cache::cleaner': } diff --git a/spec/classes/privatecloud_image_spec.rb b/spec/classes/privatecloud_image_spec.rb index a257c70a..a3d5e084 100644 --- a/spec/classes/privatecloud_image_spec.rb +++ b/spec/classes/privatecloud_image_spec.rb @@ -31,6 +31,8 @@ describe 'privatecloud::image' do :ks_glance_password => 'secrete', :rabbit_host => '10.0.0.1', :rabbit_password => 'secrete', + :rbd_store_user => 'glance', + :rbd_store_pool => 'ceph_glance', :debug => true, :verbose => true, :api_eth => '10.0.0.1' } @@ -74,11 +76,10 @@ describe 'privatecloud::image' do ) end - it 'configure glance swift backend' do - should contain_class('glance::backend::swift').with( - :swift_store_user => 'services:glance', - :swift_store_key => 'secrete', - :swift_store_auth_address => '10.0.0.1', + it 'configure glance rbd backend' do + should contain_class('glance::backend::rbd').with( + :rbd_store_pool => 'ceph_glance', + :rbd_store_user => 'glance' ) end