Just how useful is Amazon EC2 for a CF guy?
Until Thursday of last week I’ve never had any success getting a *Nix based system up and running on Amazon EC2 – but since the release of Windows based machines I’ve been much more successful.
Just in case you’ve not played with it yet, it’s super simple and what’s better is you don’t even have to touch a command line once – us Windows folk like that
. It can all be managed by ElasticFox a neat management plug-in for Firefox.
Once you’re in ElasticFox you see a list of public AMIs (Amazon Machine Images). These are basically starter machines to get you up and running. There are a heap of Windows (DataCenter edition) machines, both 32 and 64 bit, anonymous and authenticated system, with/without SQL Server standard and also a machine with SQL Server Express, IIS, ASP.NET.
I’m not going to cover the ins and outs of getting a machine up and running because there’s a doc here that covers it all.
When it comes to creating an instance of your chosen AMI you get to chose the instance type,
- m1, small
- m1, large
- m1, xlarge
These correspond to machines ranging from a single processor with 1.7Gb RAM upwards – m1, large was a dual processor with 7.8Gb RAM. I did find that if I try to boot a 64 Bit system using m1, small I received an error message
InvalidParameterValue: The requested instance type’s architecture (i386) does not match the….
..so be careful of that. Anyhow, once you’ve got an instance of a system booted you login via RDP and you’re good to go. Or are you?
All you’ve done this far is boot an instance of an existing machine – you’re free to install software (although there’s no i386 folder if you choose a plain machine without IIS so you can’t (easily) install it). I whipped up a machine running Apache, PHP, MySQL and then slapped on Wordpress (just because it’s quick to get up an running!). If I were to terminate this instance at this point I’d loose what I’ve setup so far *BUT* if were to reboot the machine, say following a Windows Update then my instance comes back up as I left it with the update applied.
To persist a machine (and to allow you to create multiple instances of it) you have to create your own private AMI from this new instance. It’s a relatively trivial process which bundles your AMI onto Amazon S3 for storage and then allows you to create instances of that AMI.
Then there’s another Amazon product, Amazon EBS (Elastic Block Store) which gives you a persistent storage volume that you can connect to your instances (also via ElasticFox). It mounts directly as a drive via some clever voodoo and you just treat it as such.
So what does all this mean for a CF developer? It’s pretty easy to get a CF server up and running – remember though that the c/d drives are not persisted unless you’ve bundled it into an AMI, so any further configurations etc would need to be bundled up for persistence – CF could be run from an EBS volume although I’d be more inclined to keep that in the AMI and use an EBS volume just for storage. Equally, databases would be best stored on the EBS volume.
When Amazon introduces load balancing between instances then things will get more interesting and if you’re using ColdFusion then the usual administrative tasks like keep settings synchronised across instances could be fun (unless you use CAR files??) along with licensing issues if you start running multiple instances and not necessarily if it’s running on the same underlying hardware.
If you’ve been keeping up to speed with Railo then one of it’s really neat features is the server synchronisation that is able to keep settings in sync across a cluster – something I think that Adobe seriously needs to consider adding as it would be a great help, not only for ‘cloud scenarios’ but for Enterprise level clients as a whole.
Now Amazon’s announcement and launch of Windows based EC2 comes only a few days before Microsoft is expected to announce it’s offering in the guise of Microsoft Strata and a project code named RedDog (Incidentally, Strata means ‘Loss’ in Polish’) on Monday (today) at it’s PDC keynote – all eyes will be on what Microsoft release and the direction that they’re taking into the cloud.
Related posts:


