How to set up a Cloud environment at Amazon and run a web implementation solution

February 4th, 2010

written by gunther gerlach-2009

z-shareThis material covers the initial set up of an entire environment at Amazon to run any web implementation solutions. This is the quickest answer that you may find out there, so let’s stat it!

We will cover all the steps to set up an entire environment in a , from creating an user account at Amazon to creating and customizing Virtual machines (), Virtual Storage Units, Virtual backups, Elastic IP’s, etc.

For all of you that don’t understand some of the acronyms used here, let’s just to look at them before to start:

EC2: Amazon Enterprise Elastic Computing .

Front: a service that takes your static content and replicates closer to where you have a high volume of users.

: Software as a Service.

: as a Service.

: .

AWS: Amazon .

CDN: Content Delivery Network.

: Virtual machines (Virtual servers) running inside of real high availability servers from any of the many Amazon’s Data Centers distributed around the world. These virtual machines are usually named “Instances” and are created on demand by a environment. Amazon has many predetermined templates for these virtual machines than can be used. These machines are named or Amazon Machine Images. We can execute as many “Snapshots” or instances of it as we want from this , each one of them will be an Instance of the original . So, don’t forget if you take an and start it several times, each time creates a new Instance.

 

 

Setting up an account with Amazon

First of all, we need to set up an account in Amazon Elastic Computing “EC2” to be able to create our virtual machines, drives, IP, etc.  During this process, we can choose among several Data center’s location (Availability Zone) to create our environment. This location is defined by where our customers are.

 

Creating virtual machines

Inside of EC2 you will find many predefined or custom Amazon Machine Images that you can use and latter run from inside this environment created in a specific zone (geography or data center location). Inside of an Availability Zone, we have can create as many virtual machines as we want from predefined or custom Amazon Machine Images, or AMIs. Just don’t forget that you need just one of each, latter you can execute as many instances as you want from each one. These instances are named “Instance of the ” and they are snapshot of machines that you can load and run inside of your environment at an Availability Zone.

 

Creating virtual Storage units

So far we have created virtual machines that can be fired up at any time creating instances “snapshot” of our AMIs, but we haven’t created any hard drive or storage unit for these machines. Why we have to create an storage solution independently of our virtual machine?, well, the answer is simple, because Virtual machines are instances of AMIs and can be created or removed at any time based on demand, the data can’t be stored inside, other ways it will be lost along the instance at any given time. So, to resolve this problem, we just have to create a storage unit and then just attach it to our instance.

At Amazon we have more than option to create storage solutions for our environment. A quick description of them would be:

·   SimpleDB (SDB): it is a reasonable solution preferred for basic database delivery for specific service. This is a generalized storage solution only.

·   Elastic Block Store (EBS): This are very flexible solutions and is just like a hard drive that can be attached to any . You can make an EBS from 1GB to 1TB and ‘install’ it on any of your virtual machine Instances

·   Relational Database Service (RDS): it is a robust database services beyond SDB. The choice of service is often dependent upon the needs of the solution

 

As I said, to keep your data intact even when an Instance dies, you can use any of the options available from Amazon (AWS). Provably the most common one is the Elastic Block Store (EBS).

 

 

Setting up a Virtual Backup

One of the most critical point of discussion across the web in regards is in terms, of our data (storage unit failure) and privacy. We have all our data or critical data stored in a virtual storage unit but ho we can protect it? This is so far the most important question… well, Amazon provide with a simple and smart solution named Simple Storage Solution (S3) to help us protecting our virtual storage units. So, to protect our data stored in our virtual EBS volume for any hard drives failure, we can just back this up into more stable storage solution.

S3 Backup allows you to have up to 100 directories of data, so you can easily back up your EBS volume(s) as often as you want it, and more important, you might want to back up a copy of your image (instance) after you customized an to align with your requirements. This way, if your carefully customized Instance or EBS volume crashes for any reason, you can pull them out of your backup in S3 fairly quickly and get up and running again in minutes.

 

Note: So far we have created our virtual machines () and a virtual hard-drive attached to it where our data will be stored. We have also created a backup on S3 with all the necessary to allow our engineers full access and a controlled access to our customers online.

 

What about of our data?

What we want after setting this environment and loaded our data plus software in this virtual environment are two things: Allow our engineers to get full access to our while keeping hacker away from our data and systems. For this, Amazon (AWS) has two different concepts for purposes:

·         A robust system based in public/private key pairs and digital certificates to secure the log into any instance (). This allows your engineers and developers to access your systems with proper rights.

·         group, to define how entities from the outside world (web browsers, remote desktops, ftp, email, etc.) can or cannot access your virtual machines (Instance).

 

How public IP work in a environment?

At this point we have created a whole ready to be accessed by public users but, how this work? How can internet users find our virtual machines if they are running on demand and instances are created and die all the time? Well, basically Amazon (AWS) has a solution named Elastic IP (EIP). It is called elastic because it is a fixed public IP on the Internet. Basically it can be assigned to any of our Instances on the inside of AWS. So, if any Instance dies and we bring up a new Instance, we can move the EIP to this new Instance and minimize site interruptions.

This smart and simple solution help us to serve our website to the public, we will need to have a permanent public IP address that we can assign to our Instance.

 

Note: At this point, our solution is up and running on our Instance, our data is saved on an EBS volume and, backed up on S3. by providing both, public and corporate access.

 

Flexible Scalability

At this point, most of us are running a to provide some kind of service or E-Commerce solution. We know very well what are we selling, we know our target market and all those details but, most of us have no idea where most of our customers will come from. They could group out of our geographical location, like Europe or China… It could be that our site is popular in a geographical region that is distant from the region in which we set up our system. As an example, we could have set up our website in USA, and getting most of the traffic from here during the day, but we are getting an amazing twist during the night (day in Europe) and having the same traffic or daily hits from Europe during that period of time. Performance of our site for our European visitors will not be as good as we would like and this will significantly impact our customer’s experience.

Thanks to Amazon elastic virtual , we can move our site (’s, virtual machines or instances) out of the USA region during the night “closer to these users” by using the Content Delivery Network, or CDN, making the delivery of your site much faster by replicating static content closer to where you have a high volume of users. In AWS, CDN services are delivered by -Front. This service takes your static content and replicates closer to where you have a high volume of users, thereby making the delivery of your site much faster.

 

 

Resources:

 

Gunther Gerlach

  1. May 11th, 2010 at 08:10 | #1

    Would a fly without wings be called a walk?

  2. May 12th, 2010 at 23:11 | #2

    I now, this is a great article.A successful blog needs unique, useful content that interests the readers

  3. Debt Consolidation
    October 6th, 2010 at 12:51 | #3

    Sorry for my bad english. Thank you so much for your good post. Your post helped me in my college assignment, If you can provide me more details please email me.

  1. No trackbacks yet.