Pages

Twitter Updates

Friday, February 16, 2007

Installing EC2 tools on Mac OSX

I've been asked how I managed to coax the AWS EC2 tools to run on Mac OSX. Truth is, running them wasn't the problem: it was getting the contents of the darn rpm unpacked that is the hassle.

First, there's two sets of tools required

1/ The 'operational' tools that let you startup and shutdown AMI instances. These are Java and shipped as a tarball so there's no further explanation needed than already provided by AWS.

2/ The 'packaging' tools that let you bundle up your new AMI images, upload to S3 and register the AMI. These are written in ruby and shipped as an rpm.

#2 is the problem since rpm is not a native Mac packaging format.

Here's what I did to deal with the rpm:

I ended up grabbing the "port" tool from DarwinPorts in order to then install a port of rpm using

sudo port install rpm

In order to install the EC2 rpm I had to hand-hack create the /var/local/lib/rpm directory with a+rw perms and then force rpm to install without checking deps or os using

sudo rpm -i ec2-ami-tools.noarch.rpm --nodeps --ignoreos

After that, I was able to use the ruby based tools. Hope this helps.

See also the thread on the AWS developer forums.

1 comments: