From 9f1863450e71e19bb8ff42e9a7c182c3f5f67c3d Mon Sep 17 00:00:00 2001 From: Jesse Andrews Date: Tue, 1 Nov 2011 16:05:40 -0700 Subject: [PATCH] docs --- exercises/euca.sh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/exercises/euca.sh b/exercises/euca.sh index faeffcf..fc81af8 100755 --- a/exercises/euca.sh +++ b/exercises/euca.sh @@ -1,12 +1,9 @@ #!/usr/bin/env bash -# **exercise.sh** - using the cloud can be fun - -# we will use the ``nova`` cli tool provided by the ``python-novaclient`` -# package +# we will use the ``euca2ools`` cli tool that wraps the python boto +# library to test ec2 compatibility # - # This script exits on an error so that errors don't compound and you see # only the first error that occured. set -o errexit @@ -25,10 +22,13 @@ source ./openrc # Max time till the vm is bootable BOOT_TIMEOUT=${BOOT_TIMEOUT:-15} +# find a machine image to boot IMAGE=`euca-describe-images | grep machine | cut -f2` +# launch it INSTANCE=`euca-run-instance $IMAGE | grep INSTANCE | cut -f2` +# assure it has booted within a reasonable time if ! timeout $BOOT_TIMEOUT sh -c "while euca-describe-instances $INSTANCE | grep -q running; do sleep 1; done"; then echo "server didn't become active within $BOOT_TIMEOUT seconds" exit 1