我已經創建了成功部署所需的全部內容。 我試圖在沒有在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個角色,但我對他們的用法和必要性感到困惑。 –