wsgi: use pbr wsgi binary

We don't need to provide the app.wsgi script anymore.
pbr provides it within the gnocchi-api binary

Change-Id: I6e16607128849a18b9e6eb1bc5558d1c9df64775
This commit is contained in:
Mehdi Abaakouk 2017-05-18 07:37:14 +02:00
parent 57fdce9639
commit 6377e25bdc
4 changed files with 16 additions and 2 deletions

View File

@ -281,7 +281,7 @@ function configure_gnocchi {
rm -f "$GNOCCHI_UWSGI_FILE"
iniset "$GNOCCHI_UWSGI_FILE" uwsgi http $GNOCCHI_SERVICE_HOST:$GNOCCHI_SERVICE_PORT
iniset "$GNOCCHI_UWSGI_FILE" uwsgi wsgi-file "$GNOCCHI_DIR/gnocchi/rest/app.wsgi"
iniset "$GNOCCHI_UWSGI_FILE" uwsgi wsgi-file "/usr/local/bin/gnocchi-api"
# This is running standalone
iniset "$GNOCCHI_UWSGI_FILE" uwsgi master true
# Set die-on-term & exit-on-reload so that uwsgi shuts down

View File

@ -25,7 +25,7 @@ The following uwsgi configuration file can be used::
[uwsgi]
http = localhost:8041
# Set the correct path depending on your installation
wsgi-file = /usr/lib/python2.7/dist-packages/gnocchi/rest/app.wsgi
wsgi-file = /usr/local/bin/gnocchi-api
master = true
die-on-term = true
threads = 32

View File

@ -17,6 +17,13 @@
See http://pecan.readthedocs.org/en/latest/deployment.html for details.
"""
import debtcollector
from gnocchi.rest import app
application = app.build_wsgi_app()
debtcollector.deprecate(prefix="The wsgi script gnocchi/rest/app.wsgi is deprecated",
postfix=", please use gnocchi-api binary as wsgi script instead",
version="4.0", removal_version="4.1",
category=RuntimeWarning)

View File

@ -0,0 +1,7 @@
---
deprecations:
- |
The custom gnocchi/rest/app.wsgi is now deprecated, the gnocchi-api binary
should be used as wsgi script file. For example, with uwsgi "--wsgi-file
/usr/lib/python2.7/gnocchi/rest/app.wsgi" should be replaced by
"--wsgi-file /usr/bin/gnocchi-api".