Merge "Heat/Horizon/Tempest: don't hard code venv dir"
This commit is contained in:
commit
34f867f4c7
@ -6,6 +6,6 @@ install-packages python-mysqldb
|
||||
cp -r /opt/stack/heat/etc/heat/environment.d /etc/heat
|
||||
cp -r /opt/stack/heat/etc/heat/templates /etc/heat
|
||||
|
||||
ln -s /opt/stack/venvs/heat/bin/heat-manage /usr/local/bin/heat-manage
|
||||
ln -s $HEAT_VENV_DIR/bin/heat-manage /usr/local/bin/heat-manage
|
||||
|
||||
os-svc-daemon heat-engine heat heat-engine
|
||||
|
1
elements/heat/environment.d/10-heat-venv-dir.bash
Normal file
1
elements/heat/environment.d/10-heat-venv-dir.bash
Normal file
@ -0,0 +1 @@
|
||||
export HEAT_VENV_DIR=${HEAT_VENV_DIR:-"/opt/stack/venvs/heat"}
|
1
elements/horizon/environment.d/10-horizon-venv-dir.bash
Normal file
1
elements/horizon/environment.d/10-horizon-venv-dir.bash
Normal file
@ -0,0 +1 @@
|
||||
export HORIZON_VENV_DIR=${HORIZON_VENV_DIR:-"/opt/stack/venvs/horizon"}
|
@ -1,22 +1,22 @@
|
||||
<VirtualHost *:80>
|
||||
WSGIScriptAlias / /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
|
||||
WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10 home=/opt/stack/venvs/horizon python-path=/opt/stack/venvs/horizon:/opt/stack/venvs/horizon/lib/python2.7/site-packages/
|
||||
WSGIScriptAlias / HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/wsgi/django.wsgi
|
||||
WSGIDaemonProcess horizon user=horizon group=horizon processes=3 threads=10 home=HORIZON_VENV_DIR python-path=HORIZON_VENV_DIR:HORIZON_VENV_DIR/lib/python2.7/site-packages/
|
||||
WSGIApplicationGroup %{GLOBAL}
|
||||
|
||||
SetEnv APACHE_RUN_USER horizon
|
||||
SetEnv APACHE_RUN_GROUP horizon
|
||||
WSGIProcessGroup horizon
|
||||
|
||||
DocumentRoot /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
Alias /static /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
Alias /media /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
DocumentRoot HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
Alias /static HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
Alias /media HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/static
|
||||
|
||||
<Directory />
|
||||
Options FollowSymLinks
|
||||
AllowOverride None
|
||||
</Directory>
|
||||
|
||||
<Directory /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard/static>
|
||||
<Directory HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/static>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
Require all granted
|
||||
AllowOverride None
|
||||
@ -24,7 +24,7 @@
|
||||
allow from all
|
||||
</Directory>
|
||||
|
||||
<Directory /opt/stack/venvs/horizon/lib/python2.7/site-packages/openstack_dashboard>
|
||||
<Directory HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard>
|
||||
Options Indexes FollowSymLinks MultiViews
|
||||
Require all granted
|
||||
AllowOverride None
|
||||
|
@ -4,7 +4,8 @@ set -eux
|
||||
install-packages libapache2-mod-wsgi libssl-dev libffi-dev
|
||||
|
||||
if [ -d /etc/httpd ]; then
|
||||
install -m 0644 -o root -g root $(dirname $0)/../files/horizon.conf /etc/httpd/conf.d/horizon.conf
|
||||
install -m 0644 -o root -g root $(dirname $0)/../files/horizon.conf /etc/httpd/conf.d/horizon.conf
|
||||
sed -e "s|HORIZON_VENV_DIR|$HORIZON_VENV_DIR|g" -i /etc/httpd/conf.d/horizon.conf
|
||||
fi
|
||||
|
||||
if [ -d /etc/apache2 ]; then
|
||||
@ -12,6 +13,7 @@ if [ -d /etc/apache2 ]; then
|
||||
ln -s /etc/apache2/sites-available/horizon.conf /etc/apache2/sites-enabled/horizon.conf
|
||||
ln -s /var/log/apache2 /var/log/httpd
|
||||
rm -f /etc/apache2/sites-enabled/{000-default.conf,default.conf,default-ssl.conf}
|
||||
sed -e "s|HORIZON_VENV_DIR|$HORIZON_VENV_DIR|g" -i /etc/apache2/sites-available/horizon.conf
|
||||
fi
|
||||
|
||||
os-svc-install -u horizon -r /opt/stack/horizon
|
||||
|
@ -0,0 +1 @@
|
||||
export HORIZON_VENV_DIR=${HORIZON_VENV_DIR:-"/opt/stack/venvs/horizon"}
|
@ -1,6 +1,8 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
cp /etc/horizon/local_settings.py $HORIZON_VENV_DIR/lib/python2.7/site-packages/openstack_dashboard/local/local_settings.py
|
||||
|
||||
# TODO(shadower) workaround for:
|
||||
# https://bugs.launchpad.net/os-apply-config/+bug/1246266
|
||||
chmod 600 /etc/horizon/.secret_key_store
|
||||
@ -8,5 +10,5 @@ chown horizon:horizon /etc/horizon/.secret_key_store
|
||||
|
||||
# Precompile the Horizon assets. Can't do it in install.d because it depends on
|
||||
# the local_settings.py config file.
|
||||
source /opt/stack/venvs/horizon/bin/activate
|
||||
source $HORIZON_VENV_DIR/bin/activate
|
||||
DJANGO_SETTINGS_MODULE=openstack_dashboard.settings django-admin.py compress
|
||||
|
@ -100,8 +100,4 @@ set /files/opt/stack/tempest/etc/tempest.conf/network/tenant_network_cidr 172.16
|
||||
save
|
||||
EOF
|
||||
|
||||
# activate throws errors if nounset is set
|
||||
set +u
|
||||
. /opt/stack/venvs/tempest/bin/activate
|
||||
set -u
|
||||
testr run --parallel $(python tests2skip.py tests2skip.txt)
|
||||
|
1
elements/tempest/environment.d/10-tempest-venv-dir.bash
Normal file
1
elements/tempest/environment.d/10-tempest-venv-dir.bash
Normal file
@ -0,0 +1 @@
|
||||
export TEMPEST_VENV_DIR=${TEMPEST_VENV_DIR:-"/opt/stack/venvs/tempest"}
|
@ -6,10 +6,13 @@ install-packages augeas-tools
|
||||
|
||||
os-svc-install -u tempest -r /opt/stack/tempest
|
||||
|
||||
source /opt/stack/venvs/tempest/bin/activate
|
||||
source $TEMPEST_VENV_DIR/bin/activate
|
||||
cd /opt/stack/tempest
|
||||
pip install -r test-requirements.txt
|
||||
testr init
|
||||
|
||||
# soft link testr into PATH so we can use it directly in run-tempest
|
||||
ln -sf $TEMPEST_VENV_DIR/bin/testr /usr/local/bin/testr
|
||||
|
||||
install -m 0664 -o root -g root $(dirname $0)/../tests2skip.txt /opt/stack/tempest/tests2skip.txt
|
||||
install -m 0775 -o root -g root $(dirname $0)/../tests2skip.py /opt/stack/tempest/tests2skip.py
|
||||
|
Loading…
Reference in New Issue
Block a user