diff --git a/elements/os-apply-config/environment.d/10-os-apply-config-venv-dir.bash b/elements/os-apply-config/environment.d/10-os-apply-config-venv-dir.bash new file mode 100644 index 000000000..47b63872d --- /dev/null +++ b/elements/os-apply-config/environment.d/10-os-apply-config-venv-dir.bash @@ -0,0 +1,3 @@ +if [ -z "${OS_APPLY_CONFIG_VENV_DIR:-}" ]; then + export OS_APPLY_CONFIG_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/os-apply-config"} +fi diff --git a/elements/os-apply-config/install.d/os-apply-config-source-install/10-os-apply-config b/elements/os-apply-config/install.d/os-apply-config-source-install/10-os-apply-config index 6b4771c2e..6aeb265c2 100755 --- a/elements/os-apply-config/install.d/os-apply-config-source-install/10-os-apply-config +++ b/elements/os-apply-config/install.d/os-apply-config-source-install/10-os-apply-config @@ -3,9 +3,9 @@ set -eux manifest=$(get-pip-manifest os-apply-config) -virtualenv --setuptools /opt/stack/venvs/os-apply-config +virtualenv --setuptools $OS_APPLY_CONFIG_VENV_DIR set +u -source /opt/stack/venvs/os-apply-config/bin/activate +source $OS_APPLY_CONFIG_VENV_DIR/bin/activate set -u if [ -n "$manifest" ]; then @@ -15,16 +15,16 @@ else # doesn't manage correctly HTTPS sockets when downloading pbr from # https://pypi.python.org/simple/ if using http_proxy and https_proxy # envvars - /opt/stack/venvs/os-apply-config/bin/pip install -U 'setuptools>=1.0' + $OS_APPLY_CONFIG_VENV_DIR/bin/pip install -U 'setuptools>=1.0' # bug #1293812 : Avoid easy_install triggering on pbr. - /opt/stack/venvs/os-apply-config/bin/pip install -U 'pbr>=0.6,<1.0' - /opt/stack/venvs/os-apply-config/bin/pip install -U os-apply-config + $OS_APPLY_CONFIG_VENV_DIR/bin/pip install -U 'pbr>=0.6,<1.0' + $OS_APPLY_CONFIG_VENV_DIR/bin/pip install -U os-apply-config fi # Write the manifest of what was installed 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 $OS_APPLY_CONFIG_VENV_DIR/bin/os-apply-config /usr/local/bin/os-apply-config set +u deactivate diff --git a/elements/os-collect-config/environment.d/10-os-collect-config-venv-dir.bash b/elements/os-collect-config/environment.d/10-os-collect-config-venv-dir.bash new file mode 100644 index 000000000..a72185f9e --- /dev/null +++ b/elements/os-collect-config/environment.d/10-os-collect-config-venv-dir.bash @@ -0,0 +1,3 @@ +if [ -z "${OS_COLLECT_CONFIG_VENV_DIR:-}" ]; then + export OS_COLLECT_CONFIG_VENV_DIR=${OPENSTACK_VENV_DIR:-"/opt/stack/venvs/os-collect-config"} +fi diff --git a/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config b/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config index 408292b25..bc19a8e69 100755 --- a/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config +++ b/elements/os-collect-config/install.d/os-collect-config-source-install/10-os-collect-config @@ -3,9 +3,9 @@ set -eux manifest=$(get-pip-manifest os-collect-config) -virtualenv --setuptools /opt/stack/venvs/os-collect-config +virtualenv --setuptools $OS_COLLECT_CONFIG_VENV_DIR set +u -source /opt/stack/venvs/os-collect-config/bin/activate +source $OS_COLLECT_CONFIG_VENV_DIR/bin/activate set -u if [ -n "$manifest" ]; then @@ -13,16 +13,16 @@ if [ -n "$manifest" ]; then else # Need setuptools>=1.0 to manage connections when # downloading from pypi using http_proxy and https_proxy - /opt/stack/venvs/os-collect-config/bin/pip install -U 'setuptools>=1.0' + $OS_COLLECT_CONFIG_VENV_DIR/bin/pip install -U 'setuptools>=1.0' # bug #1293812 : Avoid easy_install triggering on pbr. - /opt/stack/venvs/os-collect-config/bin/pip install -U 'pbr>=0.6,<1.0' - /opt/stack/venvs/os-collect-config/bin/pip install -U os-collect-config + $OS_COLLECT_CONFIG_VENV_DIR/bin/pip install -U 'pbr>=0.6,<1.0' + $OS_COLLECT_CONFIG_VENV_DIR/bin/pip install -U os-collect-config fi # Write the manifest of what was installed write-pip-manifest os-collect-config -ln -s /opt/stack/venvs/os-collect-config/bin/os-collect-config /usr/local/bin/os-collect-config +ln -s $OS_COLLECT_CONFIG_VENV_DIR/bin/os-collect-config /usr/local/bin/os-collect-config # Minimal static config for bootstrapping cat > /etc/os-collect-config.conf <