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.

This commit is based on the following change to master but is
not cherry-picked due to the quantum->neutron name change mandating
a few changes to the rspec tests:
https://review.openstack.org/#/c/47520/

Change-Id: I780e98fa28600d88607194fc0b4d82f26d72d063
Implements: blueprint rbd-backed-glance-in-all
This commit is contained in:
Mark T. Voelker
2013-09-20 13:04:55 -04:00
parent b7aa823779
commit 369f463cd7
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!(
:quantum_user_password => 'quantum_user_password',
:quantum_db_password => 'quantum_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