amazon web services - How to scale out Tomcat on AWS EC2 instance? -
there number of questions on auto scaling. none of talks scaling out software stack installed on these servers. aws auto scaling scales out resources. not software on it. in case looking forward scale out tomcat server (and apache httpd server) installed on first instance part of new instance aws scaling service creates.
i followed regular process establish scaling application on amazon web services ec2 instances.
- created snapshot existing instance exact configurations of running instance - success
- created ami above snapshot - success
- created auto scaling group , launch configuration - success
- scaling policy create new instance upon cpu >= 65% 2 times. - success
the above procedure creates new instance not copy software stack present on image.
how accomplish auto scaling in such way when aws auto scaling happens, tomcat server part of ami copied , started in new scaled out instance.
do have use puppet/chef or such tools achieve this? or there option in aws using command line?
please note elastic load balancer automatically adds new instance on per launch configurations shows 'out of service' since there no apache server installed on new scaled instance.
you create amis directly ec2 instances, not snapshots. snapshots ebs volumes. check created ami correctly running ec2 instance on have apache/tomcat installed , running (and configured autostart on reboot).
no, not have use puppet/chef or other cm tool. can want in couple of ways:
- the simplest way create ami running ec2 instance , configure auto scaling group launch new instances ami based on metric.
- use base ami without apache/tomcat or software , bootstrap new instances @ launch time download , configure needed.
the disadvantage of #1 amis out of date quickly. disadvantage of #2 instances taken longer come service. recommend combination of #1 , #2, capture new ami every few months , becomes base ami launching , update instance @ launch time via userdata init script.
Comments
Post a Comment