我已经创建了成功部署所需的全部内容。 我试图在没有在Amazon实例中配置CodeDeploy代理的情况下进行部署,部署[显然]失败。 虽然设置它,但成功。 所以,我的问题是,我应该配置手动使用的每个实例吗? 如果我在部署组中有100个实例,该怎么办? 我应该使用已配置的CodeDeploy代理工具创建AMI吗?使用IAM用户凭据为CodeDeploy设置Amazon Linux实例
编辑
我曾经看过这样的: https://www.youtube.com/watch?v=qZa5JXmsWZs
与此: https://github.com/andrewpuch/code_deploy_example
我只是不明白,为什么我必须与IAM配置信任该实例。难道它不应该从我发起的角色中获得信任吗? 我不是aws角色和策略方面的专家,但是从CD文档来看,这就是我所理解的。 有没有办法让IAM用户访问实例,所以我不必设置CD代理?
EDIT 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
你是说因为某种原因将IAM角色分配给EC2实例不起作用? –
@Rodrigo M:我认为我误解了CD代理的aws-cli。真的很抱歉混淆。我将编辑我的问题。 –
@Mark B:如果将IAM角色分配给EC2实例意味着我不必配置CodeDeploy代理,那么是的。据我了解,我创造了2个角色,但我对他们的用法和必要性感到困惑。 –