WARNING: MOST OF THIS IS BASED ON A PREVIOUS INCARNATION OF THE CLOUD AND IS NOW REDUNDANT

Using the LAVA cloud OpenStack implementation

The LAVA cloud is currently 4 nodes (soon to be 5) named lava-cloud[01-05] and can be accessed from validation.linaro.org.

The majority of the commands are eucalyptus based.

First you need to ensure that you have the correct keys set up. You need to copy over the creds directory from lava-cloud01:

mkdir ~/creds
scp localadmin@lava-cloud01:~/creds/* ~/creds/
sudo chmod 600 creds/*

N.B. You will need to get the password from Dave Pigott or one of the other Admins

now do

. ~/creds/novarc

Also add

. ~/creds/novarc

to the end of your .bashrc file To see the cloud topology, type:

euca-describe-availability-zones verbose

You should see something like:

AVAILABILITYZONE        nova    available
AVAILABILITYZONE        |- lava-cloud01 
AVAILABILITYZONE        | |- nova-volume        enabled :-) 2012-02-21 13:49:17.919942
AVAILABILITYZONE        | |- nova-network       enabled :-) 2012-02-21 13:49:22.095166
AVAILABILITYZONE        | |- nova-scheduler     enabled :-) 2012-02-21 13:49:22.096593
AVAILABILITYZONE        | |- nova-compute       enabled :-) 2012-02-21 13:49:25.081730
AVAILABILITYZONE        |- lava-cloud03 
AVAILABILITYZONE        | |- nova-compute       enabled :-) 2012-02-21 13:49:19.839985
AVAILABILITYZONE        |- lava-cloud02 
AVAILABILITYZONE        | |- nova-compute       enabled :-) 2012-02-21 13:49:20.960238
AVAILABILITYZONE        |- lava-cloud05 
AVAILABILITYZONE        | |- nova-compute       enabled :-) 2012-02-21 13:49:22.406390

There is currently one image available, an 11.10 64bit ubuntu server image. If you type:

euca-describe-images

at the command line you should see something like this:

IMAGE ami-00000006 my-bucket/oneiric-server-cloudimg-amd64.img.manifest.xml available private x86_64 machine aki-00000005 instance-store
IMAGE aki-00000005 my-bucket/oneiric-server-cloudimg-amd64-vmlinuz-virtual.manifest.xml available private x86_64 kernel instance-store

The image that we create instances from is the ami.

To add an image, download the appropriate ami from

http://cloud-images.ubuntu.com/releases/11.10/release/

And then use

cloud-publish-tarball image-name bucket-name [architecture] to make the image available

Create a directory in your home directory called "creds" and then do scp localadmin@lava-cloud01:~/creds/* into your directory.

Now create a key for use with eucalyptus:

euca-add-keypair mykey > ~/creds/mykey.priv

Of course, you can call the key and keyfile anything you like. Just make sure that you reference it correctly in commands that require either a key or keyfile.

Just to check, do a:

euca-describe-keypairs

and you should get something like:

KEYPAIR mykey 0c:ab:10:ef:04:cb:c8:d6:48:35:93:d5:bd:a8:95:e8

You can also delete keypairs with:

euca-delete-keypairs mykey

Now you are ready to run an instance:

euca-run-instances ami-00000006 -k mykey -t m1.tiny

The instance types currently available are:

Name

Memory

VCPUS

Storage

FlavorID

Swap

RXTX Quota

RXTX Cap

m1.tiny

512MB

1

0GB

1

0MB

0GB

0MB

m1.small

2048MB

1

20GB

2

0MB

0GB

0MB

m1.medium

4096MB

2

40GB

3

0MB

0GB

0MB

m1.large

8192MB

4

80GB

4

0MB

0GB

0MB

m1.xlarge

16384MB

8

160GB

5

0MB

0GB

0MB

if you now do

euca-describe-instances

You should see an instance that goes from pending to running, with a local private address. Something like this:

RESERVATION r-ohdp26fh proj default INSTANCE i-00000013 ami-00000006 10.1.4.14 10.1.4.14 running mykey (proj, lava-cloud01) 0 m1.medium 2012-02-21T12:30:33Z nova aki-00000005 ami-00000000

Now you need to allocate a public address from the pool:

euca-allocate-address

This will tell you which address you have been assigned:

192.168.1.52

Now you need to associate that address with your instance

euca-associate-address -i i-00000013 192.168.1.52

Now you can ssh onto the instance with:

ssh -i ~/creds/mykey.priv ubuntu@192.168.1.52

To remove an instance, you first disassociate the address:

euca-disassociate-address 192.168.1.52

Then kill an instance

euca-terminate-instances i-00000013

To drop an ip address back to the pool:

euca-release-address 192.168.1.52

Once you have the node set up, you should follow the server provision guide to configure it.


CategoryDevOps CategoryLava

Platform/LAB/DevOps/UsingLavaCloud (last modified 2014-04-23 15:28:12)