My New Development Computer: An Amazon EC2 Instance

Here in Florida, where we're spending a couple of months, the only computer I have access to is my little netbook, an MSI Wind U-100 . It's a fine little computer, but it doesn't really have enough CPU to run Firefox, the Apache web server, the Eclipse development environment, and do debugging all at the same time. I could read the newspaper while stepping through code with the debugger, because I had to wait at each step.

Enter Amazon's Electronic Cloud (EC2) product . They provide powerful virtual computers to rent "in the cloud". So I just start up a new computer when I get to work in the morning, and then use remote access tools to view and control it. I spend US$0.10/hour to rent the computer. That' all. When I was so frustrated with the debugging I considered buying a new computer just for this purpose, but we don't have much room where we are here, and we would have to move the computer, and of course would have to buy it in the first place. To buy a physical computer of the power I'm getting from Amazon would cost perhaps $600-$1000, and it takes quite a few hours at $0.10/hour to add up to that.

Normally, people use Amazon's EC2 for servers, machines that need little interaction with people. But since they have fantastic network access and can do anything a regular computer can, they can be used as a "desktop" machine as well, and that's what I've done here.

Here's how I set up the machine. I won't go into all the details of how you work with EC2 instances, because there is a learning curve there, but I'll give the broad outline.

  1. II used Elasticfox , a Firefox add-on, to create an instance based on Eric Hammond's pre-built Ubuntu EC2 machines. I used the Ubuntu 8.10 Desktop version, which works just fine.
  2. One of the real problems you have to work around with EC2 is that when you shut down an instance, it goes away, POOF. No more nothing. All your data and configuration is gone. But they have an important feature called Elastic Block Store, or EBS , which is basically a disk that you can attach anytime you want to any instance you create.  So I created an EBS volume for use with my development machine and used Elasticfox to attach it.
  3. I need Apache and Mysql services on the machine, and need their config, databases, etc. to not just go away every time I shut down the instance. So I installed and configured them based on this article (which is redhat-specific; slightly different for Ubuntu).
  4. I put my home directory and the /opt directory on the EBS volume. I installed Eclipse in the /opt directory.
  5. I rebundled the instance so that it would always boot up the same.
  6. Now I have a new development machine any time I want. And if I want to, I can launch it with the more powerful CPU or memory configurations that Amazon offers, for higher rent, of course.


Eric Hammond's Ubuntu builds come with the excellent Nomachine.com Desktop Virtualization server built in, and I use their free NX client to access my machine in the cloud. It's just like being there.

I can now start up Eclipse in about 1/5 of the time it takes to start up on my machine, and as I said, I don't have to read the newspaper while stepping through code in the debugger.


4 Comments

EBS block formatting

Its been a while since I did anything like this, but I found that using the EBS block the thing to watch out for formatting it.

The more powerful CPU configs are 64bit machines whereas the lower ones are 32bit. Make sure that if you are thinking about upgrading at some point that you format your EBS in a way that can be accessed by both.

That also has implications on the instance you create with your custom config, you will probably need to create a 32bit and 64bit instance, but at least your data should transfer between them if its safe on your EBS.

Things might have changed since I last used it, but thought it was worth mentioning as I'm still considering the switch when my machine finally gives up. How you finding this? Are you still using it? Could you give an idea how much you used it and an idea of the annual cost for running things this way?

Haven't used it this way for some time

I haven't done this for some time, but it was a great technique.

I tend to avoid Amazon these days because (IMO) you don't get enough value from them, and Linode and Rackspace Cloud are so much easier to deal with (better customer interfaces, less complex). Also, you get support with both Linode and Rackspace Cloud.

Great idea!

I looked into EC2 some time back for my hosted application, but the monthly charge was going to be higher than my standard web hosting company (www.mmaweb.net, which I LOVE ...I've gotten tech support replies from them ON CHRISTMAS!).

However, with EC2's new Micro Instance, with a reserved instance price of $0.013 for Windows machines and $0.007 for Linux machines, I'm considering following in your footsteps and setting up a development environment, at least, and possibly setting up my hosted apps.

Regarding the development environment, when I travel, I frequently forget this file or that file on my machine at home, and am stuck, unable to work. I also like to keep personal files off of my employer's machine. Following in your footsteps would enable me to spend my lunch hour working on my own stuff, or to wait out traffic snarls at the end of the day by starting my personal projects while still at work.

Thanks for the great idea!

I have a linode instance going today

I have a linode.com instance going today. $20/month, full X on it, and using the wonderful free nomachines.com nx server. It's great. It means that I have a machine that's super fast on the internet (I'm doing performance testing right now, and want to know about the machine's performance, not about the internet's performance). This is still a great way to go.