I setup Amazon Auto scaling which I found simple to setup and very effective.
Here are the list of commands that I used to setup from the command line :
(1) as-create-launch-config lc --image-id ami-9ecc3af7 --instance-type t1.micro -I amazonid -S secretkey
This command creates the launch configuration and references the AMI.
(2) as-create-auto-scaling-group group1 --launch-configuration lc --availability-zones us-east-1a --min-size 1 --max-size 2 --default-cooldown 180 --load-balancers petstore --health-check-type ELB --grace-period 240 -I amazonid -S secretkey
This command sets up the auto scaling group.
(3) as-put-scaling-policy testScaleUp -g group1 --adjustment=1 --type PercentChangeInCapacity -I amazonid -S secretkey
This command sets up the auto-scaling policy. This command will return an arn number which will be used in the next command.
(4) mon-put-metric-alarm HighCPUAlarm --comparison-operator GreaterThanThreshold --metric-name CPUUtilization --namespace "AWS/EC2" --period 60 --statistic Average --threshold 5 --evaluation-periods 1 --dimensions "AutoScalingGroupName=group1" --alarm-actions arn:aws:autoscaling:us-east-1:868507589665:scalingPolicy:30b3c8d3-1b07-4064-b795-d196db923655:autoScalingGroupName/group1:policyName/testScaleUp -I amazonid -S secretkey
This command sets up the alarm to spawn new instances when CPU utilization goes above the threshold.
(5) as-put-scaling-policy testScaleDown --auto-scaling-group group1 "--adjustment=-1" --type ChangeInCapacity -I amazonid -S secretkey
This command sets up auto scaling policy for scaling down the instances. Also, this policy command will return an arn number which should be used in the next command.
(6) mon-put-metric-alarm LowCPUAlarm --comparison-operator LessThanThreshold --metric-name CPUUtilization --namespace "AWS/EC2" --period 60 --statistic Average --threshold 2 --evaluation-periods 3 --dimensions "AutoScalingGroupName=group1" --alarm-actions arn:aws:autoscaling:us-east-1:868507589665:scalingPolicy:44fa2f7a-b763-438c-b35a-18926b809182:autoScalingGroupName/group1:policyName/testScaleDown -I amazonid -S secretkey
This command sets up alarm for scaling down instances when the CPU utilization goes below the threshold.
Overall, the above 6 steps are required to setup the Amazon EC2 Auto Scaling in the application. You can play around with the lower and upper threshold cutoff to spawn and remove EC2 instances.
For more information on Auto Scaling, you can visit the Amazon AWS website.
Tuesday, December 14, 2010
Tuesday, December 7, 2010
Monday, December 6, 2010
Lifeguard - This is a pool manager aimed at Amazon's EC2 and SQS services
http://code.google.com/p/lifeguard/
Lifeguard - This is a pool manager aimed at Amazon's EC2 and SQS services
Lifeguard - This is a pool manager aimed at Amazon's EC2 and SQS services
JetS3t - Open source library to wrap Amazon S3 and CloudFront
http://jets3t.s3.amazonaws.com/index.html
JetS3t - Open source library to wrap Amazon S3 and CloudFront
JetS3t - Open source library to wrap Amazon S3 and CloudFront
QueryTool for Amazon Simple DB
http://coderslike.us/2009/04/15/query-tool-for-amazon-simpledb/
This is a simple tool to test queries on Amazon Simple DB.
This is a simple tool to test queries on Amazon Simple DB.
Amazon Web Services: Overview of Security Processes
A good article on "Amazon Web Services: Overview of Security Processes "
http://aws.amazon.com/articles/1697
http://aws.amazon.com/articles/1697
Developing Java Web Applications with Apache Tomcat and AWS
http://aws.amazon.com/articles/2241
A good tutorial on using AWS toolkit for Java and Eclipse plugin to develop and deploy Java web applications on Tomcat.
A good tutorial on using AWS toolkit for Java and Eclipse plugin to develop and deploy Java web applications on Tomcat.
Tips for Securing Your EC2 Instance
http://aws.amazon.com/articles/1233
This article describes best practices and commands to cover the amazon ec2 security practices.
This article describes best practices and commands to cover the amazon ec2 security practices.
Running MySQL on Amazon EC2 with EBS (Elastic Block Store)
http://aws.amazon.com/articles/1663
This tutorial describes one approach to using Amazon EC2's Elastic Block Store (EBS) as a persistent storage mechanism for a production MySQL database server, including snapshot backup and restore.
The tutorial covers various aspects of MySQL database management. I am still searching for tutorial on MySQL replication.
This tutorial describes one approach to using Amazon EC2's Elastic Block Store (EBS) as a persistent storage mechanism for a production MySQL database server, including snapshot backup and restore.
The tutorial covers various aspects of MySQL database management. I am still searching for tutorial on MySQL replication.
Sunday, December 5, 2010
Cloud Deployment Management - SaaS solutions to manage clouds
There are few companies that are providing this service as SaaS - like kaavo and Rightscale
Both the comapnies aim at providing solution to their customers in the form of managing and deploying instances on multiple cloud platforms like Amazon EC2, etc. They also provide solution to manage private cloud infrastructure.
The solution covers building and managind AMIs, monitoring instances, replicating instances, etc.
Both the comapnies aim at providing solution to their customers in the form of managing and deploying instances on multiple cloud platforms like Amazon EC2, etc. They also provide solution to manage private cloud infrastructure.
The solution covers building and managind AMIs, monitoring instances, replicating instances, etc.
How to Save a Snapshot of your Amazon EC2 Instance
This is another of excellent blog demonstrating steps - "How to Save a Snapshot of your Amazon EC2 Instance"
This is the link - http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance
This is the link - http://www.philchen.com/2009/05/19/how-to-save-a-snapshot-of-your-amazon-ec2-instance
How to create an Amazon Elastic Compute Cloud EC2 Machine Image (AMI)
This is a very useful blog posted which describes "How to create an Amazon Elastic Compute Cloud EC2 Machine Image (AMI)"
I am yet to try out the steps but worth trying out.
Here's the link - http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami
I am yet to try out the steps but worth trying out.
Here's the link - http://www.philchen.com/2009/02/14/how-to-create-an-amazon-elastic-compute-cloud-ec2-machine-image-ami
Thursday, November 25, 2010
Subscribe to:
Posts (Atom)