UEC Configuration
Affected packages: UEC
Case ID: UEC-003
Prerequisites
Test instructions
On Cluster search and confirm the addition of the node, type
sudo euca_conf --no-rsync --discover-nodes
On Cluster type
sudo euca_conf --get-credentials mycreds.zip
On Cluster type
unzip mycreds.zip
On Cluster type
. eucarc
On Cluster type and verify
euca-describe-availability-zones verbose AVAILABILITYZONE clustername 192.168.1.1 AVAILABILITYZONE |- vm types free / max cpu ram disk AVAILABILITYZONE |- m1.small 0004 / 0004 1 128 2 AVAILABILITYZONE |- c1.medium 0004 / 0004 1 256 5 AVAILABILITYZONE |- m1.large 0002 / 0002 2 512 10 AVAILABILITYZONE |- m1.xlarge 0002 / 0002 2 1024 20 AVAILABILITYZONE |- c1.xlarge 0001 / 0001 4 2048 20
On Cluster, set one of the following options depending on whether you test amd64 or i386:
ARCH=amd64 # or ARCH=i386
On Cluster, run the following commands to get an instance up and running
RELEASE=karmic 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_IMG=$RELEASE-uec-$ARCH UEC_KERNEL=$UEC_IMG-vmlinuz-virtual UEC_INITRD=$UEC_IMG-initrd-virtual URL=http://uec-images.ubuntu.com/$RELEASE/current/ [ ! -e $UEC_IMG.tar.gz ] && wget $URL/$UEC_IMG.tar.gz # This may take a bit [ ! -e $UEC_IMG.img ] && tar -S -xzf $UEC_IMG.tar.gz 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 euca-run-instances -k mykey $EMI -t c1.mediumOn Cluster, run the following command to watch your instance go from "pending" to "running", and ctrl-C when done:
watch -n 5 euca-describe-instances
On Cluster, run the following commands to connect to your running instance:
IPADDR=$(euca-describe-instances | grep $EMI | grep running | awk '{print $4}') ssh -i mykey.priv ubuntu@$IPADDRExit your SSH connection, then on Cluster run the following commands to terminate your instance:
INSTANCEID=$(euca-describe-instances | grep $EMI | grep running | awk '{print $2}') euca-terminate-instances $INSTANCEID