Saturday, March 27, 2010

Amazon Cloud Computing: EC2 and EBS-Booties

The Google  App Engine is a "cloud-based virtual hosting" platform. Pluses are: Free, no configuration necessary,  and cool tools. Minuses are: proprietary - you use what they have, not what they want. (ie. bigtable vs mysql) - lack of flexibility - i.e. you can't install a languge, or specific php libraries to play with them.

We selected Amazon EC2 instead because we already knew and understood mysql, and we wanted to be able to install anything we wanted as the project developed because we were not sure in advance what tools would fit our needs - in fact as we worked we ended up writing non-http backend php/shell scripts to process xml files - which would have been more difficult without a command line interface.

More than the usual number of Acronyms and terms in the Amazon Cloud. To wit:
  • AWS = Amazon Web Services - Amazon's various "cloud computing matter"e.g.:
  • EC2 =  Elastic Computing 2 "duh compute cloud" (Xen-based?) (presumably EC1 sucked?)
  • EBS =  Elastic Block Storage (Closet to keep bouncy blocks of permanent "disk" ;)
  • AMI = Amazon Machine Image = Similar to a VM Image. A "file" which contains an 'EC2' bootable image of a particular OS.
  • Instance =  When you "boot"  an AMI  that running image is an instance.
  • EBS-boot AMI = Traditionally instances evaporate without a trace when you terminate them, .i.e. any changes to the file systems are ephemeral.  EBS-boot AMI's are new and have two stop conditions. terminate (ephemeral) and stop (persistent) = So they behave more like a "real" machine, ie. storage(disk space) sticks around when you shut them down.
Having fun doing a project in "duh cloud." I chose EC2 as opposed to a hosting service because I like having full root/admin access and being able to load or remove whatever packages we want instantly. Note that it is easy to get ssh access to your "instance".  Root access uses "keys" and it is pretty simple.

  Project: PHP/MySql Web application. I am using an EBS-boot LAMP server = This link is a good summary of LAMP install on EC2  - But it uses EBS for additional volume (not for boot/root volume).

(I have to say that the term "Elastic Block Storage Boot" sounds more like goofy footwear you are ashamed to wear, so you keep it in a closet than a computing service)  ------>

This is an intermittent project. So EBS-boot made sense because it allows us to just "stop = shutdown" the machine & not pay for compute, only storage, which is purty cheap.  I just grabbed the available Fedora 8 version which amazon has published. See this useful overview of EBS-boot.
And nice Step-by-Step guide which I used.

Next time I would probably try Ubuntu - I have no idea why Amazon uses Fedora and the version is so old.  Here is a link to information on ubuntu EC2 AMI with EBS-boot

I also tried out Elasticfox - a Firefox plugin which allows you to do all kinds of things more easily than the AWS http console does.

<--- (Long LOLcat seeks ElasticFox) 

Pricing summary for small instance Elastic gob=  ~2Gb memory, 1 cpu, 160 GB disk limit.

45 days use total includes 20 * 24 hrs + 25 days "off"

EBS storage:    15 GB @ .10 per GB/month  = $1.50/mo
CPU:      .085/hour x 24 hrs * 10 days  = ~ $20 *2 = $40
"Elastic IP" (= static IP continues when you turn it off)
     = .24/day * 25 =  ~$5
Data in = free ; Data out: est 10 Gb at  .15 per GB (first Gb free) = $1.40
 Total price =  $40 + $1.5 + $5 + $1.4 = approx $50 for 45 days "up" ~ 40% of the time.

(And by the  way, yes "elastic gob" is a technical term - it's just my private technical term)

No comments:

Post a Comment