Set DocumentRoot for devstack plugin

Rather than defaulting to /var/www use /var/www/logs so that we can
copy test results into there and then check os-loganalyze works

Change-Id: I7372cae8260b3454906fa9a63e10263a6265f47c
This commit is contained in:
Joshua Hesketh 2015-07-07 21:10:46 +10:00
parent 42fc43e7e6
commit f317bcecb9
3 changed files with 6 additions and 0 deletions

View File

@ -1,5 +1,7 @@
Listen %PORT%
<VirtualHost *:%PORT%>
DocumentRoot %OS_LOGANALYZE_APACHE_DOCUMENTROOT%
# use Apache to compress the results afterwards, to save on the wire
# it's approx 18x savings of wire traffic to compress. We need to
# compress by content types that htmlify can produce

View File

@ -36,6 +36,8 @@ if is_service_enabled os_loganalyze; then
# Perform installation of service source
echo_summary "Installing os_loganalyze"
setup_install $OS_LOGANALYZE_DIR
sudo mkdir -p $OS_LOGANALYZE_APACHE_DOCUMENTROOT
sudo chown www-data:www-data $OS_LOGANALYZE_APACHE_DOCUMENTROOT
elif [[ "$1" == "stack" && "$2" == "post-config" ]]; then
# Configure after the other layer 1 and 2 services have been configured
@ -45,6 +47,7 @@ if is_service_enabled os_loganalyze; then
sudo sed -e "
s/%PORT%/8080/g;
s/%OS_LOGANALYZE_DIR%/${OS_LOGANALYZE_DIR//\//\\\/}/g;
s/%OS_LOGANALYZE_APACHE_DOCUMENTROOT%/${OS_LOGANALYZE_APACHE_DOCUMENTROOT//\//\\\/}/g;
" -i $(apache_site_config_for os_loganalyze)
enable_apache_site os_loganalyze

View File

@ -1,4 +1,5 @@
OS_LOGANALYZE_DIR=$DEST/os-loganalyze
OS_LOGANALYZE_APACHE_TEMPLATE=$OS_LOGANALYZE_DIR/devstack/os-loganalyze.template
OS_LOGANALYZE_APACHE_DOCUMENTROOT=/var/www/logs
enable_service os_loganalyze