【发布时间】:2016-05-02 06:12:49
【问题描述】:
我已经创建了成功部署所需的一切。 我试图在没有在 Amazon 实例中配置 CodeDeploy 代理的情况下进行部署,并且部署 [显然] 失败了。 不过设置好之后,就成功了。 所以,我的问题是,我应该配置我手动使用的每个实例吗? 如果部署组中有 100 个实例怎么办? 我是否应该在已配置 CodeDeploy 代理工具的情况下创建 AMI?
编辑
我看过这个: https://www.youtube.com/watch?v=qZa5JXmsWZs
有了这个: https://github.com/andrewpuch/code_deploy_example
我只是不明白为什么我必须使用 IAM 凭据配置实例。它不应该从我启动它的角色中获取信誉吗? 我不是 aws 角色和政策方面的专家,但从 CD 文档中我可以理解。 有没有办法让 IAM 用户访问实例,这样我就不必设置 CD 代理了?
编辑 2
我认为这篇文章的答案是:http://adndevblog.typepad.com/cloud_and_mobile/2015/04/practice-of-devops-with-aws-codedeploy-part-1.html
But as you can see, I launched multiple instances but I only installed CodeDeploy agent on one instance, what about others? Do I have to repeat myself and login to them and install them separately? It is OK since I just have 2 or 3. But what if I have handers or even thousand of instances? Actually there are different solutions for this. One of them is, I setup all environment on one instances and create an AMI from it. When I launch my working instance, I will create instance from the one I’ve already configured instead of the AWS default ones. Some other solutions are available
【问题讨论】:
-
您是说为 EC2 实例分配 IAM 角色由于某种原因不起作用?
-
@Rodrigo M:我想我把 aws-cli 误认为是 CD 代理了。真的很抱歉造成混乱。我将编辑我的问题。
-
@Mark B :如果将 IAM 角色分配给 EC2 实例意味着我不必配置 CodeDeploy 代理,那么可以。据我了解,我创建了 2 个角色,但我对它们的用法和必要性感到困惑。
标签: linux amazon-web-services aws-cli aws-code-deploy