From 8cafc80551a0c471e0b1ed55fff258daad3302e2 Mon Sep 17 00:00:00 2001 From: Jay Pipes Date: Mon, 16 Jan 2012 22:01:06 -0500 Subject: [PATCH] Corresponds to the Glance patch that splits paste The patchset https://review.openstack.org/#change,3036 splits paste.deploy application pipeline stuff from regular configuration file options. This is the change to devstack that will be needed to go along with that change in Glance. Change-Id: I606aa81c8ebdf50cdc554611ab3781c554991205 --- files/glance-api-paste.ini | 44 ++++++++++++++++++++++++++++++++ files/glance-api.conf | 45 --------------------------------- files/glance-registry-paste.ini | 29 +++++++++++++++++++++ files/glance-registry.conf | 30 ---------------------- 4 files changed, 73 insertions(+), 75 deletions(-) create mode 100644 files/glance-api-paste.ini create mode 100644 files/glance-registry-paste.ini diff --git a/files/glance-api-paste.ini b/files/glance-api-paste.ini new file mode 100644 index 0000000000..b8832ad662 --- /dev/null +++ b/files/glance-api-paste.ini @@ -0,0 +1,44 @@ +[pipeline:glance-api] +#pipeline = versionnegotiation context apiv1app +# NOTE: use the following pipeline for keystone +pipeline = versionnegotiation authtoken auth-context apiv1app + +# To enable Image Cache Management API replace pipeline with below: +# pipeline = versionnegotiation context imagecache apiv1app +# NOTE: use the following pipeline for keystone auth (with caching) +# pipeline = versionnegotiation authtoken auth-context imagecache apiv1app + +[app:apiv1app] +paste.app_factory = glance.common.wsgi:app_factory +glance.app_factory = glance.api.v1.router:API + +[filter:versionnegotiation] +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter + +[filter:cache] +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = glance.api.middleware.cache:CacheFilter + +[filter:cachemanage] +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = glance.api.middleware.cache_manage:CacheManageFilter + +[filter:context] +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = glance.common.context:ContextMiddleware + +[filter:authtoken] +paste.filter_factory = keystone.middleware.auth_token:filter_factory +service_host = %KEYSTONE_SERVICE_HOST% +service_port = %KEYSTONE_SERVICE_PORT% +service_protocol = %KEYSTONE_SERVICE_PROTOCOL% +auth_host = %KEYSTONE_AUTH_HOST% +auth_port = %KEYSTONE_AUTH_PORT% +auth_protocol = %KEYSTONE_AUTH_PROTOCOL% +auth_uri = %KEYSTONE_SERVICE_PROTOCOL%://%KEYSTONE_SERVICE_HOST%:%KEYSTONE_SERVICE_PORT%/ +admin_token = %SERVICE_TOKEN% + +[filter:auth-context] +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware diff --git a/files/glance-api.conf b/files/glance-api.conf index 6c670b56c2..b4ba098aa3 100644 --- a/files/glance-api.conf +++ b/files/glance-api.conf @@ -137,48 +137,3 @@ scrub_time = 43200 # Directory that the scrubber will use to remind itself of what to delete # Make sure this is also set in glance-scrubber.conf scrubber_datadir = /var/lib/glance/scrubber - -[pipeline:glance-api] -#pipeline = versionnegotiation context apiv1app -# NOTE: use the following pipeline for keystone -pipeline = versionnegotiation authtoken auth-context apiv1app - -# To enable Image Cache Management API replace pipeline with below: -# pipeline = versionnegotiation context imagecache apiv1app -# NOTE: use the following pipeline for keystone auth (with caching) -# pipeline = versionnegotiation authtoken auth-context imagecache apiv1app - -[app:apiv1app] -paste.app_factory = glance.common.wsgi:app_factory -glance.app_factory = glance.api.v1.router:API - -[filter:versionnegotiation] -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = glance.api.middleware.version_negotiation:VersionNegotiationFilter - -[filter:cache] -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = glance.api.middleware.cache:CacheFilter - -[filter:cachemanage] -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = glance.api.middleware.cache_manage:CacheManageFilter - -[filter:context] -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = glance.common.context:ContextMiddleware - -[filter:authtoken] -paste.filter_factory = keystone.middleware.auth_token:filter_factory -service_protocol = http -service_host = 127.0.0.1 -service_port = 5000 -auth_host = 127.0.0.1 -auth_port = 35357 -auth_protocol = http -auth_uri = http://127.0.0.1:5000/ -admin_token = %SERVICE_TOKEN% - -[filter:auth-context] -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = keystone.middleware.glance_auth_token:KeystoneContextMiddleware diff --git a/files/glance-registry-paste.ini b/files/glance-registry-paste.ini new file mode 100644 index 0000000000..f4130ec9e2 --- /dev/null +++ b/files/glance-registry-paste.ini @@ -0,0 +1,29 @@ +[pipeline:glance-registry] +#pipeline = context registryapp +# NOTE: use the following pipeline for keystone +pipeline = authtoken auth-context context registryapp + +[app:registryapp] +paste.app_factory = glance.common.wsgi:app_factory +glance.app_factory = glance.registry.api.v1:API + +[filter:context] +context_class = glance.registry.context.RequestContext +paste.filter_factory = glance.common.wsgi:filter_factory +glance.filter_factory = glance.common.context:ContextMiddleware + +[filter:authtoken] +paste.filter_factory = keystone.middleware.auth_token:filter_factory +service_host = %KEYSTONE_SERVICE_HOST% +service_port = %KEYSTONE_SERVICE_PORT% +service_protocol = %KEYSTONE_SERVICE_PROTOCOL% +auth_host = %KEYSTONE_AUTH_HOST% +auth_port = %KEYSTONE_AUTH_PORT% +auth_protocol = %KEYSTONE_AUTH_PROTOCOL% +auth_uri = %KEYSTONE_SERVICE_PROTOCOL%://%KEYSTONE_SERVICE_HOST%:%KEYSTONE_SERVICE_PORT%/ +admin_token = %SERVICE_TOKEN% + +[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 diff --git a/files/glance-registry.conf b/files/glance-registry.conf index e732e86989..2c32745740 100644 --- a/files/glance-registry.conf +++ b/files/glance-registry.conf @@ -42,33 +42,3 @@ api_limit_max = 1000 # If a `limit` query param is not provided in an api request, it will # default to `limit_param_default` limit_param_default = 25 - -[pipeline:glance-registry] -#pipeline = context registryapp -# NOTE: use the following pipeline for keystone -pipeline = authtoken auth-context context registryapp - -[app:registryapp] -paste.app_factory = glance.common.wsgi:app_factory -glance.app_factory = glance.registry.api.v1:API - -[filter:context] -context_class = glance.registry.context.RequestContext -paste.filter_factory = glance.common.wsgi:filter_factory -glance.filter_factory = glance.common.context:ContextMiddleware - -[filter:authtoken] -paste.filter_factory = keystone.middleware.auth_token:filter_factory -service_protocol = http -service_host = 127.0.0.1 -service_port = 5000 -auth_host = 127.0.0.1 -auth_port = 35357 -auth_protocol = http -auth_uri = http://127.0.0.1:5000/ -admin_token = %SERVICE_TOKEN% - -[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