Avoiding a series of tests with Ruby Hashes of Hashes that might have nil before the leaf hash

I’m mostly using Ruby to write Opscode Chef Cookbooks. There are a lot of hashes of hashes that contain attributes or Data Bags. Things that look like:

app['rds_database'][environment]['rds_name']

If I wanted to test if this value is set I couldn’t safely just say:

if app['rds_database'][environment]['rds_name']

because in some cases

if app['rds_database']

or

if app['rds_database'][environment] [...]

Deploy WordPress to Amazon EC2 Micro Instance with Opscode Chef

Updates September 9, 2011

Included the latest Chef Knife ec2 server create argument that sets the EBS Volume to not be deleted on the termination of the EC2 Instance

Intro

Up until recently a friend lent me a Virtual Machine in he Cloud for my Blog. I didn’t have to do anything to manage [...]

Getting the jet3t S3 GUI tool to work with Walrus (Eucalyptus S3)

Jets3t (pronounced “jet-set”) is a free, open-source Java toolkit and application suite for the Amazon Simple Storage Service (Amazon S3) and Amazon CloudFront content delivery network. For some reason almost all the standard tools for accessing S3 will not easily work with the Eucalyptus equivalent to S3 called Walrus. I am use to using [...]

HBase/Hadoop on Mac OS X

I wanted to do some experimenting with various tools for doing Hadoop and HBase activities and didn’t want to have to bother making it work with our Cluster in the Cloud. I just wanted a simple experimental environment on my Macbook Pro running Snow Leopard Mac OS X.

So I thought it was time [...]