Last active
January 19, 2016 20:04
-
-
Save dmsimard/53f5e318dd4e1f7e568a to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash -ex | |
# Exit if we're not running on rhel-like | |
if [ -f /etc/os-release ]; then | |
source /etc/os-release | |
test "$ID" = "fedora" -o "$ID" = "centos" | |
else | |
exit 1 | |
fi | |
if [ $(id -u) != 0 ]; then | |
# preserve environment so we can have ZUUL_* params | |
SUDO='sudo -E' | |
fi | |
# Setup delorean current repositories | |
$SUDO curl http://trunk.rdoproject.org/centos7/current/delorean.repo -o /etc/yum.repos.d/delorean.repo | |
$SUDO curl http://trunk.rdoproject.org/centos7/delorean-deps.repo -o /etc/yum.repos.d/delorean-deps.repo | |
# Install required packages | |
$SUDO yum -y install yum-plugin-priorities dstat python-setuptools openssl-devel python-devel libffi-devel libxml2-devel libxslt-devel ruby-devel openstack-selinux "@Development Tools" | |
# Setup dstat for resource usage tracing | |
if type "dstat" 2>/dev/null; then | |
$SUDO dstat -tcmndrylpg --top-cpu-adv --top-io-adv --nocolor | $SUDO tee --append /var/log/dstat.log > /dev/null & | |
fi | |
# Install packstack from source | |
git clone https://github.com/openstack/packstack.git | |
pushd packstack | |
$SUDO python setup.py install | |
$SUDO python setup.py install_puppet_modules | |
popd | |
packstack --allinone \ | |
--os-manila-install=n \ | |
--os-sahara-install=n \ | |
--os-heat-install=n \ | |
--os-trove-install=n \ | |
--provision-demo=y \ | |
--provision-tempest=y \ | |
--run-tempest=y \ | |
--run-tempest-tests="smoke dashboard TelemetryAlarming" \ | |
--gen-answer-file=packstack.txt | |
sed -i -re "s,(.*_PASSWORD|.*_PW)=.*,\1=packstack," packstack.txt | |
# Run packstack and capture result | |
$SUDO packstack --answer-file=packstack.txt | |
result=$? | |
# Generate subunit | |
/var/lib/tempest/.venv/bin/testr last --subunit > /var/tmp/packstack/latest/tempest.subunit | |
exit $result |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment