开发者

How can I improve our current deployment workflow (with Capistrano)?

Our team works on a high-traffic site where we use 开发者_运维百科Capistrano to deploy our Rails apps running on Ubuntu/Apache/Passenger. We have load balancing setup, so our current procedure to minimize downtime and avoid having customers see Rails' 500 page is as follows (assuming only 2 production servers, just for this example):

  • Turn Apache off on production_1 (Load balancing now send all requests to production_2)
  • Deploy to 1st server: cap production_1 deploy (turns Apache on at the end of deploy)
  • Do some basic tests to ensure nothing went funky
  • If something went wrong, turn Apache off and rollback

Then, I follow that procedure for the production_2 server.

As you can see, this is painful, so I'm looking for a better way. Not to mention the fact that we have more servers and will be adding even more soon.

What alternatives are available?

Thanks!


yes, you can have different environments called "production_0", "production_1" and use capistrano-ext to provide multistage deployment. the run them as following:

  1. cap production_0 deploy
  2. cap production_1 deploy

please take a look at Github pages howto setup multistage deployment

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜