29.12.2013 Views

l-migrate2cloud-1-pd..

l-migrate2cloud-1-pd..

l-migrate2cloud-1-pd..

SHOW MORE
SHOW LESS

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

developerWorks®<br />

ibm.com/developerWorks<br />

Working with Amazon EC2<br />

Amazon EC2 lets anyone with a credit card pay for servers by the hour, turning them<br />

on and off through an application programming interface (API). You have a variety of<br />

server types to choose from—depending on whether memory, disk, or CPU power is<br />

your primary concern—along with a suite of add-ons from persistent disks to load<br />

balancers. You pay only for what you use.<br />

Alongside the Amazon EC2 offering are others that give you, among other things,<br />

payment processing, databases, and message queuing. In this article series, you will<br />

be using Amazon Simple Storage Service (Amazon S3), which gives you access to<br />

disk space on a pay-per-use basis.<br />

The example application<br />

The web application that this series uses for examples is a payroll service called<br />

SmallPayroll.ca, written with the Ruby on Rails framework and a PostgreSQL back<br />

end. It is typical of many web applications: It has a database tier, an application tier,<br />

and a set of static files like cascading style sheet (CSS) and JavaScript files. Users<br />

navigate various forms to input and manipulate data, and they generate reports.<br />

The various components in use are:<br />

• Nginx. The front-end web server for static files and balancer to the middle<br />

tier.<br />

• Mongrel. The application server itself.<br />

• Ruby. The language you write the application in.<br />

• Gems. Third-party plug-ins and libraries for everything from database<br />

encryption to application-level monitoring.<br />

• PostgreSQL. The Structured Query Language database engine.<br />

Use of the site has exceeded the capacity of the single server that now houses it.<br />

Therefore, a migration to a new environment is in order, and this is a prime<br />

opportunity to move to the cloud.<br />

Desired improvements<br />

But simply moving from one server to a small number of cloud-based servers<br />

wouldn't take advantage of what can be done in the cloud, nor would it make for<br />

exciting reading. So, during the move, you'll make improvements, some of which are<br />

only possible in a cloud environment:<br />

Initial migration<br />

Trademarks<br />

© Copyright IBM Corporation 2010. All rights reserved. Page 2 of 21

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!