Use wsgi-script installed nova-placement-api
We should use the standard install nova-placement-api script which is managed by the python package instead of a one off copy procedure. Depends-On: I00d032554de273d7493cfb467f81687c08fd5389 Change-Id: I74b39d6a0cedea7c18ce8080dcddb43d13df1de8
This commit is contained in:
parent
79722563a6
commit
43ff27b7e8
@ -40,12 +40,6 @@ PLACEMENT_AUTH_STRATEGY=${PLACEMENT_AUTH_STRATEGY:-placement}
|
|||||||
# yet merged in nova but is coming soon.
|
# yet merged in nova but is coming soon.
|
||||||
PLACEMENT_DB_ENABLED=$(trueorfalse False PLACEMENT_DB_ENABLED)
|
PLACEMENT_DB_ENABLED=$(trueorfalse False PLACEMENT_DB_ENABLED)
|
||||||
|
|
||||||
if is_suse; then
|
|
||||||
PLACEMENT_WSGI_DIR=${PLACEMENT_WSGI_DIR:-/srv/www/htdocs/placement}
|
|
||||||
else
|
|
||||||
PLACEMENT_WSGI_DIR=${PLACEMENT_WSGI_DIR:-/var/www/placement}
|
|
||||||
fi
|
|
||||||
|
|
||||||
if is_ssl_enabled_service "placement-api" || is_service_enabled tls-proxy; then
|
if is_ssl_enabled_service "placement-api" || is_service_enabled tls-proxy; then
|
||||||
PLACEMENT_SERVICE_PROTOCOL="https"
|
PLACEMENT_SERVICE_PROTOCOL="https"
|
||||||
fi
|
fi
|
||||||
@ -73,11 +67,11 @@ function cleanup_placement {
|
|||||||
|
|
||||||
# _config_placement_apache_wsgi() - Set WSGI config files
|
# _config_placement_apache_wsgi() - Set WSGI config files
|
||||||
function _config_placement_apache_wsgi {
|
function _config_placement_apache_wsgi {
|
||||||
sudo mkdir -p $PLACEMENT_WSGI_DIR
|
|
||||||
|
|
||||||
local placement_api_apache_conf
|
local placement_api_apache_conf
|
||||||
local placement_api_port=$PLACEMENT_SERVICE_PORT
|
local placement_api_port=$PLACEMENT_SERVICE_PORT
|
||||||
local venv_path=""
|
local venv_path=""
|
||||||
|
local nova_bin_dir=""
|
||||||
|
nova_bin_dir=$(get_python_exec_prefix)
|
||||||
placement_api_apache_conf=$(apache_site_config_for placement-api)
|
placement_api_apache_conf=$(apache_site_config_for placement-api)
|
||||||
|
|
||||||
# reuse nova's cert if a cert is being used
|
# reuse nova's cert if a cert is being used
|
||||||
@ -90,16 +84,14 @@ function _config_placement_apache_wsgi {
|
|||||||
# there
|
# there
|
||||||
if [[ ${USE_VENV} = True ]]; then
|
if [[ ${USE_VENV} = True ]]; then
|
||||||
venv_path="python-path=${PROJECT_VENV["nova"]}/lib/$(python_version)/site-packages"
|
venv_path="python-path=${PROJECT_VENV["nova"]}/lib/$(python_version)/site-packages"
|
||||||
|
nova_bin_dir=${PROJECT_VENV["nova"]}/bin
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy wsgi application file
|
|
||||||
sudo cp $NOVA_DIR/nova/api/openstack/placement/placement-api.py $PLACEMENT_WSGI_DIR/placement-api
|
|
||||||
|
|
||||||
sudo cp $FILES/apache-placement-api.template $placement_api_apache_conf
|
sudo cp $FILES/apache-placement-api.template $placement_api_apache_conf
|
||||||
sudo sed -e "
|
sudo sed -e "
|
||||||
s|%PUBLICPORT%|$placement_api_port|g;
|
s|%PUBLICPORT%|$placement_api_port|g;
|
||||||
s|%APACHE_NAME%|$APACHE_NAME|g;
|
s|%APACHE_NAME%|$APACHE_NAME|g;
|
||||||
s|%PUBLICWSGI%|$PLACEMENT_WSGI_DIR/placement-api|g;
|
s|%PUBLICWSGI%|$nova_bin_dir/nova-placement-api|g;
|
||||||
s|%SSLENGINE%|$placement_ssl|g;
|
s|%SSLENGINE%|$placement_ssl|g;
|
||||||
s|%SSLCERTFILE%|$placement_certfile|g;
|
s|%SSLCERTFILE%|$placement_certfile|g;
|
||||||
s|%SSLKEYFILE%|$placement_keyfile|g;
|
s|%SSLKEYFILE%|$placement_keyfile|g;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user