tripleo-image-elements/elements/heat-cfntools/install.d/05-heat-cfntools

32 lines
843 B
Bash
Executable File

#!/bin/bash
set -uex
if [[ "fedora" = "$DISTRO_NAME" ]]; then
# Remove the pre-installed package version of heat-cfntools
yum remove -y heat-cfntools
fi
VENV=/opt/stack/venvs/heat-cfntools
virtualenv --setuptools $VENV
set +u
source $VENV/bin/activate
set -u
# Ensure latest pip rather than the one bundled with virtualenv
$VENV/bin/pip install -U pip
# Need setuptools>=1.0 to manage connections when
# downloading from pypi using http_proxy and https_proxy
$VENV/bin/pip install -U 'setuptools>=1.0'
# bug #1293812 : Avoid easy_install triggering on pbr.
$VENV/bin/pip install -U 'pbr>=0.11,<2.0'
$VENV/bin/pip install -U heat-cfntools
# symlink to /opt/aws/bin
$VENV/bin/cfn-create-aws-symlinks --source $VENV/bin
# also symlink to /usr/local/bin
$VENV/bin/cfn-create-aws-symlinks --source $VENV/bin --target /usr/local/bin