Install and enable apache uwsgi proxy
The uwsgi proxy version that comes with Ubuntu xenial is too old, so we have to build it from source. This is a temporary solution until the next LTS. This lays the ground work for using it in keystone. Change-Id: I00fb1759e6988c7df0ce0f3df5ff1ce9fd7cd381
This commit is contained in:
parent
a1446b960f
commit
604e598e2a
42
lib/apache
42
lib/apache
@ -66,6 +66,48 @@ function enable_apache_mod {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# NOTE(sdague): Install uwsgi including apache module, we need to get
|
||||||
|
# to 2.0.6+ to get a working mod_proxy_uwsgi. We can probably build a
|
||||||
|
# check for that and do it differently for different platforms.
|
||||||
|
function install_apache_uwsgi {
|
||||||
|
local apxs="apxs2"
|
||||||
|
if is_fedora; then
|
||||||
|
apxs="apxs"
|
||||||
|
fi
|
||||||
|
|
||||||
|
# Ubuntu xenial is back level on uwsgi so the proxy doesn't
|
||||||
|
# actually work. Hence we have to build from source for now.
|
||||||
|
#
|
||||||
|
# Centos 7 actually has the module in epel, but there was a big
|
||||||
|
# push to disable epel by default. As such, compile from source
|
||||||
|
# there as well.
|
||||||
|
|
||||||
|
local dir
|
||||||
|
dir=$(mktemp -d)
|
||||||
|
pushd $dir
|
||||||
|
pip_install uwsgi
|
||||||
|
pip download uwsgi -c $REQUIREMENTS_DIR/upper-constraints.txt
|
||||||
|
local uwsgi
|
||||||
|
uwsgi=$(ls uwsgi*)
|
||||||
|
tar xvf $uwsgi
|
||||||
|
cd uwsgi*/apache2
|
||||||
|
sudo $apxs -i -c mod_proxy_uwsgi.c
|
||||||
|
popd
|
||||||
|
# delete the temp directory
|
||||||
|
sudo rm -rf $dir
|
||||||
|
|
||||||
|
if is_ubuntu; then
|
||||||
|
# we've got to enable proxy and proxy_uwsgi for this to work
|
||||||
|
sudo a2enmod proxy
|
||||||
|
sudo a2enmod proxy_uwsgi
|
||||||
|
elif is_fedora; then
|
||||||
|
# redhat is missing a nice way to turn on/off modules
|
||||||
|
echo "LoadModule proxy_uwsgi_module modules/mod_proxy_uwsgi.so" \
|
||||||
|
| sudo tee /etc/httpd/conf.modules.d/02-proxy-uwsgi.conf
|
||||||
|
fi
|
||||||
|
restart_apache_server
|
||||||
|
}
|
||||||
|
|
||||||
# install_apache_wsgi() - Install Apache server and wsgi module
|
# install_apache_wsgi() - Install Apache server and wsgi module
|
||||||
function install_apache_wsgi {
|
function install_apache_wsgi {
|
||||||
# Apache installation, because we mark it NOPRIME
|
# Apache installation, because we mark it NOPRIME
|
||||||
|
3
stack.sh
3
stack.sh
@ -780,6 +780,9 @@ echo_summary "Installing OpenStack project source"
|
|||||||
# Install Oslo libraries
|
# Install Oslo libraries
|
||||||
install_oslo
|
install_oslo
|
||||||
|
|
||||||
|
# Install uwsgi
|
||||||
|
install_apache_uwsgi
|
||||||
|
|
||||||
# Install client libraries
|
# Install client libraries
|
||||||
install_keystoneauth
|
install_keystoneauth
|
||||||
install_keystoneclient
|
install_keystoneclient
|
||||||
|
Loading…
Reference in New Issue
Block a user