EC2 自动化工具/策略?
您使用哪些工具或策略来实现 EC2 活动的自动化?
我需要能够启动多个 EC2 实例、为其配置各种软件(主要是 Python 包)、与 S3 交互(主要是下载数据)并运行各种作业。 我将根据需要和按计划进行此操作。
我正在尝试决定是否应该:
- 创建一个 AMI,并在其上加载我的所有软件 或者
- 启动一个普通的 Linux AMI 实例并将我的软件 scp 到它
以进行配置和自动化Boto看起来不错。 或者我可以用 Paramiko 写一些东西。 推荐一个还是其他我应该看的东西?
基本上我正在寻找建议/成功案例,让我知道什么对你有用。
What tools or strategies are you using for automation of EC2 activities?
I need to be able to bring up a number of EC2 instances, provision various software to it (primarily Python packages), interact with S3 (primarily download data), and run various jobs. I'll be doing this both on-demand and on a scheduled basis.
I'm trying to decide if I should:
- Create an AMI with all my software loaded on it
or - Launch a plain vanilla linux AMI instance and scp my software to it
For the provisioning and automation Boto looks pretty good. Or I could write something with Paramiko. Recommend either or anything else I should be looking it?
Basically I'm looking for advice / success stories, let me know what's working for you.
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(3)
这个问题是不久前提出的,但我相信我的答案可能对其他用户有用。 我相信市场上最好的自动化工具是由云管理平台提供的。 例如,它们提供自动扩展、配置软件集成(Chef/Puppet)、数据库复制、dns 管理...
最流行的云管理软件是 Scalr(免责声明:我在那里工作)、RightScale 和 enStratus。 Scalr 是开源的,并根据 Apache 2 许可证发布。
关于您关于 AMI 的具体问题,云管理平台通常提供预配置的 AMI(在 Scalr 中,我们将其称为角色)。 如果您想在现有实例上创建自己的 AMI,您将能够创建快照并将其用作未来实例的模板。
This question was asked some time ago now but I believe my answer could be useful to other users. I believe the best automations tools available on the market are provided by Cloud Management platforms. For example they offer auto-scaling, configuration software integration (Chef/Puppet), databases replications, dns management...
The most popular cloud management softwares are Scalr (disclaimer: I work there), RightScale and enStratus. Scalr is open-source and released under the Apache 2 license.
Regarding your specific question on AMIs, cloud Management platforms usually provide pre-configured AMIs (at Scalr, we call them roles). If you want to create your own AMI built on an existing instance, you'll be able to create snpashots and use them as a template for future instances.
为了回答您关于选择 AMI 的问题,我想说这取决于您安装的软件数量。
我通过混合方法取得了成功,我构建了 AMI 并加载了重量级且更稳定的软件。 这是需要运行安装程序的东西,或者需要相当长的时间来安装(请记住,如果您在启动过程中每次都重新安装软件包,那么您每次都会为安装付费)。 然后,我在配置/启动时上传小型且不稳定的软件。 此存储桶中包含大部分应用程序代码、数据等。这样,我可以更改我的应用程序而不必接触 AMI。
这种方法的好处:
主要缺点:
我不使用Python,所以我无法评论您引用的任何一个API。
To answer your bullets about selecting AMIs, I would say that it depends on how much software you're installing.
I have been successful with a hybrid approach, where I build an AMI and load my heavyweight and more stable software. This is the stuff that needs to run an installer, or takes considerable time to install (remember that if you re-install a package every time as part of your startup process, you're paying for the install every time). Then, I upload the small and volatile software at provisioning/startup time. In this bucket goes most of the application code, data, etc. That way, I can change my app and not have to touch the AMI.
The benefits of this approach:
Major drawbacks:
I don't use Python, so I can't comment on either of the APIs you referenced.
AWS 刚刚发布了 Systems Manager 套件,其中包括 自动化服务将(除其他外)处理您的围绕 AMI 的用例。
AWS just released the Systems Manager suite, which includes an Automation service that will (among other things) handle your use cases around AMIs.