I need to build a web service application for my client, using the following Cloud environment:
I need to install the Tomcat server on my amazon EC2 instance.
I need an Elastic infrastructure leveraging CloudWatch, Elastic Load Balancer (ELB), and AutoScale services provided by the Amazon Web Services (AWS) Java APIs. As load increases, I need to be able to dynamically scale the deployment, and when load decreases I need to release the wasted capacity.
Can anyone please teach me how to start on this (preferably using the Amazon JAVA API to handle most of the requirements)?
How can I install and configure my Tomcat server on the Amazon EC2 instance in such a way that it will leverage the use of Elasticity (ELB)? Is it better to install the tomcat server by myself, or should I make use of the AMI that already has Tomcat pre-installed?
I already have the Web Service application file (WAR) generated from my eclipse IDE. How can I proceed from there? What extra configuration should I make to be able to deploy this application on my EC2 instance?
I need to scale just this instance to demonstrate elasticity at this tier of the application. I need to generate load on an instance – that will in turn generate an alert (CPUAvgUtil exceeds a threshold) – which would be used in AutoScale to trigger a new instance – that ELB will then use to load balance the incoming web requests. When I have a lot of request, the Load Balancer should create new instance to serve the client’s web request.
Could someone explain me how can I proceed with these requirements to achieve good scalability?
EDIT
Based on the comment from dtuckernet below, this task can automatically be handle by using Elastic beanstalk. Any ideas on how to do it manually in Java (such as initializing the cloudwatch, ELB, and autoscale, and set an alarm to monitor the cpu usage)? I know that this is possible, as amazon actually have java API for that. However I couldn’t find any example code on the Amazon website that relates to Cloudwatch, ELB, and autoscale. I just wanna practice with the underlying infrastructures to have a thorough understanding on that, instead of using the Amazon Elastic beanstalk.
This sounds exactly like a situation that Amazon Elastic Beanstalk could handle. Elastic Beanstalk takes all of the configuration hassle out of the mix for you, and it takes care of launching the appropriate EC2 servers with Tomcat pre-installed. All you have to do it setup your WAR file and then set your scaling points.
http://aws.amazon.com/elasticbeanstalk/