Seems like nova uses 1.2, others use 1.3+
This commit is contained in:
parent
89139eca9b
commit
2dc51c0feb
@ -249,7 +249,6 @@ components:
|
||||
- name: nosehtmloutput
|
||||
- name: openstack.nose_plugin
|
||||
- name: pep8 # The rhel version appears to not be new enough...
|
||||
version: "1.2"
|
||||
- name: prettytable
|
||||
version: "0.6.1"
|
||||
- name: pycrypto
|
||||
|
62
smithy
62
smithy
@ -7,10 +7,15 @@ fi
|
||||
|
||||
shopt -s nocasematch
|
||||
|
||||
# Possible locations of the epel rpm/list url
|
||||
RHEL_VERSION=$(lsb_release -r | awk '{ print $2 }' | cut -d"." -f1)
|
||||
EPEL_RPM_LIST="http://mirrors.kernel.org/fedora-epel/$RHEL_VERSION/i386"
|
||||
NODE_RPM_URL="http://nodejs.tchol.org/repocfg/el/nodejs-stable-release.noarch.rpm"
|
||||
PKG_DEPS=$(cat "tools/pkg-requires" | egrep -v "^\s*(#|$)")
|
||||
PIP_DEP_FN="tools/pip-requires"
|
||||
YUM_OPTS="--assumeyes --nogpgcheck"
|
||||
|
||||
# Source in our variables (or overrides)
|
||||
source ".anvilrc"
|
||||
|
||||
ARGS="$@"
|
||||
VER=$(python -c "from anvil import version; print version.version_string()")
|
||||
@ -27,24 +32,8 @@ if [ -z "$BOOT_FILES" ]; then
|
||||
BOOT_FILES="${BOOT_FILES} ${HOME}/$BOOT_FN"
|
||||
fi
|
||||
|
||||
has_bootstrapped()
|
||||
bootstrap_node()
|
||||
{
|
||||
for i in $BOOT_FILES; do
|
||||
if [ -f $i ]; then
|
||||
contents=`cat $i`
|
||||
if [ "$contents" == "$VER" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
bootstrap_rh()
|
||||
{
|
||||
echo "Bootstrapping RHEL: $1"
|
||||
echo "Please wait..."
|
||||
|
||||
echo "Installing node.js yum repository configuration."
|
||||
JS_REPO_RPM_FN=$(basename $NODE_RPM_URL)
|
||||
if [ ! -f "/tmp/$JS_REPO_RPM_FN" ]; then
|
||||
@ -55,8 +44,11 @@ bootstrap_rh()
|
||||
fi
|
||||
fi
|
||||
echo "Installing /tmp/$JS_REPO_RPM_FN..."
|
||||
yum install --assumeyes --nogpgcheck -t "/tmp/$JS_REPO_RPM_FN" 2>&1
|
||||
yum install $YUM_OPTS -t "/tmp/$JS_REPO_RPM_FN" 2>&1
|
||||
}
|
||||
|
||||
bootstrap_epel()
|
||||
{
|
||||
echo "Locating the EPEL rpm..."
|
||||
if [ -z "$EPEL_RPM" ]; then
|
||||
EPEL_RPM=$(curl -s "$EPEL_RPM_LIST/" | grep -io ">\s*epel.*.rpm\s*<" | grep -io "epel.*.rpm")
|
||||
@ -72,15 +64,35 @@ bootstrap_rh()
|
||||
fi
|
||||
fi
|
||||
echo "Installing /tmp/$EPEL_RPM..."
|
||||
yum install --assumeyes --nogpgcheck -t "/tmp/$EPEL_RPM" 2>&1
|
||||
yum install $YUM_OPTS -t "/tmp/$EPEL_RPM" 2>&1
|
||||
}
|
||||
|
||||
has_bootstrapped()
|
||||
{
|
||||
for i in $BOOT_FILES; do
|
||||
if [ -f $i ]; then
|
||||
contents=`cat $i`
|
||||
if [ "$contents" == "$VER" ]; then
|
||||
return 0
|
||||
fi
|
||||
fi
|
||||
done
|
||||
return 1
|
||||
}
|
||||
|
||||
bootstrap_rhel()
|
||||
{
|
||||
echo "Bootstrapping RHEL: $1"
|
||||
echo "Please wait..."
|
||||
bootstrap_node
|
||||
bootstrap_epel
|
||||
bootstrap_dependencies
|
||||
|
||||
echo "Installing distribution dependencies..."
|
||||
pkgs="gcc git pylint python python-netifaces python-pep8 python-cheetah"
|
||||
pkgs="$pkgs python-pip python-progressbar PyYAML python-ordereddict python-iso8601"
|
||||
yum install -y $pkgs 2>&1
|
||||
yum install $YUM_OPTS $PKG_DEPS 2>&1
|
||||
|
||||
echo "Installing pypi dependencies..."
|
||||
pip-python install -U -I termcolor iniparse hgtools "keyring>=0.9.2"
|
||||
pip-python install -U -I -r "$PIP_DEP_FN"
|
||||
return 0
|
||||
}
|
||||
|
||||
@ -113,7 +125,7 @@ if [[ "$TYPE" =~ "Red Hat Enterprise Linux Server" ]]; then
|
||||
echo "This script must be ran on RHEL 6.0+ and not RHEL $RH_VER."
|
||||
puke
|
||||
fi
|
||||
bootstrap_rh $RH_VER
|
||||
bootstrap_rhel $RH_VER
|
||||
if [ $? -eq 0 ]; then
|
||||
for i in $BOOT_FILES; do
|
||||
echo "$VER" > $i
|
||||
|
5
tools/pip-requires
Normal file
5
tools/pip-requires
Normal file
@ -0,0 +1,5 @@
|
||||
termcolor
|
||||
iniparse
|
||||
hgtools
|
||||
keyring>=0.9.2
|
||||
|
13
tools/pkg-requires
Normal file
13
tools/pkg-requires
Normal file
@ -0,0 +1,13 @@
|
||||
gcc
|
||||
git
|
||||
pylint
|
||||
python
|
||||
python-netifaces
|
||||
# python-pep8 (conflicts with the ones to be installed)
|
||||
python-cheetah
|
||||
# python-pip (conflicts with the ones to be installed)
|
||||
python-progressbar
|
||||
PyYAML
|
||||
python-ordereddict
|
||||
python-iso8601
|
||||
|
Loading…
Reference in New Issue
Block a user