[image] Expose image location to trusted clients
This enables the qcow cloning while creating a volume from an image. Closes: #81
This commit is contained in:
parent
773c8180c6
commit
8e61232d09
@ -92,25 +92,20 @@ class cloud::image(
|
|||||||
$encoded_glance_password = uriescape($glance_db_password)
|
$encoded_glance_password = uriescape($glance_db_password)
|
||||||
|
|
||||||
class { 'glance::api':
|
class { 'glance::api':
|
||||||
sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance",
|
sql_connection => "mysql://${encoded_glance_user}:${encoded_glance_password}@${glance_db_host}/glance",
|
||||||
registry_host => $openstack_vip,
|
registry_host => $openstack_vip,
|
||||||
registry_port => $ks_glance_registry_internal_port,
|
registry_port => $ks_glance_registry_internal_port,
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
debug => $debug,
|
debug => $debug,
|
||||||
auth_host => $ks_keystone_internal_host,
|
auth_host => $ks_keystone_internal_host,
|
||||||
keystone_password => $ks_glance_password,
|
keystone_password => $ks_glance_password,
|
||||||
keystone_tenant => 'services',
|
keystone_tenant => 'services',
|
||||||
keystone_user => 'glance',
|
keystone_user => 'glance',
|
||||||
log_facility => $log_facility,
|
show_image_direct_url => true,
|
||||||
bind_host => $api_eth,
|
log_facility => $log_facility,
|
||||||
bind_port => $ks_glance_api_internal_port,
|
bind_host => $api_eth,
|
||||||
use_syslog => $use_syslog,
|
bind_port => $ks_glance_api_internal_port,
|
||||||
}
|
use_syslog => $use_syslog,
|
||||||
|
|
||||||
#TODO(sbadia): Wait https://review.openstack.org/69688
|
|
||||||
#See branch bug/81/sbadia and https://github.com/enovance/puppet-cloud/issues/81
|
|
||||||
glance_api_config {
|
|
||||||
'DEFAULT/show_image_direct_url': value => true;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
class { 'glance::registry':
|
class { 'glance::registry':
|
||||||
|
@ -19,61 +19,77 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'cloud::image' do
|
describe 'cloud::image' do
|
||||||
|
|
||||||
shared_examples_for 'openstack image' do
|
let :params do
|
||||||
|
{ :glance_db_host => '10.0.0.1',
|
||||||
let :params do
|
:glance_db_user => 'glance',
|
||||||
{ :glance_db_host => '10.0.0.1',
|
:glance_db_password => 'secrete',
|
||||||
:glance_db_user => 'glance',
|
:ks_keystone_internal_host => '10.0.0.1',
|
||||||
:glance_db_password => 'secrete',
|
:ks_glance_internal_host => '10.0.0.1',
|
||||||
:ks_keystone_internal_host => '10.0.0.1',
|
:openstack_vip => '10.0.0.42',
|
||||||
:ks_glance_internal_host => '10.0.0.1',
|
:ks_glance_api_internal_port => '9292',
|
||||||
:openstack_vip => '10.0.0.42',
|
:ks_glance_registry_internal_port => '9191',
|
||||||
:ks_glance_api_internal_port => '9292',
|
:ks_glance_password => 'secrete',
|
||||||
:ks_glance_registry_internal_port => '9191',
|
:rabbit_host => '10.0.0.1',
|
||||||
:ks_glance_password => 'secrete',
|
:rabbit_password => 'secrete',
|
||||||
:rabbit_host => '10.0.0.1',
|
:rbd_store_user => 'glance',
|
||||||
:rabbit_password => 'secrete',
|
:rbd_store_pool => 'images',
|
||||||
:rbd_store_user => 'glance',
|
:debug => true,
|
||||||
:rbd_store_pool => 'images',
|
:verbose => true,
|
||||||
:debug => true,
|
:use_syslog => true,
|
||||||
:verbose => true,
|
:log_facility => 'LOG_LOCAL0',
|
||||||
:use_syslog => true,
|
:api_eth => '10.0.0.1'
|
||||||
:log_facility => 'LOG_LOCAL0',
|
}
|
||||||
:api_eth => '10.0.0.1' }
|
end
|
||||||
end
|
|
||||||
|
|
||||||
|
shared_examples_for 'a glance api server' do
|
||||||
it 'configure glance-api' do
|
it 'configure glance-api' do
|
||||||
should contain_class('glance::api').with(
|
should contain_class('glance::api').with(
|
||||||
:sql_connection => 'mysql://glance:secrete@10.0.0.1/glance',
|
:sql_connection => 'mysql://glance:secrete@10.0.0.1/glance',
|
||||||
:keystone_password => 'secrete',
|
:keystone_password => 'secrete',
|
||||||
:registry_host => '10.0.0.42',
|
:registry_host => '10.0.0.42',
|
||||||
:registry_port => '9191',
|
:registry_port => '9191',
|
||||||
:keystone_tenant => 'services',
|
:keystone_tenant => 'services',
|
||||||
:keystone_user => 'glance',
|
:keystone_user => 'glance',
|
||||||
:verbose => true,
|
:show_image_direct_url => true,
|
||||||
:debug => true,
|
:verbose => true,
|
||||||
:auth_host => '10.0.0.1',
|
:debug => true,
|
||||||
:log_facility => 'LOG_LOCAL0',
|
:auth_host => '10.0.0.1',
|
||||||
:bind_host => '10.0.0.1',
|
:log_facility => 'LOG_LOCAL0',
|
||||||
:bind_port => '9292',
|
:bind_host => '10.0.0.1',
|
||||||
:use_syslog => true
|
:bind_port => '9292',
|
||||||
)
|
:use_syslog => true
|
||||||
|
)
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
shared_examples_for 'a glance registry server' do
|
||||||
it 'configure glance-registry' do
|
it 'configure glance-registry' do
|
||||||
should contain_class('glance::registry').with(
|
should contain_class('glance::registry').with(
|
||||||
:sql_connection => 'mysql://glance:secrete@10.0.0.1/glance',
|
:sql_connection => 'mysql://glance:secrete@10.0.0.1/glance',
|
||||||
:keystone_password => 'secrete',
|
:keystone_password => 'secrete',
|
||||||
:keystone_tenant => 'services',
|
:keystone_tenant => 'services',
|
||||||
:keystone_user => 'glance',
|
:keystone_user => 'glance',
|
||||||
:verbose => true,
|
:verbose => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
:auth_host => '10.0.0.1',
|
:auth_host => '10.0.0.1',
|
||||||
:log_facility => 'LOG_LOCAL0',
|
:log_facility => 'LOG_LOCAL0',
|
||||||
:bind_host => '10.0.0.1',
|
:bind_host => '10.0.0.1',
|
||||||
:bind_port => '9191',
|
:bind_port => '9191',
|
||||||
:use_syslog => true
|
:use_syslog => true
|
||||||
)
|
)
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
shared_examples_for 'openstack image' do
|
||||||
|
|
||||||
|
context 'configure glance-api' do
|
||||||
|
before { params.merge!(:show_image_direct_url => true)}
|
||||||
|
it_configures 'a glance api server'
|
||||||
|
end
|
||||||
|
|
||||||
|
context 'configure glance-registry' do
|
||||||
|
before { params.delete(:show_image_direct_url) }
|
||||||
|
it_configures 'a glance registry server'
|
||||||
end
|
end
|
||||||
|
|
||||||
# TODO(EmilienM) Disabled for now
|
# TODO(EmilienM) Disabled for now
|
||||||
|
Loading…
x
Reference in New Issue
Block a user