Browse Source

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
tags/10.0.0b1
Alex Schultz 3 years ago
parent
commit
874b4350b4

+ 4
- 1
deployment/puppet/openstack_tasks/manifests/glance/glance.pp View File

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

+ 5
- 1
deployment/puppet/openstack_tasks/manifests/murano/murano.pp View File

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

+ 1
- 1
tests/noop/spec/hosts/glance/glance_spec.rb View File

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

+ 18
- 0
tests/noop/spec/hosts/murano/murano_spec.rb View File

@@ -128,6 +128,22 @@ describe manifest do
128 128
 
129 129
     murano_glance_artifacts_plugin = Noop.hiera_hash('murano_glance_artifacts_plugin', {})
130 130
 
131
+    let(:packages_service) do
132
+      if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
133
+        'glance'
134
+      else
135
+        'murano'
136
+      end
137
+    end
138
+
139
+    let(:enable_glare) do
140
+      if murano_glance_artifacts_plugin and murano_glance_artifacts_plugin['enabled'] and facts[:os_package_type] == 'debian'
141
+        true
142
+      else
143
+        false
144
+      end
145
+    end
146
+
131 147
     #############################################################################
132 148
 
133 149
     enable = Noop.hiera_structure('murano/enabled')
@@ -152,6 +168,7 @@ describe manifest do
152 168
                    'identity_uri'        => "#{admin_auth_protocol}://#{admin_auth_address}:35357/",
153 169
                    'notification_driver' => ceilometer_hash['notification_driver'],
154 170
                    'use_neutron'         => use_neutron,
171
+                   'packages_service'    => packages_service,
155 172
                    'rabbit_os_user'      => rabbit_os_user,
156 173
                    'rabbit_os_password'  => rabbit_os_password,
157 174
                    'rabbit_os_port'      => amqp_port,
@@ -194,6 +211,7 @@ describe manifest do
194 211
                    'api_url'  => nil,
195 212
                    'repo_url' => repository_url,
196 213
                    'sync_db'  => false,
214
+                   'enable_glare' => enable_glare
197 215
                )
198 216
       end
199 217
 

Loading…
Cancel
Save