Cache UEC image earlier

This commit is contained in:
Dean Troyer 2011-11-05 16:16:54 -05:00
parent ff0ed1db27
commit 89d1d02821

View file

@ -167,6 +167,15 @@ git_clone $KEYSTONE_REPO $COPY_DIR/$DEST/keystone $KEYSTONE_BRANCH
git_clone $NOVNC_REPO $COPY_DIR/$DEST/noVNC $NOVNC_BRANCH git_clone $NOVNC_REPO $COPY_DIR/$DEST/noVNC $NOVNC_BRANCH
git_clone $CITEST_REPO $COPY_DIR/$DEST/openstack-integration-tests $CITEST_BRANCH git_clone $CITEST_REPO $COPY_DIR/$DEST/openstack-integration-tests $CITEST_BRANCH
# Pre-load an image for testing
UEC_NAME=$DIST_NAME-server-cloudimg-amd64
CIVMDIR=${COPY_DIR}${DEST}/openstack-integration-tests/include/sample_vm
if [ ! -e $CIVMDIR/$UEC_NAME.tar.gz ]; then
mkdir -p $CIVMDIR
(cd $CIVMDIR && wget -N http://uec-images.ubuntu.com/$DIST_NAME/current/$UEC_NAME.tar.gz;
tar xzf $UEC_NAME.tar.gz;)
fi
# Back to devstack # Back to devstack
cd $TOP_DIR cd $TOP_DIR
@ -410,15 +419,6 @@ umount $ROOTFS/dev
chroot $ROOTFS dpkg-reconfigure openssh-server chroot $ROOTFS dpkg-reconfigure openssh-server
sed -e 's/^PasswordAuthentication.*$/PasswordAuthentication yes/' -i $ROOTFS/etc/ssh/sshd_config sed -e 's/^PasswordAuthentication.*$/PasswordAuthentication yes/' -i $ROOTFS/etc/ssh/sshd_config
# Pre-load an image for testing
UEC_NAME=$DIST_NAME-server-cloudimg-amd64
CIVMDIR=${ROOTFS}${DEST}/openstack-integration-tests/include/sample_vm
if [ ! -e $CIVMDIR/$UEC_NAME.tar.gz ]; then
mkdir -p $CIVMDIR
(cd $CIVMDIR && wget -N http://uec-images.ubuntu.com/$DIST_NAME/current/$UEC_NAME.tar.gz;
tar xzf $UEC_NAME.tar.gz;)
fi
# Unmount # Unmount
umount $ROOTFS || echo 'ok' umount $ROOTFS || echo 'ok'
ROOTFS="" ROOTFS=""