生产环境中的 Amazon EC2 Auto Scaling
我意识到每次更改代码
并遵循自动缩放配置时,我都必须从 EBS 卷制作图像(这真的很糟糕)。
我听说有些人尝试从 github 或类似的做法加载最新的代码。
这样他们就可以让服务器自动拥有最新的代码,而无需每次都制作新的图像。
我已经有一个私人github了。
这是解决Auto-Scaling代码管理的唯一方法吗?
如果是这样,我该如何配置它才能工作?
I have realized that I have to make Image from EBS Volume everytime when I change my code
and following autoscaling configuration everytime (this is really bad).
I have heard that some people try to load their newest code from github or some similar sort of doing.
So that they can let server to have newest code automatically without making new image every single time.
I already have a private github.
Is it a only way to solve Auto-Scaling code management ?
If so, how can I configure this to work?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(2)
使用用户数据脚本,该脚本适用于许多公共图像,包括亚马逊的图像。您可以让它下载 puppet 清单/模板/文件并直接运行。寻找无主傀儡。
Use user-data scripts, which work on a lot of public images including Amazon's. You could have it download puppet manifests/templates/files and run directly. Search for master less puppet.
是的,您可以配置 AMI,以便实例在首次启动时加载最新的软件和配置,然后再在 Auto Scaling 组中投入使用。
如何设置启动脚本可能取决于您运行的特定操作系统和版本。
Yes, you can configure your AMI so that the instance loads the latest software and configuration on first boot before it is put into service in the auto scaling group.
How to set up a startup script may depend on the specific os and version you are running.