commit
1180bffdb1
|
@ -22,7 +22,7 @@ node glance {
|
|||
|
||||
node glance_keystone {
|
||||
class { 'concat::setup': }
|
||||
class { 'keystone::sqlite': }
|
||||
class { 'keystone::config::sqlite': }
|
||||
class { 'keystone':
|
||||
log_verbose => true,
|
||||
log_debug => true,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
# = Class: glance::api
|
||||
|
||||
#
|
||||
# This class installs and configures the glance api server.
|
||||
#
|
||||
|
@ -53,14 +53,6 @@ class glance::api(
|
|||
# used to configure concat
|
||||
include 'concat::setup'
|
||||
|
||||
# TODO I need to work with Chris to ensure that I understand
|
||||
# his auth requirements
|
||||
if($auth_type == 'keystone') {
|
||||
$context_type = 'context'
|
||||
} else {
|
||||
$context_type = 'auth-context'
|
||||
}
|
||||
|
||||
File {
|
||||
ensure => present,
|
||||
owner => 'glance',
|
||||
|
|
|
@ -15,6 +15,7 @@ class glance(
|
|||
name => $::glance::params::package_name,
|
||||
ensure => $package_ensure,
|
||||
}
|
||||
# TODO - if the packaging is fixed can I remove this?
|
||||
if(! defined(Package['python-migrate'])) {
|
||||
package { 'python-migrate': ensure => 'present' }
|
||||
}
|
||||
|
|
|
@ -17,12 +17,6 @@ class glance::registry(
|
|||
$keystone_password = 'ChangeMe'
|
||||
) inherits glance {
|
||||
|
||||
if($auth_type == 'keystone') {
|
||||
$context_type = 'context'
|
||||
} else {
|
||||
$context_type = 'auth-context'
|
||||
}
|
||||
|
||||
File {
|
||||
ensure => present,
|
||||
owner => 'glance',
|
||||
|
|
|
@ -8,7 +8,7 @@ pipeline = versionnegotiation context apiv1app
|
|||
# flavor = keystone
|
||||
#
|
||||
[pipeline:glance-api-keystone]
|
||||
pipeline = versionnegotiation authtoken <%= context_type %> apiv1app
|
||||
pipeline = versionnegotiation authtoken context apiv1app
|
||||
|
||||
# Use the following pipeline to enable transparent caching of image files
|
||||
# i.e. in glance-api.conf:
|
||||
|
@ -24,7 +24,7 @@ pipeline = versionnegotiation context cache apiv1app
|
|||
# flavor = keystone+caching
|
||||
#
|
||||
[pipeline:glance-api-keystone+caching]
|
||||
pipeline = versionnegotiation authtoken <%= context_type %> cache apiv1app
|
||||
pipeline = versionnegotiation authtoken context cache apiv1app
|
||||
|
||||
# Use the following pipeline to enable the Image Cache Management API
|
||||
# i.e. in glance-api.conf:
|
||||
|
@ -40,7 +40,7 @@ pipeline = versionnegotiation context cache cachemanage apiv1app
|
|||
# flavor = keystone+cachemanagement
|
||||
#
|
||||
[pipeline:glance-api-keystone+cachemanagement]
|
||||
pipeline = versionnegotiation authtoken <%= context_type %> cache cachemanage apiv1app
|
||||
pipeline = versionnegotiation authtoken context cache cachemanage apiv1app
|
||||
|
||||
[app:apiv1app]
|
||||
paste.app_factory = glance.common.wsgi:app_factory
|
||||
|
@ -72,13 +72,4 @@ auth_uri = <%= auth_uri %>
|
|||
admin_tenant_name = <%= keystone_tenant %>
|
||||
admin_user = <%= keystone_user %>
|
||||
admin_password = <%= keystone_password %>
|
||||
<% else -%>
|
||||
admin_token = <%= admin_token %>
|
||||
<% end -%>
|
||||
|
||||
<% if context_type == 'auth-context' -%>
|
||||
[filter:auth-context]
|
||||
paste.filter_factory = glance.common.wsgi:filter_factory
|
||||
glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware
|
||||
<% end -%>
|
||||
|
||||
|
|
|
@ -8,7 +8,7 @@ pipeline = context registryapp
|
|||
# flavor = keystone
|
||||
|
||||
[pipeline:glance-registry-keystone]
|
||||
pipeline = authtoken <%= context_type %> registryapp
|
||||
pipeline = authtoken context registryapp
|
||||
|
||||
[app:registryapp]
|
||||
paste.app_factory = glance.common.wsgi:app_factory
|
||||
|
@ -29,13 +29,4 @@ auth_uri = <%= auth_uri %>
|
|||
admin_tenant_name = <%= keystone_tenant %>
|
||||
admin_user = <%= keystone_user %>
|
||||
admin_password = <%= keystone_password %>
|
||||
<% else -%>
|
||||
admin_token = <%= admin_token %>
|
||||
<% end -%>
|
||||
|
||||
<% if context_type == 'auth-context' -%>
|
||||
[filter:auth-context]
|
||||
context_class = glance.registry.context.RequestContext
|
||||
paste.filter_factory = glance.common.wsgi:filter_factory
|
||||
glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware
|
||||
<% end -%>
|
||||
|
|
Loading…
Reference in New Issue