October 12, 2010

M = EC2. Wait, what?

We use Amazon EC2 for our integration and testing environment, and I was tasked with creating a new image for my fresh branch of the code. Though familiar with Debian, I haven't used a bare metal install in... probably ever. I learned a great deal during the imaging process, chiefly:

  • PostgreSQL installation and configuration is awful.
  • MongoDB installation is easy and awesome.*
  • Glassfish installation falls somewhere in between.
  • "sudo su" is not a new number game.**

After a lot of terminal and AWS Management Console I got my image up and running (though creating an AMI takes forever on our cluster). While setting up the image I caught a webinar presented by 10gen on "Best Practices for MongoDB Deployment" which did not include "run mongod and your web server as root" (oops), but was informative enough that I'll listen in on future events.

* Seriously, just curl the binaries, unpack and you're done. I was pleased:

curl -O 'http://fastdl.mongodb.org/linux/mongodb-linux-i686-1.6.3.tgz'
tar -xvvzf mongodb-linux-i686-1.6.3.tgz
mv mongodb-linux-i686-1.6.3/ /wherever/
export PATH=$PATH:/wherever/bin
mkdir /data
mkdir /data/db
rm mongodb-linux-i686-1.6.3.tgz

Unfortunately, I made a 32-bit image, which I'll need to upgrade for serious MongoDB testing due to a 2gb memory limit.

** Okay, sudo isn't bundled with Debian.

No comments: