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',
|
container_format => 'bare',
|
||||||
disk_format => 'qcow2',
|
disk_format => 'qcow2',
|
||||||
is_public => 'yes',
|
is_public => 'yes',
|
||||||
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
|
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
|
||||||
# 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',
|
|
||||||
}
|
}
|
||||||
glance_image { 'cirros_alt':
|
glance_image { 'cirros_alt':
|
||||||
ensure => present,
|
ensure => present,
|
||||||
container_format => 'bare',
|
container_format => 'bare',
|
||||||
disk_format => 'qcow2',
|
disk_format => 'qcow2',
|
||||||
is_public => 'yes',
|
is_public => 'yes',
|
||||||
# TODO(emilien) optimization by 1/ using Hiera to configure Glance image source
|
source => '/tmp/openstack/tempest/cirros-0.3.4-x86_64-disk.img'
|
||||||
# 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',
|
|
||||||
}
|
}
|
||||||
Keystone_user_role['admin@openstack'] -> Glance_image<||>
|
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
|
$SUDO swapon /swapfile
|
||||||
fi
|
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
|
# 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
|
# 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
|
# the local directory but works needs to be added into puppet to properly find
|
||||||
@ -98,6 +98,15 @@ else
|
|||||||
fi
|
fi
|
||||||
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
|
install_puppet
|
||||||
PUPPET_FULL_PATH=$(which puppet)
|
PUPPET_FULL_PATH=$(which puppet)
|
||||||
if [ "${MANAGE_HIERA}" = true ]; then
|
if [ "${MANAGE_HIERA}" = true ]; then
|
||||||
@ -162,19 +171,6 @@ if [ $RESULT -ne 0 ]; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
print_header 'Prepare Tempest'
|
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
|
# Tempest plugin tests require tempest-lib to be installed
|
||||||
$SUDO pip install tempest-lib
|
$SUDO pip install tempest-lib
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user