Showing posts with label Capistrano. Show all posts
Showing posts with label Capistrano. Show all posts

Tuesday, August 11, 2009

Ruby Interface to AWS Elastic Load Balancing Service

The AWS group is hard at work. They responded to the market demand with a load balancing service called, true to form, Elastic Load Balancing.

It's really slick - but generating soap or rest commands from scratch isn't all that fun, so we upgraded our Appoxy-aws gem and added an interface to the ELB service.

Now, using Capistrano, we simply use one command:
cap appoxy:launch_instance
To launch an EC2 instance, provision the system, deploy our code, and (with the new ELB interface), automatically attach the server to our load balancer.... viola, more capacity, testing server, staging server, redundancy, you name it.

Central to this strategy is provisioning and deploying almost everything using Capistrano. Building a full AMI sounds nice, but rebuilding an AMI after a gem update isn't very efficient.

Here's appoxy-aws: http://github.com/appoxy/aws/tree/master

Also if you want our Ubunty Jaunty clean AMI with Ruby 1.9 search for: ami-51769738

Finally, thanks again to RightScale for building the RightAws libraries that made appoxy-aws possible.

Cheers,
Chad

Friday, July 31, 2009

Ruby 1.9 Ubuntu Amazon AMI

Amazon's EC2 allows you to quickly fire up, scale out, and tear down servers at will. It's slick. It's dependable. It's game changing (we spent an entire day testing on 2 servers for under $4).

With that said, we're not huge fans of loaded AMI's. They have the potential for unnecessary maintenance, upgrades, etc. Doesn't that take away from the cleanliness that EC2 offers? Instead, use a base bundle, and Capistrano away. I'll post a follow-up post on that soon.

We're also Ruby 1.9 fans, so we took Ruby 1.9.1p129, installed it into an Alestic Ubuntu Jaunty base AMI, and rebundled it. It took a bit of work since Amazon's tools, AMI's, and Ruby 1.9 aren't totally in sync, but with a bit of work, you can get a clean, production-ready AMI with Ruby 1.9.

Feel free to use ours. It's located in the public AMI list:

appoxy-amis/ubuntu-9.04-jaunty-ruby1.9-base-20090731.manifest.xml
AMI ID: ami-51769738

Enjoy,
Chad