- Le plus récent
- Le plus de votes
- La plupart des commentaires
For your first question "What if its not installed" the answer is: Nothing deploys. Normally:
- When you attach the AutoScaling Group (ASG) to the Deployment group, Code Deploy will create a lifecycle hook on the ASG
- When an instance is launched, the ASG will trigger this lifecycle hook to notify Code Deploy
- The agent within the instance then starts the deployment
As for why it stopped working, hard to tell without being inside your environment. Maybe it was baked into the AMI and the AMI was updated, or the agent version became too old to function? Regardless, to fix the issue you need to make sure the agent is running as part of the instance boostrapping. There's multiple options on how you can accomplish that listed in this doc: https://docs.aws.amazon.com/codedeploy/latest/userguide/integrations-aws-auto-scaling.html
The issue has been resolved. Initially, I added the "iam_user_arn" parameter in the "/etc/codedeploy-agent/conf/codedeployagent.yml" configuration file, which caused the agent to always connect to the specified IAM user. Even though the IAM user had the necessary permissions, the EC2 instance was unable to deploy, and the reason for this issue was unclear.
In the end, I reverted the configuration file to its default settings, and the EC2 instance was associated with the role that had the required permissions. This resolved the problem, and deployment proceeded as expected.
Contenus pertinents
- demandé il y a un an
- demandé il y a un an
- demandé il y a 2 mois
- AWS OFFICIELA mis à jour il y a 9 mois
- AWS OFFICIELA mis à jour il y a un an
- AWS OFFICIELA mis à jour il y a 2 ans
- AWS OFFICIELA mis à jour il y a 3 ans
What if we use Instance Refresh? Will CodeDeploy also know to deploy the application there?
Yes, any time the ASG launches an instance, the lifecycle hook created by CodeDeploy will be triggered. So as long as the Agent is installed and running, there will be a deployment to the new instance