Link to home
Start Free TrialLog in
Avatar of alon_sabi
alon_sabi

asked on

How to update our application on an autoscaling EC2 stack

Hi,

We have a particularly unique situation so I will try to be as clear as I can be.

Background information:
We are a SaaS business that currently runs a LAMP stack application on amazon EC2. We have no autoscaling and we plan to move to it in the very near future. Our deployment processes are moving towards agile development but we're not quite there yet. We run subversion as our version control system from which we manage multiple versions of our code at the same time.

End Goal:
We want to move to autoscaling using Amazon's Autoscaling infrastructure with CloudFormation for our web servers only at the moment. We're currently stuck on coming up with a method to perform updates to our code base all at the same time, whenever we want. The key here is that the update needs to be performed at the same time across all servers (we can allow for a small delay between updates of each server <1 min). I know that Amazon cloud formation can perform updates to the stack, but from what I have read the servers will update on their own time within a 15 minute period. This is of course not feasible as we don't want our clients on different versions of a particular code base.

We've thought about using a custom script on a permanent server that will push commands to update the code base on each server (by forking a process to each instance in the autoscaling group) but don't know if that's the best route. We're also trying to avoid having to re-bake the AMI used in the launch config to have new code in it.

The Question:
Does anyone know a method that works for them for updating the codebase on autoscaling servers that doesn't require building a new AMI for each release?

Thanks very much for your help!
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

The key is using your own application configuration management tools.
CloudFormation deals only with infrastructure, and has a hook to bootstrap configuration scripts.
Choose either Chef or Puppet as your tool.
CloudFormation will start a base AMI with latest patches and a Puppet client.
The Puppet client will pull the application from SVN.

When there is an application change, the Puppet master will push application changes on demand to all servers.
Avatar of alon_sabi
alon_sabi

ASKER

Your answer is actually very insightful. I was unaware puppet uses a pub/sub method for delivering update commands to servers. I don't think puppet is exactly good for us at the moment as we're still fairly small company, but it got me looking into it.

I'm more inclined to use an amazon service like SNS and SQS for this over puppet's ActiveMQ implementation.

What're your thoughts about this?
ASKER CERTIFIED SOLUTION
Avatar of Shalom Carmel
Shalom Carmel
Flag of Israel image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, I'll check out OpsWorks. I'll be honest I didn't even think to consider it.

Thanks again :)