From 3b92e8714fc9a2e10cdbd73e36c05c838ba55852 Mon Sep 17 00:00:00 2001 From: Steven Dake Date: Wed, 7 Oct 2015 23:18:40 -0700 Subject: Move around the development environments THe top level dev directory is now used to store the heat and vagrant development environments. backport: liberty TrivialFix Change-Id: Ib0922b90eacaa8518aee09cdeb46f4ac0437e015 --- dev/heat/get-image.sh | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100755 dev/heat/get-image.sh (limited to 'dev/heat/get-image.sh') diff --git a/dev/heat/get-image.sh b/dev/heat/get-image.sh new file mode 100755 index 000000000..21166301e --- /dev/null +++ b/dev/heat/get-image.sh @@ -0,0 +1,41 @@ +#!/bin/bash + +# This script expects the following to be installed: +# curl, libguestfs-tools-c + +IMAGE_URL=http://archive.fedoraproject.org/pub/fedora/linux/releases/21/Cloud/Images/x86_64 +IMAGE=Fedora-Cloud-Base-20141203-21.x86_64.qcow2 +TARGET_DIR=/var/lib/libvirt/images +TARGET=fedora-21-x86_64 +export LIBGUESTFS_BACKEND=direct + +if ! [ -f "$IMAGE" ]; then + echo "Downloading $IMAGE" + curl -L -O $IMAGE_URL/$IMAGE +fi + +echo "Copying $IMAGE to $TARGET" +cp "$IMAGE" $TARGET_DIR/$TARGET + + +TMPFILE=$(mktemp /tmp/kolla-ifcfg-eth1.XXXXXXXXXX) +cat > $TMPFILE <