Cloud At Sara

From LUG
Revision as of 13:15, 12 November 2009 by MediaWiki default (talk | contribs) (New page: = SARA in the CLOUD = <i>by Pjotr Prins</i>, Wageningen University, Dept. of Nematology The super computing center SARA in Amsterdam has a pilot in CLOUD computing in which I participate...)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

SARA in the CLOUD

by Pjotr Prins, Wageningen University, Dept. of Nematology

The super computing center SARA in Amsterdam has a pilot in CLOUD computing in which I participate as a tester. Here I quickly document my experiences over november 2009.

The setup consists of five dual-quad CPU's - i.e. 40 cores (additional to Nematology/Bioinformatics 24 cores' in my 'CLOUD') available for some hard hitting on top of Ubuntu with KVM. SARA supplies a few images and documentation.

SSH

The login to the control server (named ui) is via:

 ssh -XC user@ui.grid.sara.nl
 ssh -XC user@ui.claudia.sara.nl

Easiest to provide a tunnel, say

 ssh -L 20201:ui.claudia.sara.nl:22 -f -N user@ui.grid.sara.nl

And now you can ssh and scp etc. directly through

 ssh -p 20201 user@localhost 

easiest to setup a key too. On your local machine:

 ssh-keygen -t dsa

and add the content of ~/.ssh/id_dsa.pub to the ~/.ssh/authorized_keys file on UI (and later any images) as described here. Using ssh keys allows you to login without typing passwords every time.

UI commands

A number of commands are listed on the CLAUDIA wiki listed above. Additionally

 for x in 0 1 2 3 4 5 ;  do echo -n $x :; onehost show $x | grep USEDCPU ; done
 0 :USEDCPU=0.799999999999955
 1 :USEDCPU=0.799999999999955
 2 :USEDCPU=0.799999999999955
 3 :USEDCPU=0.799999999999955
 4 :USEDCPU=3.20000000000005
 5 :USEDCPU=1.60000000000002

You can see the CLOUD is not busy. Currently there are two types of images running:

 user@ui:~$ onevm list
   ID      NAME STAT CPU     MEM        HOSTNAME        TIME
  193  vm_cloud runn   0 4194304          host05 05 21:02:00
  194  ubuntu-9 runn   0 2097152          host01 02 23:07:56
  195  ubuntu-9 runn   0 2097152          host02 02 02:38:10
  200    debian runn   0 2097152          host03 01 19:36:52
  201    debian runn   0 2097152          host06 01 19:14:56
  202  ubuntu-9 runn   0 2097152          host04 01 17:40:53
  203  ubuntu-9 runn   0 2097152          host06 01 17:40:52
  204  ubuntu-9 runn   0 2097152          host05 01 17:40:50

Current images are:

 user@ui:~$ ls /data/images/
 debian-503-i386-CD-1.iso  scilin5.3-10G.img  ubuntu-9.10-10G.img
 debian-lenny-10G.img      ttylinux.img       ubuntu-9.10-server-i386.iso

These are 32-bit images. A 64-bit image I have to make myself - will do that a bit later. First and foremost I am a Debian-guy, so the first bit is easy. Copy the image to use your own - you don't want to update a shared image:

 cp /data/images/debian-lenny-10G.img ~

copy and edit the template to match:

 cp /data/templates/debian-lenny-10G.template ~
 vi ~/debian-lenny-10G.template 

First I rename my image

 cp debian-lenny-10G.img debian-lenny-default-32.img
 cp debian-lenny-10G.template debian-lenny-default-32.template

I am greedy so I grab all CPU's (8) and a little more RAM. The diff is

 < CPU    = 1
 < MEMORY = 2048
 ---
 > CPU    = 8
 > MEMORY = 4096
 <   source   = "/data/images/debian-lenny-10G.img",
 ---
 >   source   = "/home/cloud10/debian-lenny-default32.img",

and

 onevm create debian-lenny-default-32.template
 onevm list
   205  cloud10   debian fail   0       0          host03 00 00:00:09

not good. I had used the wrong name for source. The log can be found in

 cat /var/log/one/205.log

Try again and it reads:

  206  cloud10   debian runn   0       0          host03 00 00:00:42

and, yes! it is running on host03. Now you know the ID you can get extra info with

 onvm show 206

which gives the IP etc.

 ssh cloud@145.100.5.248
 Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
 permitted by applicable law.
 Last login: Tue Nov  3 06:17:28 2009
 cloud@debian:~$ 

cool. That looks good. 'top' shows 4 Gb of RAM, 'df' shows I have 8.5 Gb of disk space. Only problem is I have one CPU! So delete the previous VM

 onevm delete 206


MORE HELP