Running a reference instance
Register image
On Cloud Controller (CLC), set one of the following options depending on whether you test amd64 or i386:
ARCH=amd64 # or ARCH=i386
On Cloud Controller (CLC), set the following to use the official karmic instance
RELEASE=karmic UEC_TGZ=ubuntu-9.10-server-uec-$ARCH.tar.gz URL=http://uec-images.ubuntu.com/releases/9.10/release TYPE=c1.medium
On Cloud Controller (CLC), run the following commands to get an instance up and running
TIMESTAMP=$(date +%Y%m%d%H%M%S) BUCKET="$RELEASE-$TIMESTAMP" [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386 [ ! -e $UEC_TGZ ] && wget $URL/$UEC_TGZ # This may take a bit EMI=$(uec-publish-tarball $UEC_TGZ $BUCKET $IARCH | awk -F \" '{print $2}') && echo $EMI === Start up an instance === if [ ! -e mykey.priv ]; then touch mykey.priv chmod 0600 mykey.priv euca-add-keypair mykey > mykey.priv fi euca-authorize default -P tcp -p 22 -s 0.0.0.0/0 INSTANCEID=$(euca-run-instances -k mykey $EMI -t $TYPE | awk '/^INSTANCE/ {print $2}') && echo $INSTANCEIDOn Cloud Controller (CLC), run the following command to watch your instance go from "pending" to "running", and ctrl-C when done:
watch -n 5 euca-describe-instances
Connect to instance
On Cloud Controller (CLC), run the following commands to connect to your running instance:
IPADDR=$(euca-describe-instances | grep $INSTANCEID | grep running | awk '{print $4}') ssh -i mykey.priv ubuntu@$IPADDR
Tear down
Exit your SSH connection, then on Cloud Controller (CLC) run the following commands to terminate your instance:
euca-terminate-instances $INSTANCEID