You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 13 Next »

* Apply for account at Maggelan: http://magellan.nersc.gov/?page_id=564

* Sign on to the forum: https://mailman.nersc.gov/mailman/listinfo/eucalyptus-discuss

* Login to web interface: https://mageuca.nersc.gov:8443/

* Upload euca2tols tool kit form http://open.eucalyptus.com/wiki/Euca2oolsGuide
in particular I followed '/Euca2oolsInstallJaunty_v1.1' for my Ubuntu VM deployment,
but skip step about updating /etc/apt/sources.list with 'deb http://www.eucalyptussoftware.com/downloads/repo/euca2ools/1.1/ubuntu jaunty universe'

I did:
sudo apt-get update
sudo apt-get install euca2ools

Check euca2ools by executing e.g.: euca2ools
should complain about missing keys but program must be found

* Generate one time keys for Eucalyptus form the interface: https://mageuca.nersc.gov:8443

upload keys to local machine in to .euca directory


Bundle & upload to Eucalyptus my VM 'from within'
* copy private key & certificate to some directory you do NOT want to distribute those with the VM image. Make sure you do not leve them somewhere else on VM - the whole world will hack you later

sudo mkdir /mnt/eucaBuild/
* copy there euca2-yourName-e3e764-cert.pem euca2-yourName-e3f64-pk.pem cloud-cert.pem eucars.csh
* set enviromental variables by source eucars.csh

* setup working directory for the bundle which will be excluded from the bundle

sudo mkdir /image

* Bundle local VM , will take 1-2 hours ..., you may need to specify the kernel & ramdisk (values below worked in November 2010). For the 64-bit VM is generated below:
>sudo euca-bundle-vol -c $EC2_CERT -k $EC2_PRIVATE_KEY -u $EC2_USER_ID --ec2cert $EUCALYPTUS_CERT -d /image -e /image --no-inherit -r x86_64 --kernel eki-AEC117E0 --ramdisk eri-175C1933
For 32-bit image change kernel to ??
>sudo euca-bundle-vol -c $EC2_CERT -k $EC2_PRIVATE_KEY -u $EC2_USER_ID --ec2cert $EUCALYPTUS_CERT -d /image -e /image --no-inherit -r i386 --kernel eki-B15217F6 --ramdisk eri-19791933
OUTPUT:
....
Part: image.part.245
Part: image.part.246
Part: image.part.247
Generating manifest

* uplad bundle to Eucalyptus with name 'star-vm-SL10c-ubuntu-i386', will take many hours depending on connection & total size
> sudo euca-upload-bundle -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $S3_URL --ec2cert $EUCALYPTUS_CERT -m /image/image.manifest.xml -b star-vm-SL10c-ubuntu-64bit
OUTPUT:
....
Uploading part: image.part.246
Uploading part: image.part.247
Uploaded image as star-vm-SL10c-ubuntu-i386/image.manifest.xml

* register 'star-vm-SL10c-ubuntu-i386' with Eucalyptus
> euca-register -a $EC2_ACCESS_KEY -s $EC2_SECRET_KEY --url $EC2_URL star-vm-SL10c-ubuntu-64bit/image.manifest.xml
OUTPUT:
IMAGE emi-344D1244

Potential problems:

  • synchronization of local clock, can be fixed with command
    > sudo ntpdate hickory.nersc.gov
  • check if key-pair generation succeded, list content of 'balewski-euca.private'  if it does not look like a valid key and you can't find the old key you can remove the old public key from Eucalyptus using command *euca-delete-keypair

USE of existing images : http://magellan.nersc.gov/?page_id=564

* query existing images:
> euca-describe-images | grep emi | grep -i ubuntu

OUTPUT:
IMAGE emi-39DF160F ubuntu-image-bucket/ubuntu.9-04.x86-64.img.manifest.xml admin available public x86_64 machine

* create key-pair for one Eucalyptus session
> euca-add-keypair balewski-euca > balewski-euca.private
> chmod 0600 balewski-euca.private

* launch an instance you want. The default image has 10GB limit, if you need larger add '-t m1.xlarge' or even  '-t c1.xlarge' for CPUs/20G memory/20 G disk.
> euca-run-instances -k balewski-euca -t m1.xlarge emi-39DF160F

OUTPUT:
RESERVATION r-470107EF balewski balewski-default
INSTANCE i-31D50646 emi-39DF160F 0.0.0.0 0.0.0.0 pending balewski-euca 2010-10-22T16:05:53.609Z eki-AEC117E0 eri-175C1933

* check if instance is running (after few minutes, depends on the size of the image)
> euca-describe-instances i-31D50646
OUTPUT:
RESERVATION r-470107EF balewski default
INSTANCE i-31D50646 emi-39DF160F 128.55.56.51 192.168.4.2 running balewski-euca 0 m1.small 2010-10-22T16:05:53.609Z euca eki-AEC117E0 eri-175C1933

* Set security group prior to connecting to the instance (see 'Potential problems' above - private key may be wrong.)
> euca-authorize -P tcp -p 22 -s 0.0.0.0/0 default

OUTPUT:
GROUP default
PERMISSION default ALLOWS tcp 22 22 FROM CIDR 0.0.0.0/0

* Connect to the instance
> ssh -i ./balewski-euca.private root@128.55.56.57

* Terminate instance
> euca-terminate-instances i-31D50646

OUTPUT:
INSTANCE i-31D50646

after ~10 seconds the same command results with nothing

  • No labels