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
This commit is contained in:
Mark T. Voelker
2013-09-20 00:53:20 -04:00
parent 2aafade144
commit 13cf700aeb
2 changed files with 27 additions and 0 deletions

View File

@@ -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,
}

View File

@@ -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