Merge "Use keystone wsgi_scripts"
This commit is contained in:
commit
2f746c5243
@ -5,7 +5,7 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
|
|||||||
<VirtualHost *:%PUBLICPORT%>
|
<VirtualHost *:%PUBLICPORT%>
|
||||||
WSGIDaemonProcess keystone-public processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
|
WSGIDaemonProcess keystone-public processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
|
||||||
WSGIProcessGroup keystone-public
|
WSGIProcessGroup keystone-public
|
||||||
WSGIScriptAlias / %PUBLICWSGI%
|
WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-public
|
||||||
WSGIApplicationGroup %{GLOBAL}
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
WSGIPassAuthorization On
|
WSGIPassAuthorization On
|
||||||
<IfVersion >= 2.4>
|
<IfVersion >= 2.4>
|
||||||
@ -16,12 +16,22 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
|
|||||||
%SSLENGINE%
|
%SSLENGINE%
|
||||||
%SSLCERTFILE%
|
%SSLCERTFILE%
|
||||||
%SSLKEYFILE%
|
%SSLKEYFILE%
|
||||||
|
|
||||||
|
<Directory %KEYSTONE_BIN%>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</IfVersion>
|
||||||
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
<VirtualHost *:%ADMINPORT%>
|
<VirtualHost *:%ADMINPORT%>
|
||||||
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
|
WSGIDaemonProcess keystone-admin processes=5 threads=1 user=%USER% display-name=%{GROUP} %VIRTUALENV%
|
||||||
WSGIProcessGroup keystone-admin
|
WSGIProcessGroup keystone-admin
|
||||||
WSGIScriptAlias / %ADMINWSGI%
|
WSGIScriptAlias / %KEYSTONE_BIN%/keystone-wsgi-admin
|
||||||
WSGIApplicationGroup %{GLOBAL}
|
WSGIApplicationGroup %{GLOBAL}
|
||||||
WSGIPassAuthorization On
|
WSGIPassAuthorization On
|
||||||
<IfVersion >= 2.4>
|
<IfVersion >= 2.4>
|
||||||
@ -32,6 +42,16 @@ LogFormat "%h %l %u %t \"%r\" %>s %b \"%{Referer}i\" \"%{User-agent}i\" %D(us)"
|
|||||||
%SSLENGINE%
|
%SSLENGINE%
|
||||||
%SSLCERTFILE%
|
%SSLCERTFILE%
|
||||||
%SSLKEYFILE%
|
%SSLKEYFILE%
|
||||||
|
|
||||||
|
<Directory %KEYSTONE_BIN%>
|
||||||
|
<IfVersion >= 2.4>
|
||||||
|
Require all granted
|
||||||
|
</IfVersion>
|
||||||
|
<IfVersion < 2.4>
|
||||||
|
Order allow,deny
|
||||||
|
Allow from all
|
||||||
|
</IfVersion>
|
||||||
|
</Directory>
|
||||||
</VirtualHost>
|
</VirtualHost>
|
||||||
|
|
||||||
Alias /identity %PUBLICWSGI%
|
Alias /identity %PUBLICWSGI%
|
||||||
|
15
lib/keystone
15
lib/keystone
@ -51,11 +51,6 @@ fi
|
|||||||
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
|
KEYSTONE_CONF_DIR=${KEYSTONE_CONF_DIR:-/etc/keystone}
|
||||||
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
|
KEYSTONE_CONF=$KEYSTONE_CONF_DIR/keystone.conf
|
||||||
KEYSTONE_PASTE_INI=${KEYSTONE_PASTE_INI:-$KEYSTONE_CONF_DIR/keystone-paste.ini}
|
KEYSTONE_PASTE_INI=${KEYSTONE_PASTE_INI:-$KEYSTONE_CONF_DIR/keystone-paste.ini}
|
||||||
if is_suse; then
|
|
||||||
KEYSTONE_WSGI_DIR=${KEYSTONE_WSGI_DIR:-/srv/www/htdocs/keystone}
|
|
||||||
else
|
|
||||||
KEYSTONE_WSGI_DIR=${KEYSTONE_WSGI_DIR:-/var/www/keystone}
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Set up additional extensions, such as oauth1, federation
|
# Set up additional extensions, such as oauth1, federation
|
||||||
# Example of KEYSTONE_EXTENSIONS=oauth1,federation
|
# Example of KEYSTONE_EXTENSIONS=oauth1,federation
|
||||||
@ -132,14 +127,11 @@ function cleanup_keystone {
|
|||||||
|
|
||||||
# _cleanup_keystone_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file
|
# _cleanup_keystone_apache_wsgi() - Remove wsgi files, disable and remove apache vhost file
|
||||||
function _cleanup_keystone_apache_wsgi {
|
function _cleanup_keystone_apache_wsgi {
|
||||||
sudo rm -f $KEYSTONE_WSGI_DIR/*
|
|
||||||
sudo rm -f $(apache_site_config_for keystone)
|
sudo rm -f $(apache_site_config_for keystone)
|
||||||
}
|
}
|
||||||
|
|
||||||
# _config_keystone_apache_wsgi() - Set WSGI config files of Keystone
|
# _config_keystone_apache_wsgi() - Set WSGI config files of Keystone
|
||||||
function _config_keystone_apache_wsgi {
|
function _config_keystone_apache_wsgi {
|
||||||
sudo mkdir -p $KEYSTONE_WSGI_DIR
|
|
||||||
|
|
||||||
local keystone_apache_conf=$(apache_site_config_for keystone)
|
local keystone_apache_conf=$(apache_site_config_for keystone)
|
||||||
local keystone_ssl=""
|
local keystone_ssl=""
|
||||||
local keystone_certfile=""
|
local keystone_certfile=""
|
||||||
@ -161,22 +153,17 @@ function _config_keystone_apache_wsgi {
|
|||||||
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages"
|
venv_path="python-path=${PROJECT_VENV["keystone"]}/lib/$(python_version)/site-packages"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# copy proxy vhost and wsgi file
|
|
||||||
sudo cp $KEYSTONE_DIR/httpd/keystone.py $KEYSTONE_WSGI_DIR/main
|
|
||||||
sudo cp $KEYSTONE_DIR/httpd/keystone.py $KEYSTONE_WSGI_DIR/admin
|
|
||||||
|
|
||||||
sudo cp $FILES/apache-keystone.template $keystone_apache_conf
|
sudo cp $FILES/apache-keystone.template $keystone_apache_conf
|
||||||
sudo sed -e "
|
sudo sed -e "
|
||||||
s|%PUBLICPORT%|$keystone_service_port|g;
|
s|%PUBLICPORT%|$keystone_service_port|g;
|
||||||
s|%ADMINPORT%|$keystone_auth_port|g;
|
s|%ADMINPORT%|$keystone_auth_port|g;
|
||||||
s|%APACHE_NAME%|$APACHE_NAME|g;
|
s|%APACHE_NAME%|$APACHE_NAME|g;
|
||||||
s|%PUBLICWSGI%|$KEYSTONE_WSGI_DIR/main|g;
|
|
||||||
s|%ADMINWSGI%|$KEYSTONE_WSGI_DIR/admin|g;
|
|
||||||
s|%SSLENGINE%|$keystone_ssl|g;
|
s|%SSLENGINE%|$keystone_ssl|g;
|
||||||
s|%SSLCERTFILE%|$keystone_certfile|g;
|
s|%SSLCERTFILE%|$keystone_certfile|g;
|
||||||
s|%SSLKEYFILE%|$keystone_keyfile|g;
|
s|%SSLKEYFILE%|$keystone_keyfile|g;
|
||||||
s|%USER%|$STACK_USER|g;
|
s|%USER%|$STACK_USER|g;
|
||||||
s|%VIRTUALENV%|$venv_path|g
|
s|%VIRTUALENV%|$venv_path|g
|
||||||
|
s|%KEYSTONE_BIN%|$KEYSTONE_BIN_DIR|g
|
||||||
" -i $keystone_apache_conf
|
" -i $keystone_apache_conf
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user