Activate venvs in os-*-config elements source install

This updates the source install scripts for os-apply collect and
  refresh config elements to activate their virtualenvs before
  performing pip installs,  as without this specifing a manifest for
  e.g. os-apply-config breaks devtest build

Closes-bug: #1305151
Change-Id: I3c42de180f76fb122637c801541f14e50169de89
This commit is contained in:
Coleman Corrigan 2014-04-02 18:14:07 +01:00
parent 8dada7907d
commit 2e1730b16f
3 changed files with 21 additions and 0 deletions

View File

@ -4,6 +4,9 @@ set -eux
manifest=$(get-pip-manifest os-apply-config)
virtualenv --setuptools /opt/stack/venvs/os-apply-config
set +u
source /opt/stack/venvs/os-apply-config/bin/activate
set -u
if [ -n "$manifest" ]; then
use-pip-manifest $manifest
@ -23,3 +26,7 @@ write-pip-manifest os-apply-config
ln -s /opt/stack/venvs/os-apply-config/bin/os-apply-config /usr/local/bin/os-apply-config
ln -s /opt/stack/venvs/os-apply-config/bin/os-config-applier /usr/local/bin/os-config-applier
set +u
deactivate
set -u

View File

@ -6,6 +6,9 @@ manifest=$(get-pip-manifest os-collect-config)
install-packages build-essential libz-dev libxslt-dev libxml2-dev python-dev
virtualenv --setuptools /opt/stack/venvs/os-collect-config
set +u
source /opt/stack/venvs/os-collect-config/bin/activate
set -u
if [ -n "$manifest" ]; then
use-pip-manifest $manifest
@ -60,3 +63,7 @@ else
echo Only systems with systemd or upstart are supported.
exit 1
fi
set +u
deactivate
set -u

View File

@ -9,6 +9,9 @@ manifest=$(get-pip-manifest os-refresh-config)
# pip and virtualenv is installed by the pip-and-virtualenv element
virtualenv --setuptools /opt/stack/venvs/os-refresh-config
set +u
source /opt/stack/venvs/os-refresh-config/bin/activate
set -u
if [ -n "$manifest" ]; then
use-pip-manifest $manifest
@ -30,3 +33,7 @@ ln -s /opt/stack/venvs/os-refresh-config/bin/os-refresh-config /usr/local/bin/os
for d in pre-configure.d configure.d migration.d post-configure.d; do
install -m 0755 -o root -g root -d /opt/stack/os-config-refresh/$d
done
set +u
deactivate
set -u