How to change app on multiple ec2 instances?

半腔热情 提交于 2019-12-06 05:08:44

Netflix uses the approach you describe, where every new app release gets it's own AMI created, then they use their open source Asgard software to do rolling restarts, terminating old instances and spawning new instances running the new AMI.

That is a completely valid way to work, but for most of my work that's overkill. The building and management of AMI's is often more of a hassle than simply putting new software on the servers. I mostly use capistrano to automate code launches (which mostly involve doing a git pull) and restarting webservers, and I use chef for changes to server configurations and third-party software installs. If a systems change is involved enough, I'll burn a new AMI and restart using that.

So I think it depends on which aspects of your workflow are creating bottlenecks. If it's just deployment automation, check out capistrano and chef. If updating your app involves a lot of friction and deployment hassles, AMI's may be a good way to go. Either way, I always make sure my chef recipes can build the server to any particular software version spec. Hope this helps.

I think the way to accomplish this is to create a new ami with each new piece of software rolled out. You then build a new launch config for each ami. You then update your scaling group with the new launch config.

You can use AWS CodeDeploy to update your app on multiple EC2. It minimize downtime by progressively working across the instances and allowing applications to remain available and continue serving traffic..

You can also track deployments, stop, make rollbacks.. and it's free if your app is running on EC2.

Now that OpsWorks has been released the scene has shifted a bit. Have a look at that, as its an Amazon supported means of doing what you want - might be overkill for your needs though.

Check out capistrano, a deployment tool written in Ruby to solve exactly the problem you describe.

While it is a Ruby tool, it can be used to deploy applications that are not Ruby.

It manages the simultaneous SSH'ing into multiple servers, updates the code, and performs deployment tasks that are tailored to the role of each server.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!