diff options
author | wu.chunyang <wuchunyang@yovole.com> | 2022-08-24 17:17:42 +0800 |
---|---|---|
committer | wu.chunyang <wuchunyang@yovole.com> | 2022-08-25 11:10:33 +0800 |
commit | 44c3cdef5c31bdcdc8e4961ec9d8ce1647aa8c09 (patch) | |
tree | 65b5f3d9670187df1c4950059be953b96e7bfcd2 | |
parent | 528741b449a843d118c527d160dedebb523fd49d (diff) | |
download | trove-44c3cdef5c31bdcdc8e4961ec9d8ce1647aa8c09.tar.gz |
Rename app.wsgi to app_wsgi.py
1. app.wsgi is a python script and should be end with py extension.
2. Generate trove-wsgi script which is needed by kolla to support
https and ipv6.
3. Ignore build directory in git
4. update docs
Change-Id: Ibbd6ecb8db25aa3a443d3f526f4cf6d418eb26f3
-rw-r--r-- | .gitignore | 5 | ||||
-rw-r--r-- | devstack/files/apache-trove-api.template | 2 | ||||
-rw-r--r-- | devstack/plugin.sh | 2 | ||||
-rw-r--r-- | doc/source/install/apache-mod-wsgi.rst | 2 | ||||
-rw-r--r-- | etc/apache2/trove | 2 | ||||
-rw-r--r-- | setup.cfg | 2 | ||||
-rw-r--r-- | tox.ini | 2 | ||||
-rw-r--r-- | trove/cmd/api_wsgi.py (renamed from trove/cmd/app.wsgi) | 1 |
8 files changed, 13 insertions, 5 deletions
@@ -30,6 +30,11 @@ trove.iml # Files generated by Visual Studio Code .vscode/ +# Files generated by setup.py +*.egg-info +build +.eggs + # Sphinx doc/build/* doc/source/api/* diff --git a/devstack/files/apache-trove-api.template b/devstack/files/apache-trove-api.template index 06c88b26..767f18cf 100644 --- a/devstack/files/apache-trove-api.template +++ b/devstack/files/apache-trove-api.template @@ -21,7 +21,7 @@ Listen %TROVE_SERVICE_PORT% <VirtualHost *:%TROVE_SERVICE_PORT%> WSGIDaemonProcess trove-api user=%USER% processes=%APIWORKERS% threads=1 display-name=%{GROUP} - WSGIScriptAlias / %TROVE_WSGI_DIR%/app.wsgi + WSGIScriptAlias / %TROVE_WSGI_DIR%/app_wsgi.py WSGIApplicationGroup %{GLOBAL} WSGIProcessGroup trove-api WSGIPassAuthorization On diff --git a/devstack/plugin.sh b/devstack/plugin.sh index 2b34158e..3ef04fbb 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -169,7 +169,7 @@ function config_trove_apache_wsgi { local trove_apache_conf sudo mkdir -p ${TROVE_WSGI_DIR} - sudo cp $TROVE_DIR/trove/cmd/app.wsgi $TROVE_WSGI_DIR/app.wsgi + sudo cp $TROVE_DIR/trove/cmd/app_wsgi.py $TROVE_WSGI_DIR/app.wsgi trove_apache_conf=$(apache_site_config_for trove-api) sudo cp $TROVE_DEVSTACK_FILES/apache-trove-api.template ${trove_apache_conf} sudo sed -e " diff --git a/doc/source/install/apache-mod-wsgi.rst b/doc/source/install/apache-mod-wsgi.rst index 61968662..7b4d855d 100644 --- a/doc/source/install/apache-mod-wsgi.rst +++ b/doc/source/install/apache-mod-wsgi.rst @@ -36,7 +36,7 @@ Installing API behind mod_wsgi * Modify the ``WSGIDaemonProcess`` directive to set the ``user`` and ``group`` values to appropriate user on your server. * Modify the ``WSGIScriptAlias`` directive to point to the - trove/api/app.wsgi script. + trove/api/app_wsgi.py script. * Modify the ``Directory`` directive to set the path to the Trove API code. * Modify the ``ErrorLog and CustomLog`` to redirect the logs to the right diff --git a/etc/apache2/trove b/etc/apache2/trove index 1ed82c26..d8257423 100644 --- a/etc/apache2/trove +++ b/etc/apache2/trove @@ -19,7 +19,7 @@ Listen 8779 <VirtualHost *:8779> WSGIDaemonProcess trove-api user=stack group=stack processes=2 threads=2 display-name=%{GROUP} - WSGIScriptAlias / /opt/stack/trove/trove/cmd/app.wsgi + WSGIScriptAlias / /opt/stack/trove/trove/cmd/app_wsgi.py WSGIProcessGroup trove-api ErrorLog /var/log/httpd/trove_error.log @@ -26,6 +26,8 @@ packages = trove [entry_points] +wsgi_scripts = + trove-wsgi = trove.cmd.api_wsgi:wsgimain console_scripts = trove-api = trove.cmd.api:main trove-taskmanager = trove.cmd.taskmanager:main @@ -65,7 +65,7 @@ builtins = _ # add *.yaml for playbooks/trove-devstack-base.yaml, as it will be matched by # trove-* in the "filename" configuration. exclude=.venv,.tox,.git,dist,doc,*egg,tools,etc,build,*.po,*.pot,integration,releasenotes,*.yaml -filename=*.py,trove-*,app.wsgi +filename=*.py,trove-* [hacking] import_exceptions = trove.common.i18n diff --git a/trove/cmd/app.wsgi b/trove/cmd/api_wsgi.py index a134539c..78eadd5b 100644 --- a/trove/cmd/app.wsgi +++ b/trove/cmd/api_wsgi.py @@ -38,4 +38,5 @@ def wsgimain(CONF): LOG.debug("Trove started on %s", CONF.host) return pastedeploy.paste_deploy_app(conf_file, 'trove', {}) + application = wsgimain() |