diff --git a/run_tests.sh b/run_tests.sh index 2a256d156..ff8e747ea 100755 --- a/run_tests.sh +++ b/run_tests.sh @@ -156,11 +156,32 @@ $SUDO yum -y install puppet \ openstack-selinux \ policycoreutils \ rubygems \ + wget \ "@Development Tools" # Don't assume pip is installed which pip || $SUDO easy_install pip +# Try to use pre-cached cirros images, if available, otherwise download them +rm -rf /tmp/cirros +mkdir /tmp/cirros + +if [ -f ~/cache/files/cirros-0.3.4-x86_64-uec.tar.gz ]; then + tar -xzvf ~/cache/files/cirros-0.3.4-x86_64-uec.tar.gz -C /tmp/cirros/ +else + echo "No pre-cached uec archive found, downloading..." + wget --tries=10 http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-uec.tar.gz -P /tmp/cirros/ + tar -xzvf /tmp/cirros/cirros-0.3.4-x86_64-uec.tar.gz -C /tmp/cirros/ +fi +if [ -f ~/cache/files/cirros-0.3.4-x86_64-disk.img ]; then + cp -p ~/cache/files/cirros-0.3.4-x86_64-disk.img /tmp/cirros/ +else + echo "No pre-cached disk image found, downloading..." + wget --tries=10 http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp/cirros/ +fi +echo "Using pre-cached images:" +find /tmp/cirros -type f -printf "%m %n %u %g %s %t" -exec md5sum \{\} \; + # TO-DO: Packstack should handle Hiera and Puppet configuration, so that it works # no matter the environment $SUDO su -c 'cat > /etc/puppet/puppet.conf <