Provision from pre-cached/pre-downloaded CirrOS image
In run_tests.sh we symlink a cached image to /tmp/openstack/tempest or it is downloaded to that location using wget which is more reliable. Let's use that instead. Change-Id: I3777d9d035ceb31827b8df4264c2f7d213f50aea
This commit is contained in:
parent
f3260b8cf1
commit
0d13153e54
@ -43,20 +43,14 @@ class openstack_integration::provision {
|
||||
container_format => 'bare',
|
||||
disk_format => 'qcow2',
|
||||
is_public => 'yes',
|
||||
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
|
||||
# and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image.
|
||||
# source => '/home/jenkins/cache/files/cirros-0.3.4-x86_64-disk.img',
|
||||
source => 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img',
|
||||
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
|
||||
}
|
||||
glance_image { 'cirros_alt':
|
||||
ensure => present,
|
||||
container_format => 'bare',
|
||||
disk_format => 'qcow2',
|
||||
is_public => 'yes',
|
||||
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
|
||||
# and 2/ if running in the gate, use /home/jenkins/cache/files/ cirros image.
|
||||
# source => '/home/jenkins/cache/files/cirros-0.3.4-x86_64-disk.img',
|
||||
source => 'http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img',
|
||||
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
|
||||
}
|
||||
Keystone_user_role['admin@openstack'] -> Glance_image<||>
|
||||
}
|
||||
|
24
run_tests.sh
24
run_tests.sh
@ -74,7 +74,7 @@ if [ "${ADD_SWAP}" = true ]; then
|
||||
$SUDO swapon /swapfile
|
||||
fi
|
||||
|
||||
print_header 'Clone Tempest and plugins'
|
||||
print_header 'Clone Tempest, plugins & pre-cache CirrOS'
|
||||
# TODO(pabelanger): Move this into tools/install_tempest.sh and add logic so we
|
||||
# can clone tempest outside of the gate. Also, tempest should be sandboxed into
|
||||
# the local directory but works needs to be added into puppet to properly find
|
||||
@ -98,6 +98,15 @@ else
|
||||
fi
|
||||
fi
|
||||
|
||||
# NOTE(pabelanger): We cache cirros images on our jenkins slaves, check if it
|
||||
# exists.
|
||||
if [ -f ~/cache/files/cirros-0.3.4-x86_64-disk.img ]; then
|
||||
# Create a symlink for tempest.
|
||||
ln -s ~/cache/files/cirros-0.3.4-x86_64-disk.img /tmp/openstack/tempest
|
||||
else
|
||||
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp/openstack/tempest
|
||||
fi
|
||||
|
||||
install_puppet
|
||||
PUPPET_FULL_PATH=$(which puppet)
|
||||
if [ "${MANAGE_HIERA}" = true ]; then
|
||||
@ -162,19 +171,6 @@ if [ $RESULT -ne 0 ]; then
|
||||
fi
|
||||
|
||||
print_header 'Prepare Tempest'
|
||||
mkdir -p /tmp/openstack/tempest
|
||||
|
||||
$SUDO rm -f /tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img
|
||||
|
||||
# NOTE(pabelanger): We cache cirros images on our jenkins slaves, check if it
|
||||
# exists.
|
||||
if [ -f ~/cache/files/cirros-0.3.4-x86_64-disk.img ]; then
|
||||
# Create a symlink for tempest.
|
||||
ln -s ~/cache/files/cirros-0.3.4-x86_64-disk.img /tmp/openstack/tempest
|
||||
else
|
||||
wget http://download.cirros-cloud.net/0.3.4/cirros-0.3.4-x86_64-disk.img -P /tmp/openstack/tempest
|
||||
fi
|
||||
|
||||
# Tempest plugin tests require tempest-lib to be installed
|
||||
$SUDO pip install tempest-lib
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user