Merge "Add new keystone.wsgi module"
This commit is contained in:
commit
6269d84ea1
@ -57,6 +57,7 @@ apidoc_excluded_paths = [
|
|||||||
'tests/*',
|
'tests/*',
|
||||||
'tests',
|
'tests',
|
||||||
'test',
|
'test',
|
||||||
|
'wsgi',
|
||||||
# TODO(gmann): with new release of SQLAlchemy(1.4.27) TypeDecorator used
|
# TODO(gmann): with new release of SQLAlchemy(1.4.27) TypeDecorator used
|
||||||
# in common/sql/core.py file started failing. Remove this oncethe issue of
|
# in common/sql/core.py file started failing. Remove this oncethe issue of
|
||||||
# TypeDecorator is fixed.
|
# TypeDecorator is fixed.
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[uwsgi]
|
[uwsgi]
|
||||||
wsgi-file = /usr/local/bin/keystone-wsgi-admin
|
module = keystone.wsgi.api:application
|
||||||
|
|
||||||
# Versions of mod_proxy_uwsgi>=2.0.6 should use a UNIX socket, see
|
# Versions of mod_proxy_uwsgi>=2.0.6 should use a UNIX socket, see
|
||||||
# http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
|
# http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
|
||||||
|
@ -1,5 +1,5 @@
|
|||||||
[uwsgi]
|
[uwsgi]
|
||||||
wsgi-file = /usr/local/bin/keystone-wsgi-public
|
module = keystone.wsgi.api:application
|
||||||
|
|
||||||
# Versions of mod_proxy_uwsgi>=2.0.6 should use a UNIX socket, see
|
# Versions of mod_proxy_uwsgi>=2.0.6 should use a UNIX socket, see
|
||||||
# http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
|
# http://uwsgi-docs.readthedocs.org/en/latest/Apache.html#mod-proxy-uwsgi
|
||||||
|
0
keystone/wsgi/__init__.py
Normal file
0
keystone/wsgi/__init__.py
Normal file
22
keystone/wsgi/api.py
Normal file
22
keystone/wsgi/api.py
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
# Licensed under the Apache License, Version 2.0 (the "License"); you may
|
||||||
|
# not use this file except in compliance with the License. You may obtain
|
||||||
|
# a copy of the License at
|
||||||
|
#
|
||||||
|
# http://www.apache.org/licenses/LICENSE-2.0
|
||||||
|
#
|
||||||
|
# Unless required by applicable law or agreed to in writing, software
|
||||||
|
# distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
|
||||||
|
# WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
|
||||||
|
# License for the specific language governing permissions and limitations
|
||||||
|
# under the License.
|
||||||
|
|
||||||
|
"""WSGI application entry-point for Keystone API."""
|
||||||
|
|
||||||
|
import threading
|
||||||
|
|
||||||
|
from keystone.server import wsgi
|
||||||
|
|
||||||
|
application = None
|
||||||
|
with threading.Lock():
|
||||||
|
if application is None:
|
||||||
|
application = wsgi.initialize_public_application()
|
@ -0,0 +1,22 @@
|
|||||||
|
---
|
||||||
|
features:
|
||||||
|
- |
|
||||||
|
A new module, ``keystone.wsgi``, has been added as a place to gather WSGI
|
||||||
|
``application`` objects. This is intended to ease deployment by providing
|
||||||
|
a consistent location for these objects. For example, if using uWSGI then
|
||||||
|
instead of:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[uwsgi]
|
||||||
|
wsgi-file = /bin/keystone-wsgi-public
|
||||||
|
|
||||||
|
You can now use:
|
||||||
|
|
||||||
|
.. code-block:: ini
|
||||||
|
|
||||||
|
[uwsgi]
|
||||||
|
module = keystone.wsgi.api:application
|
||||||
|
|
||||||
|
This also simplifies deployment with other WSGI servers that expect module
|
||||||
|
paths such as gunicorn.
|
Loading…
Reference in New Issue
Block a user