Install/ServerEConfig

Not logged in - Log In / Register

Running a reference instance

Register image

  1. On Cloud Controller (CLC), set one of the following options depending on whether you test amd64 or i386:

    ARCH=amd64
    # or
    ARCH=i386
  2. 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
  3. 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 $INSTANCEID
  4. On 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

  1. 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

  1. Exit your SSH connection, then on Cloud Controller (CLC) run the following commands to terminate your instance:

    euca-terminate-instances $INSTANCEID

Install/ServerEConfig (last edited 2010-04-02 12:17:19 by ttx)