如何部署和亚马逊自动伸缩群更新乘EC2实例应用程序? [英] How to deploy and update app on multiply ec2 instances in Amazon Auto-scaling group?

查看:193
本文介绍了如何部署和亚马逊自动伸缩群更新乘EC2实例应用程序?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

您可以建议在其中的方式我可以部署从SVN code更改运行在背后自动缩放组亚马逊负载均衡的所有EC2实例? 我还需要更新code到最新版本,当一个新的EC2实例中自动缩放组会自动启动。

Could you suggest in which ways I can deploy code changes from SVN to all ec2 instances running behind Amazon load balancer in auto-scaling group? I also need to update code to latest version when a new ec2 instance launching automatically in auto-scaling group.

我想用用户数据运行在新机器上使用svn了'。而也许我可以用cron来执行svn了定期对所有机器。 你可以建议更好的解决方案?

I suppose to use 'user-data' to run 'svn up' on new machines. And probably I could use cron to run 'svn up' periodically on all machines. Could you suggest better solutions?

推荐答案

在我看来,你不应该更新,在运行的情况下,code,最好创建一个主AMI具有所有的更新堆栈/ $ C $ç准备去,然后有条不紊地终止正在运行的情况下,让自动缩放code照顾部署需要新的实例,这将影响部署新的code。

In my opinion, you shouldn't be updating code on the running instances, better to create an master AMI that has all the updated stack/code ready to go and then methodically terminate the running instances and let the auto scaling code to care of deploying new instances as needed, which will in effect deploy your new code.

您可以使用AWS Cloudformation此任务: <一href="http://aws.amazon.com/about-aws/whats-new/2013/02/20/announcing-new-aws-cloudformation-deployment-enhancements/">http://aws.amazon.com/about-aws/whats-new/2013/02/20/announcing-new-aws-cloudformation-deployment-enhancements/

You can use AWS Cloudformation for this task: http://aws.amazon.com/about-aws/whats-new/2013/02/20/announcing-new-aws-cloudformation-deployment-enhancements/

或ElasticBeanStalk:

or ElasticBeanStalk:

<一个href="http://aws.amazon.com/about-aws/whats-new/2013/11/11/aws-elastic-beanstalk-announces-rolling-updates/">http://aws.amazon.com/about-aws/whats-new/2013/11/11/aws-elastic-beanstalk-announces-rolling-updates/

尝试谷歌搜索AWS滚动更新甚至更多有用的链接。

Try googling "AWS Rolling Updates" for even more helpful links.

这篇关于如何部署和亚马逊自动伸缩群更新乘EC2实例应用程序?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆