[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
@ -101,18 +101,13 @@ class cloud::image(
|
|||||||
keystone_password => $ks_glance_password,
|
keystone_password => $ks_glance_password,
|
||||||
keystone_tenant => 'services',
|
keystone_tenant => 'services',
|
||||||
keystone_user => 'glance',
|
keystone_user => 'glance',
|
||||||
|
show_image_direct_url => true,
|
||||||
log_facility => $log_facility,
|
log_facility => $log_facility,
|
||||||
bind_host => $api_eth,
|
bind_host => $api_eth,
|
||||||
bind_port => $ks_glance_api_internal_port,
|
bind_port => $ks_glance_api_internal_port,
|
||||||
use_syslog => $use_syslog,
|
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':
|
||||||
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",
|
||||||
verbose => $verbose,
|
verbose => $verbose,
|
||||||
|
@ -19,8 +19,6 @@ require 'spec_helper'
|
|||||||
|
|
||||||
describe 'cloud::image' do
|
describe 'cloud::image' do
|
||||||
|
|
||||||
shared_examples_for 'openstack image' do
|
|
||||||
|
|
||||||
let :params do
|
let :params do
|
||||||
{ :glance_db_host => '10.0.0.1',
|
{ :glance_db_host => '10.0.0.1',
|
||||||
:glance_db_user => 'glance',
|
:glance_db_user => 'glance',
|
||||||
@ -39,9 +37,11 @@ describe 'cloud::image' do
|
|||||||
:verbose => true,
|
:verbose => true,
|
||||||
:use_syslog => true,
|
:use_syslog => true,
|
||||||
:log_facility => 'LOG_LOCAL0',
|
:log_facility => 'LOG_LOCAL0',
|
||||||
:api_eth => '10.0.0.1' }
|
: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',
|
||||||
@ -50,6 +50,7 @@ describe 'cloud::image' do
|
|||||||
:registry_port => '9191',
|
:registry_port => '9191',
|
||||||
:keystone_tenant => 'services',
|
:keystone_tenant => 'services',
|
||||||
:keystone_user => 'glance',
|
:keystone_user => 'glance',
|
||||||
|
:show_image_direct_url => true,
|
||||||
:verbose => true,
|
:verbose => true,
|
||||||
:debug => true,
|
:debug => true,
|
||||||
:auth_host => '10.0.0.1',
|
:auth_host => '10.0.0.1',
|
||||||
@ -59,7 +60,9 @@ describe 'cloud::image' do
|
|||||||
:use_syslog => true
|
: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',
|
||||||
@ -75,6 +78,19 @@ describe 'cloud::image' do
|
|||||||
:use_syslog => true
|
:use_syslog => true
|
||||||
)
|
)
|
||||||
end
|
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
|
||||||
|
|
||||||
# TODO(EmilienM) Disabled for now
|
# TODO(EmilienM) Disabled for now
|
||||||
# Follow-up https://github.com/enovance/puppet-cloud/issues/160
|
# Follow-up https://github.com/enovance/puppet-cloud/issues/160
|
||||||
|
Loading…
x
Reference in New Issue
Block a user