Install/ServerEConfig

Not logged in - Log In / Register

UEC Configuration

Affected packages: UEC

Case ID: UEC-003

Prerequisites

  1. Install/ServerECluster

  2. Install/ServerENode

Test instructions

Test Case: Run an official karmic instance

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

    ARCH=amd64
    # or
    ARCH=i386
  2. On Cloud Controller, set the following to use the official karmic instance

    RELEASE=karmic
    UEC_TGZ=ubuntu-9.10-server-uec-$ARCH.tar.gz
    UEC_IMG=$RELEASE-server-uec-$ARCH
    URL=http://uec-images.ubuntu.com/releases/9.10/release
    TYPE=c1.medium
  3. On Cloud Controller, run the following commands to get an instance up and running

    TIMESTAMP=$(date +%Y%m%d%H%M%S)
    BUCKET_KERNEL="k-$TIMESTAMP"
    BUCKET_INITRD="r-$TIMESTAMP"
    BUCKET_IMAGE="i-$TIMESTAMP"
    [ $ARCH = "amd64" ] && IARCH=x86_64 || IARCH=i386
    UEC_KERNEL=$UEC_IMG-vmlinuz-virtual
    UEC_INITRD=$UEC_IMG-initrd-virtual
    [ ! -e $UEC_TGZ ] &&  wget $URL/$UEC_TGZ # This may take a bit
    [ ! -e $UEC_IMG.img ] && tar -S -xzf $UEC_TGZ
    euca-bundle-image -i $UEC_KERNEL -r $IARCH --kernel true
    euca-upload-bundle -b $BUCKET_KERNEL -m /tmp/$UEC_KERNEL.manifest.xml
    EKI=$(euca-register $BUCKET_KERNEL/$UEC_KERNEL.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EKI
    euca-bundle-image -i $UEC_INITRD -r $IARCH --ramdisk true
    euca-upload-bundle -b $BUCKET_INITRD -m /tmp/$UEC_INITRD.manifest.xml
    ERI=$(euca-register $BUCKET_INITRD/$UEC_INITRD.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $ERI
    euca-bundle-image -i $UEC_IMG.img -r $IARCH --kernel $EKI --ramdisk $ERI # This will take a long time (~10m)
    euca-upload-bundle -b $BUCKET_IMAGE -m /tmp/$UEC_IMG.img.manifest.xml
    EMI=$(euca-register $BUCKET_IMAGE/$UEC_IMG.img.manifest.xml | grep "^IMAGE" | awk '{print $2}') && echo $EMI
    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, run the following command to watch your instance go from "pending" to "running", and ctrl-C when done:

    watch -n 5 euca-describe-instances

Test instance network connectivity
  1. On Cloud Controller, 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 run the following commands to terminate your instance:

    euca-terminate-instances $INSTANCEID

Test Case: Image Storage images

Install an image from the Image Store on the UEC web interface:

  1. Access the web interface at the following URL (Make sure you specify https):
    https://<cloud-controller-ip-address>:8443/
  2. Enter your login and password (if requested, as you may still be logged in from earlier). Use username 'admin' and password 'admin' for the first time login (you will be prompted to change your password).
  3. Click on the Store tab
  4. Browse available images and select for installation the image from the latest release.
  5. Once the image has been downloaded and installed, you can click on 'How to run?' to view the command to execute to instantiate (start) this image.

Test Case: Round-Robin scheduling policy

  1. Set the scheduling policy to 'ROUNDROBIN' in '/etc/eucalyptus/eucalyptus.conf' and restart the Cloud:
    sudo sed -i.bak 's/SCHEDPOLICY=.*/SCHEDPOLICY="ROUNDROBIN"/' /etc/eucalyptus/eucalyptus.conf
    sudo restart eucalyptus-cloud
  2. Start 2 instances:
    euca-run-instances -k mykey $EMI -t c1.medium -n 2
  3. Log on the two NCs and make sure that both of them have one instance of the EMI running.

Test Case: Greedy scheduling policy

  1. Set the scheduling policy to 'GREEDY' in '/etc/eucalyptus/eucalyptus.conf' and restart the Cloud:
    sudo sed -i.bak 's/SCHEDPOLICY=.*/SCHEDPOLICY="GREEDY"/' /etc/eucalyptus/eucalyptus.conf
    sudo restart eucalyptus-cloud
  2. Start 2 instances:
    euca-run-instances -k mykey $EMI -t c1.medium -n 2
  3. Log on the two NCs and make sure that only one of them have the two instances of the EMI running.

Test Case: Powersave scheduling policy

  1. Set the scheduling policy to 'POWERSAVE' in '/etc/eucalyptus/eucalyptus.conf' and restart the Cloud:
    sudo sed -i.bak 's/SCHEDPOLICY=.*/SCHEDPOLICY="POWERSAVE"/' /etc/eucalyptus/eucalyptus.conf
    sudo restart eucalyptus-cloud
  2. Start the maximum number of instances that can run on one NC:
    euca-run-instances -k mykey $EMI -t c1.medium -n 2
  3. Log on the two NCs and make sure that only one of them have all the instances of the EMI running (NC1).
  4. Wait for 5 minutes (300 seconds) and check that the other NC (NC2) is powered down.
  5. Start a new instance:
    euca-run-instances -k mykey $EMI -t c1.medium -n 1
  6. Check that NC2 is powered back on and it runs the new instance.
  7. Kill the first set of intances.
  8. Wait for 5 minutes (300 seconds)
  9. Check that the NC1 is powered down.
  10. Terminate all the remaining instances.
  11. Start one new instance.
  12. Check that it runs on NC2 and that NC1 is still powered down.
  13. Terminate all the instances
  14. Wait for 5 minutes.
  15. Check that NC2 is powered down as well.
  16. Start one new instance.
  17. Check that one and only one NC is powered back on.
  18. Terminate the instance
  19. Start the maximum number of instances that can run on both NCs.
  20. Check that all the NC are powered back on.

Test Case: Maximum number of instances

  1. Start the maximum number of instances:
    euca-run-instances -k mykey $EMI -t c1.medium -n $(euca-describe-availability-zones verbose | awk '/c1.medium/ { print $6 }')
  2. Try to start another instance:
    euca-run-instances -k mykey $EMI -t c1.medium
    It should fail stating that not enough resources are available.
  3. Check that all instances have successfully started and are running:
    [ $(euca-describe-instances | grep -c "^INSTANCE.*running") -eq $(euca-describe-availability-zones verbose | awk '/c1.medium/ { print $6 }') ] && echo OK...

Install/ServerEConfig (last edited 2010-01-25 01:04:22 by Jamu Kakar)