auto scaling – Mr Kirkland http://mrkirkland.com (mainly) Tokyo based developer and founder Mon, 18 Jan 2016 14:58:41 +0000 en-US hourly 1 https://wordpress.org/?v=4.4.2 Script for launching load balanced EC2 auto scaling group http://mrkirkland.com/script-for-launching-load-balanced-ec2-auto-scaling-group/ http://mrkirkland.com/script-for-launching-load-balanced-ec2-auto-scaling-group/#respond Sat, 23 Mar 2013 04:17:39 +0000 http://www.mrkirkland.com/?p=217 We just migrated the image processing on artweb.com from our own load balanced EC2 auto scaling group of instances to use blitline instead. The auto scaling group is launched and shut down with the scripts attached below. In our implementation the instances were a simple phpthumb installation that we processed images via http request. Whilst […]

The post Script for launching load balanced EC2 auto scaling group appeared first on Mr Kirkland.

]]>
We just migrated the image processing on artweb.com from our own load balanced EC2 auto scaling group of instances to use blitline instead.

The auto scaling group is launched and shut down with the scripts attached below. In our implementation the instances were a simple phpthumb installation that we processed images via http request. Whilst our solution worked, it wasn’t as robust as blitline, partly because it made no use of queuing (as I mentioned in my scalability post), plus blitline is still pretty cost effective.

However I still have these two handy scripts for spinning up a load balanced group of servers (and shutting them down) which I think are rather handy, so today I’m releasing them on to wilds of the world wide internetz.

Download: http://yumiko.theartistsweb.net/data/asg-scripts.tgz

INSTALLATION
0) you need installed the AWS command line tools http://aws.amazon.com/developertools/2535 docs http://docs.aws.amazon.com/AutoScaling/latest/DeveloperGuide/UsingTheCommandLineTools.html

1) chmod 755 the scripts
# chmod 755 aws-start-as-group.sh
# chmod 755 aws-shut-down-as-group.sh

2) edit the config at the top of each script

USAGE
1) edit config at the top of the aws-start-as-group.sh script
* set your AMI and AVAILABILTY_ZONES
* tweak INSTANCE_TYPE, MAX + MIN INSTANCES depending on your estimated needs (NB number of MIN_INSTANCES will constantly be running)
* for finer tuning experiment with the COOLDOWN and CPU values
* if you are going to run multiple autoscaling groups then you might need to edit the BASE_NAME for each time you run the script (though it auto creates a name based on the date and hour)

2) execute with
# aws-start-as-group.sh

3) terminate all resources with
# aws-shut-down-as-group.sh $BASE_NAME
NB $BASE_NAME is set in the config and when you run this script it is echoed at the end, it's a prefix and todays date

The post Script for launching load balanced EC2 auto scaling group appeared first on Mr Kirkland.

]]>
http://mrkirkland.com/script-for-launching-load-balanced-ec2-auto-scaling-group/feed/ 0