Production deployment to EC2 with minimal downtime
Posted
by jensendarren
on Server Fault
See other posts from Server Fault
or by jensendarren
Published on 2010-06-10T02:15:47Z
Indexed on
2010/06/10
2:23 UTC
Read the original article
Hit count: 289
I have a simple web application deployed on a large instance with EC2. I now want to deploy the latest code to this server but I want to do this in a way which minimizes downtime and is a smooth as possible for the end user. Here is my plan:
- Fire up another large instance
- Install all the software layers on that instance
- Restore and attach an EBS drive to the instance
- Deploy our latest production ready code on the new instance
- Run all tests (including manual testing of the application)
- (If tests pass) Put a "Site Under Maintenance" notice on the live site.
- Backup the EBS instance on the live site
- Detach the EBS instance from the new server and replace with the latest backup
- Use ec2-associate-address to move the IP address to the new instance
- Sit back and wait for traffic to start flowing though the new instance
- Terminate the old instance
Does this seem like a good strategy? Are there any tutorials or books that might cover this topic? I have already read Cloud Application Architectures by George Reese, which is an excellent book, but does not cover deployment. Additionally, I know that there are tools that can help with this like RightScale or enStratus which I will use when I start using more than one instance.
© Server Fault or respective owner