tripleo-image-elements/elements/heat-cfntools/install.d/05-heat-cfntools
Ryan Brady 2b113e1e29 Fix dib-lint failures
As part of an ongoing effort to apply more testing against
elements, this patch provides fixes for most dib-lint
failures outside of the set -o pipefail patch[1] including
set options, indention, and file permissions.  There are
still a few indention errors left after this patch, but
they should be ignored in a dib-lint patch soon to add
additional exclusions.

[1] Ib97e3a35dd0ee653f1298c9ffe6ea99cea9dfd55

Change-Id: Ibf3dfc5735752900598466b0a54342692ef77284
2014-07-31 12:25:59 -04:00

34 lines
895 B
Bash
Executable File

#!/bin/bash
set -uex
install-packages python-psutil gcc python-dev
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.6,<1.0'
$VENV/bin/pip install --pre -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