Posts Tagged ‘openstack’

swift (saio) on rackspace

Thursday, August 5th, 2010

Thought I should get a little acquainted with rackspace so thought I would try my scripts and process from this post there.  The steps are similar.

  1. Start an Ubuntu 10.04 LTS (Lucid Lynx) server, which I named saio and 256 megs worked for me
  2. Shell to your instance as the root user.
  3. wget http://blog.spack.net/saio.sh
  4. bash saio.sh

Make sure you . /etc/profile, then you can try st stat.

The ubuntu set ups between amazon and rackspace are a little different, so I had to change my scripts a bit, but they should now work on both platforms.  I read awhile ago about rackspace claiming they were much faster than amazon, so thought I would put them to the test.  On amazon, my script (which pulls down quite a few packages and is a bit expensive) took

real    3m48.428s
user    1m9.970s
sys     0m1.800s

on rackspace

real    2m9.948s
user    1m17.100s
sys     0m7.920s

So, yeah, rackspace took 56.58% of the time that amazon did.  That’s a pretty real difference.  And the rackspace server cost 1.5 cents per hour.  That’s pretty much free.

Since this was my first time on rackspace, here are some general thoughts.

  • Got a verification call after signup which I actually liked.  Guy was friendly and the call was brief.
  • Haven’t tried the cloud tools stuff, but the aws console feels a little more mature.
  • Didn’t have to set up keys or security groups with rackspace.  Back in the day, those things (especially the key) gave me pause on aws.  Course now I can do it in my sleep (nearly literally sometimes), but for a first time cloud user that might have been nice.  Might be nice to have an option for key based, and perhaps such an option exists.  Seems like you would want to have the security groups available but I haven’t found them in my quick browsing.
  • I got to / had to give the server a name.  This is actually a nice feature.  Pretty easy to get lost at aws in their instance ids.
  • A couple of the rackspace dialogs are a little slow to respond, so I ended up trying to start an instance twice but the second attempt failed because of name repetition.

If nothing else, rackspace’s openstack effort has now made them nearly a nickle from my testing efforts!

Enjoy!

Earl

swift / saio amazon install

Thursday, July 22nd, 2010

So, I am pretty interested in cloud computing of late and thought I would give swift from openstack a shot.  After going through the several steps described here, I decided to try and script the process.  Here are the (hopefully) much simpler steps.

  1. Create an instance at Amazon using ami-bd37ded4 which is Ubuntu 10.4.
  2. Shell to your instance as the ubuntu user.
  3. wget http://blog.spack.net/saio.sh
  4. sudo bash saio.sh

Once the script finishes if you source your /etc/profile (. /etc/profile) to pick up a couple environment variables you should be able to see something by running

$ st stat

st is a command line tool for interacting with swift.  Type st<ENTER> to see some options.

A few notes.  The saio.sh script needs to be run as root and it will grab a couple more scripts (saio-guest-1.sh and saio-guest-2.sh) that get run as the user you create.  You can set a few environment variables before running the scripts if you like,  but the defaults will likely work just fine for you.

DISK_SIZE – size in bytes for how big of a drive to make, defaults to 10240.  The scripts just create a loop back device

MY_USER – user to run swift as, defaults to swift

MY_GROUP – group to run swift as, defaults to $MY_USER

MY_SHELL – shell for $MY_USER, defaults to /bin/bash

We now can poke around a bit using st.  Let’s make some dummy content

$ mkdir my_cool_directory

$ for i in {1..5};do echo “howdy file $i on `date`” >> my_cool_directory/$i; done

$ st upload my_cool_container my_cool_directory

Then you can try a couple things like

$ st stat

Account: aea05981-0136-4024-a2b1-d015df8e0c96
Containers: 1
Objects: 0
Bytes: 0

$ st list

my_cool_container

$ st list my_cool_container

my_cool_directory/1
my_cool_directory/2
my_cool_directory/3
my_cool_directory/4
my_cool_directory/5

I think the beauty of cloud computing is that for 8.5 cents (an hour) you can test out a likely pretty cool new offering.  Eventually, I would like to provide a lasic script that might be a touch cleaner, but I think this rather clean 🙂

Enjoy!

Earl