From 2e7b4f2027a1147ca28301e4f88adf8274b39a1f Mon Sep 17 00:00:00 2001 From: DUVAL Thomas Date: Thu, 9 Jun 2016 09:11:50 +0200 Subject: Update Keystone core to Mitaka. Change-Id: Ia10d6add16f4a9d25d1f42d420661c46332e69db --- keystone-moon/httpd/keystone-uwsgi-admin.ini | 22 ++++++++++++++++++++++ keystone-moon/httpd/keystone-uwsgi-public.ini | 22 ++++++++++++++++++++++ keystone-moon/httpd/keystone.py | 18 +++++++++++++++++- keystone-moon/httpd/uwsgi-keystone.conf | 13 +++++++++++++ keystone-moon/httpd/wsgi-keystone.conf | 22 ++++++++++++++++++++++ 5 files changed, 96 insertions(+), 1 deletion(-) create mode 100644 keystone-moon/httpd/keystone-uwsgi-admin.ini create mode 100644 keystone-moon/httpd/keystone-uwsgi-public.ini create mode 100644 keystone-moon/httpd/uwsgi-keystone.conf (limited to 'keystone-moon/httpd') diff --git a/keystone-moon/httpd/keystone-uwsgi-admin.ini b/keystone-moon/httpd/keystone-uwsgi-admin.ini new file mode 100644 index 00000000..8624ee3e --- /dev/null +++ b/keystone-moon/httpd/keystone-uwsgi-admin.ini @@ -0,0 +1,22 @@ +[uwsgi] +wsgi-file = /usr/local/bin/keystone-wsgi-admin + +# 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 +uwsgi-socket = 127.0.0.1:35358 + +# Override the default size for headers from the 4k default. +buffer-size = 65535 + +# This is running standalone +master = true + +enable-threads = true + +# Tune this to your environment. +threads = 4 + +# uwsgi recommends this to prevent thundering herd on accept. +thunder-lock = true + +plugins = python diff --git a/keystone-moon/httpd/keystone-uwsgi-public.ini b/keystone-moon/httpd/keystone-uwsgi-public.ini new file mode 100644 index 00000000..c9521163 --- /dev/null +++ b/keystone-moon/httpd/keystone-uwsgi-public.ini @@ -0,0 +1,22 @@ +[uwsgi] +wsgi-file = /usr/local/bin/keystone-wsgi-public + +# 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 +uwsgi-socket = 127.0.0.1:5001 + +# Override the default size for headers from the 4k default. +buffer-size = 65535 + +# This is running standalone +master = true + +enable-threads = true + +# Tune this to your environment. +threads = 4 + +# uwsgi recommends this to prevent thundering herd on accept. +thunder-lock = true + +plugins = python diff --git a/keystone-moon/httpd/keystone.py b/keystone-moon/httpd/keystone.py index 0c7018ff..05683a91 100644 --- a/keystone-moon/httpd/keystone.py +++ b/keystone-moon/httpd/keystone.py @@ -14,12 +14,28 @@ import os +from oslo_log import log +from oslo_log import versionutils + +from keystone.i18n import _LW from keystone.server import wsgi as wsgi_server name = os.path.basename(__file__) +LOG = log.getLogger(__name__) + + +def deprecation_warning(): + versionutils.report_deprecated_feature( + LOG, + _LW('httpd/keystone.py is deprecated as of Mitaka' + ' in favor of keystone-wsgi-admin and keystone-wsgi-public' + ' and may be removed in O.') + ) # NOTE(ldbragst): 'application' is required in this context by WSGI spec. # The following is a reference to Python Paste Deploy documentation # http://pythonpaste.org/deploy/ -application = wsgi_server.initialize_application(name) +application = wsgi_server.initialize_application( + name, + post_log_configured_function=deprecation_warning) diff --git a/keystone-moon/httpd/uwsgi-keystone.conf b/keystone-moon/httpd/uwsgi-keystone.conf new file mode 100644 index 00000000..2d61a5bf --- /dev/null +++ b/keystone-moon/httpd/uwsgi-keystone.conf @@ -0,0 +1,13 @@ +Listen 5000 +Listen 35357 + + + ProxyPass / uwsgi://127.0.0.1:5001/ + + + + ProxyPass / uwsgi://127.0.0.1:35358/ + + +ProxyPass /identity uwsgi://127.0.0.1:5001/ +ProxyPass /identity_admin uwsgi://127.0.0.1:35358/ diff --git a/keystone-moon/httpd/wsgi-keystone.conf b/keystone-moon/httpd/wsgi-keystone.conf index c2224d42..52a46370 100644 --- a/keystone-moon/httpd/wsgi-keystone.conf +++ b/keystone-moon/httpd/wsgi-keystone.conf @@ -7,6 +7,7 @@ Listen 35357 WSGIScriptAlias / /usr/local/bin/keystone-wsgi-public WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On + LimitRequestBody 114688 = 2.4> ErrorLogFormat "%{cu}t %M" @@ -30,6 +31,7 @@ Listen 35357 WSGIScriptAlias / /usr/local/bin/keystone-wsgi-admin WSGIApplicationGroup %{GLOBAL} WSGIPassAuthorization On + LimitRequestBody 114688 = 2.4> ErrorLogFormat "%{cu}t %M" @@ -46,3 +48,23 @@ Listen 35357 + +Alias /identity /usr/local/bin/keystone-wsgi-public + + SetHandler wsgi-script + Options +ExecCGI + + WSGIProcessGroup keystone-public + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + + +Alias /identity_admin /usr/local/bin/keystone-wsgi-admin + + SetHandler wsgi-script + Options +ExecCGI + + WSGIProcessGroup keystone-admin + WSGIApplicationGroup %{GLOBAL} + WSGIPassAuthorization On + -- cgit 1.2.3-korg