From 13cf700aeb11516e6b56c973b59a8f5000da03dd Mon Sep 17 00:00:00 2001 From: "Mark T. Voelker" Date: Fri, 20 Sep 2013 00:53:20 -0400 Subject: [PATCH] Enable RBD-backed Glance in openstack::all Although openstack::glance supports using Ceph RBD as a backend, the openstack::all class currently lacks parameters to enable RBD-backed-glance in all-in-one installations. This commit adds the necessary parameters for users to use Ceph as a backend for Glance. Change-Id: I7f7364eb647d9d950ae11d83cf3beef7cd452d6b Implements: blueprint rbd-backed-glance-in-all --- manifests/all.pp | 5 +++++ spec/classes/openstack_all_spec.rb | 22 ++++++++++++++++++++++ 2 files changed, 27 insertions(+) diff --git a/manifests/all.pp b/manifests/all.pp index 7fc3d42..55d936a 100644 --- a/manifests/all.pp +++ b/manifests/all.pp @@ -147,6 +147,9 @@ class openstack::all ( # Glance Swift Backend $swift_store_user = 'swift_store_user', $swift_store_key = 'swift_store_key', + # Glance RBD Backend + $glance_rbd_user = 'images', + $glance_rbd_pool = 'images', # Nova $nova_admin_tenant_name = 'services', $nova_admin_user = 'nova', @@ -329,6 +332,8 @@ class openstack::all ( backend => $glance_backend, swift_store_user => $swift_store_user, swift_store_key => $swift_store_key, + rbd_store_user => $glance_rbd_user, + rbd_store_pool => $glance_rbd_pool, enabled => $enabled, } diff --git a/spec/classes/openstack_all_spec.rb b/spec/classes/openstack_all_spec.rb index 8ac4d1d..4a770ce 100644 --- a/spec/classes/openstack_all_spec.rb +++ b/spec/classes/openstack_all_spec.rb @@ -440,4 +440,26 @@ describe 'openstack::all' do ) end end + + context 'glance enabled and rbd as the backend' do + before do + params.merge!( + :neutron_user_password => 'neutron_user_password', + :neutron_db_password => 'neutron_db_password', + :bridge_interface => 'eth0', + :ovs_local_ip => '10.0.1.1', + :metadata_shared_secret => 'shared_md_secret', + :cinder_db_password => 'cinder_db_password', + :cinder_user_password => 'cinder_user_password', + :glance_backend => 'rbd' + ) + end + + it 'should have glance::backend::rbd with default user/pool' do + should contain_class('glance::backend::rbd').with( + :rbd_store_user => 'images', + :rbd_store_pool => 'images' + ) + end + end end