Do not install glare murano config under UCA

UCA does not provide the murano glance artifacts plugin so we need to
exclude it's configuration when deploying UCA.

DocImpact: UCA with murano does not install and configure glare as it is
not available with UCA packages. It will continue to use murano for the
artifact repository when UCA is used.

Change-Id: I356600cf410aaf0ce32f25ff18642e135b7380e9
Closes-Bug: #1586141
This commit is contained in:
Alex Schultz 2016-05-26 16:20:59 -06:00
parent 0c83e60d9a
commit 874b4350b4
4 changed files with 28 additions and 3 deletions

View File

@ -107,7 +107,10 @@ class openstack_tasks::glance::glance {
$show_image_direct_url = pick($glance_hash['show_image_direct_url'], false)
}
if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] {
# NOTE(aschultz): UCA does not have the glance artifacts plugin package
# we can remove the os_package_type once UCA provides the package
# TODO(aschultz): switch to dig at some point
if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] and ($::os_package_type == 'debian') {
package {'murano-glance-artifacts-plugin':
ensure => installed,
}

View File

@ -97,7 +97,11 @@ class openstack_tasks::murano::murano {
action => 'accept',
}
if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] {
# NOTE(aschultz): UCA does not have the glance artifacts plugin package
# we can remove the os_package_type once UCA provides the package
# TODO(aschultz): switch to dig at some point
if $murano_plugins and $murano_plugins['glance_artifacts_plugin'] and $murano_plugins['glance_artifacts_plugin']['enabled'] and ($::os_package_type == 'debian') {
$packages_service = 'glance'
$enable_glare = true
} else {

View File

@ -167,7 +167,7 @@ describe manifest do
should contain_glance_glare_config('DEFAULT/default_log_levels').with_value(default_log_levels.sort.join(','))
end
if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled']
if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
it 'should install murano-glance-artifacts-plugin package' do
should contain_package('murano-glance-artifacts-plugin').with(:ensure => 'installed')
end

View File

@ -128,6 +128,22 @@ describe manifest do
murano_glance_artifacts_plugin = Noop.hiera_hash('murano_glance_artifacts_plugin', {})
let(:packages_service) do
if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
'glance'
else
'murano'
end
end
let(:enable_glare) do
if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
true
else
false
end
end
#############################################################################
enable = Noop.hiera_structure('murano/enabled')
@ -152,6 +168,7 @@ describe manifest do
'identity_uri' => "#{admin_auth_protocol}://#{admin_auth_address}:35357/",
'notification_driver' => ceilometer_hash['notification_driver'],
'use_neutron' => use_neutron,
'packages_service' => packages_service,
'rabbit_os_user' => rabbit_os_user,
'rabbit_os_password' => rabbit_os_password,
'rabbit_os_port' => amqp_port,
@ -194,6 +211,7 @@ describe manifest do
'api_url' => nil,
'repo_url' => repository_url,
'sync_db' => false,
'enable_glare' => enable_glare
)
end