diff --git a/devstack/files/apache-trove-api.template b/devstack/files/apache-trove-api.template index 767f18cffe..d82b3cd759 100644 --- a/devstack/files/apache-trove-api.template +++ b/devstack/files/apache-trove-api.template @@ -43,3 +43,5 @@ Listen %TROVE_SERVICE_PORT% + +%WSGIPYTHONHOME% diff --git a/devstack/plugin.sh b/devstack/plugin.sh index d7fac7a4fd..113ceea235 100644 --- a/devstack/plugin.sh +++ b/devstack/plugin.sh @@ -172,12 +172,17 @@ function config_trove_apache_wsgi { sudo cp $TROVE_DIR/trove/cmd/app_wsgi.py $TROVE_WSGI_DIR/app_wsgi.py trove_apache_conf=$(apache_site_config_for trove-api) sudo cp $TROVE_DEVSTACK_FILES/apache-trove-api.template ${trove_apache_conf} + local wsgi_venv_config="" + if [[ "$GLOBAL_VENV" == "True" ]] ; then + wsgi_venv_config="WSGIPythonHome $DEVSTACK_VENV" + fi sudo sed -e " s|%TROVE_SERVICE_PORT%|${TROVE_SERVICE_PORT}|g; s|%TROVE_WSGI_DIR%|${TROVE_WSGI_DIR}|g; s|%USER%|${STACK_USER}|g; s|%APACHE_NAME%|${APACHE_NAME}|g; s|%APIWORKERS%|${API_WORKERS}|g; + s|%WSGIPYTHONHOME%|${wsgi_venv_config}|g; " -i ${trove_apache_conf} enable_apache_site trove-api }