This morning I received an email from Amazon Web Services announcing the release of Amazon ElastiCache. In Amazon’s own words “ElastiCache is a web service that makes it easy to deploy, operate, and scale an in-memory cache in the cloud.” At first glance, that sounds very handy to have. After all, Amazon already has DB backends, instances for application front ends, load balancers and remote file storage, really the only part left for a large application is cache. The best part about Amazon ElastiCache, and a very smart thing to do overall, is that it is running Memcache (or at least is Memcached compatible). So I start out very enthused by this prospect, but by the time I get to the pricing section… I’m very underwhelmed.
I’ve recently begun tinkering with Amazon Web Services (specifically their EC2 service) and RightScale. The major difference between these “Cloud” computing platforms and others is that the “instance” (i.e A running virtual machine) is temporary. Once it is shut down, all the data is gone. Additionally, the RightScale (and fairly common) way about going things is to use a “clean” machine image and script the install of the specific packages you need on Launch. So you can use the same image for an Application server, or DB server, or mail server – just have their respective packages installed on boot.
For Debian/Ubuntu (I happen to be using Ubuntu 8.10 Intrepid Ibex), you have the joy of apt-get. If you run apt-get with -q -y, it will assume “yes” to everything (and do it quietly). Now the only major problem is that some packages ask post install questions using whiptail (The blue configuration screen). In my case it it was MySQL demanding a root password. But I was informed of an easy way around that, exporting a value before install.
Below is an example of what to run:
# export DEBIAN_FRONTEND=noninteractive
# apt-get -q -y install mysql-server-5.0
This will install and start MySQL without so much as a peep until it is all done. Of course you get a blank root password which is a security issue, but that is easy to fix later. Piece of cake, if you happen to know about these magical exports.