Feeds

I floated a site into the cloud, and it didn't rain down in chunks...

My baby steps migration

Application security programs and practises

Free... as in free beer?

Using the installed features in Eclipse I created a "New AWS Java Web Project" from the pull-down menu next to the new AWS icon, with the aim of making a very simple custom app.

eclipsebEANSTALKruns

However, when invited to "Run as ... Run on Server" I could not find that menu option, so decided that I probably had to upgrade from my 'normal' Eclipse to the heavyweight JEE version (and another 200MB download) as AWS recommends! (I'd seen errors in Eclipse indicating that I should get the JEE version too.)

I afterwards discovered that the "Run on Server" option doesn't apply to the bare project (somewhat annoying), only to their sample "TravelLog" site. Still, upgrading to the full-fat (but still free) Eclipse did no harm...

Having worked that out and followed the video's instructions, I had the TravelLog site up and running in the cloud in a few more minutes. At the risk of being written off as an AWS fanboi, that was pretty smooth!

I was pretty excited that I had something running in the cloud in a few hours from scratch and I hadn't spent any money yet.

I still wanted to make my own non-static (Java/JSP based) trivial site, and as I couldn't get the sample AWS minimal site working, I instead stripped down the TravelLog, basically to show "Hello World" and the Java time in milliseconds.

HELLO WORLD!

The simple site has the following code for its top-level index.jsp ("welcome") file which is sort of minimally correct though in practice all but the line containing "Hello world again" could probably safely be omitted:

<%@ page language="java" contentType="text/html; charset=utf-8" pageEncoding="utf-8"%> <% if (request.getMethod().equals("HEAD")) return; %> <!DOCTYPE html>

Hello world again @ <%= java.lang.System.currentTimeMillis() %>!

for which output on one page load was:

Hello world again @ 1299270813546!

with the number rising on each page refresh in Eclipse or from the browser.

There are still about a dozen configuration files, and the "magic" that bundles my index.jsp into a WAR file for deployment to AWS is hidden from me which I don't like: I want to see the cogs turning, and I don't yet have a fixed friendly URL for the server that I could point an incoming user at (eg via an CNAME alias in DNS). But even this basic service has up to four instances behind a load balancer auto-started as necessary which is very grown-up.

Also, as of March 2011 the Elastic Beanstalk service is only available in the US (where I already have a dedicated machine) but I'm happy to deploy in the US for now for testing. Singapore is likely to be available soon, and AWS service there might replace (say) my Mumbai/Bombay server.

Note that a quiet site running on one server instance can stay entirely within the "free tier" while the AWS offer lasts, and subsequently, according to an AWS-supplied calculation, might cost of the order of US$40 per month, which would be much cheaper than my current dedicated AsiaPac hosts. (Though I did seem inexplicably to have run up a bill of a whole 3 cents while mucking around.)

In general, this is the sort of area where virtualisation and the cloud can reduce total cost of ownership, and where hardware resources are not heavily utilised. Thus transparent sharing with other services will save you money (and energy).

Functionality, storage and delivery

The next step would be to build a WAR file of my own similar in functionality to the trivial one in this "magic" Eclipse project, and learn how to deploy it manually to a stable externally visible aliased URL (or IP address) so that it would be seen as being "my" site transparently to an end user, and so that I don't have to turn my current build process upside-down or tie myself too closely to AWS ...

I should also deal with storage; the mirrors of my site are mainly caches for the large dataset that they front – and a naive implementation would probably lose that cache each time a server was redeployed – so I should consider using the S3 Storage Service or the CloudFront content delivery network (CDN) to do some of the heavy lifting.

I must also find out what I was charged the princely sum of USD0.03, when I had thought I would be entirely in the free tier, and how to permanently remove my trial server from AWS when done (after repeated attempts to kill it, it just kept coming back).

And I really need to find an auto-cutoff so that if I'm running up a huge bill unawares then I get sent a warning or two and eventually the service just gets taken down: my site isn't important enough for me to bankrupt myself if something goes wrong. ®

Eight steps to building an HP BladeSystem

More from The Register

next story
Sysadmin Day 2014: Quick, there's still time to get the beers in
He walked over the broken glass, killed the thugs... and er... reconnected the cables*
SHOCK and AWS: The fall of Amazon's deflationary cloud
Just as Jeff Bezos did to books and CDs, Amazon's rivals are now doing to it
Amazon Reveals One Weird Trick: A Loss On Almost $20bn In Sales
Investors really hate it: Share price plunge as growth SLOWS in key AWS division
US judge: YES, cops or feds so can slurp an ENTIRE Gmail account
Crooks don't have folders labelled 'drug records', opines NY beak
Auntie remains MYSTIFIED by that weekend BBC iPlayer and website outage
Still doing 'forensics' on the caching layer – Beeb digi wonk
BlackBerry: Toss the server, mate... BES is in the CLOUD now
BlackBerry Enterprise Services takes aim at SMEs - but there's a catch
The triumph of VVOL: Everyone's jumping into bed with VMware
'Bandwagon'? Yes, we're on it and so what, say big dogs
Carbon tax repeal won't see data centre operators cut prices
Rackspace says electricity isn't a major cost, Equinix promises 'no levy'
prev story

Whitepapers

Top three mobile application threats
Prevent sensitive data leakage over insecure channels or stolen mobile devices.
Implementing global e-invoicing with guaranteed legal certainty
Explaining the role local tax compliance plays in successful supply chain management and e-business and how leading global brands are addressing this.
Boost IT visibility and business value
How building a great service catalog relieves pressure points and demonstrates the value of IT service management.
Designing a Defense for Mobile Applications
Learn about the various considerations for defending mobile applications - from the application architecture itself to the myriad testing technologies.
Build a business case: developing custom apps
Learn how to maximize the value of custom applications by accelerating and simplifying their development.