如何将最新代码从 CodeDeploy 自动部署到自动缩放组?
How to auto deploy latest code from CodeDeploy to an auto scaling group?
当 Auto Scaling Group 创建新实例时,CodeDeploy 中的代码不会下载并安装到新创建的 EC2 实例上。
我已按照此处的文档进行操作:
https://docs.amazonaws.cn/en_us/codedeploy/latest/userguide/tutorials-auto-scaling-group-create-auto-scaling-group.html
最后的步骤是
Install the CodeDeploy agent by following the steps in Install the CodeDeploy agent and using the Name=CodeDeployDemo instance tags.
我的“用户”脚本 运行 在来自 ASG(Auto Scaling 组)的新实例上正确安装并且 运行 CodeDeploy 代理(连接到机器的 SSh 和 运行ning service codedeploy-agent status
显示其 运行ning),但从那里,我不知道如何告诉 CodeDeploy 将代码部署到该实例。 (或者那个实例的 运行 CodePipeline?)
你能帮我指出正确的方向吗?如果您需要,我很乐意提供此处缺少的任何详细信息!
谢谢!
根据评论。
卡在的问题:
Install the CodeDeploy agent by following the steps in Install the CodeDeploy agent and using the Name=CodeDeployDemo instance tags.
跳过这一步就解决了。不需要,因为 OP 使用 UserData
设置 CodeDeploy 代理。
当 Auto Scaling Group 创建新实例时,CodeDeploy 中的代码不会下载并安装到新创建的 EC2 实例上。
我已按照此处的文档进行操作: https://docs.amazonaws.cn/en_us/codedeploy/latest/userguide/tutorials-auto-scaling-group-create-auto-scaling-group.html
最后的步骤是
Install the CodeDeploy agent by following the steps in Install the CodeDeploy agent and using the Name=CodeDeployDemo instance tags.
我的“用户”脚本 运行 在来自 ASG(Auto Scaling 组)的新实例上正确安装并且 运行 CodeDeploy 代理(连接到机器的 SSh 和 运行ning service codedeploy-agent status
显示其 运行ning),但从那里,我不知道如何告诉 CodeDeploy 将代码部署到该实例。 (或者那个实例的 运行 CodePipeline?)
你能帮我指出正确的方向吗?如果您需要,我很乐意提供此处缺少的任何详细信息!
谢谢!
根据评论。
卡在的问题:
Install the CodeDeploy agent by following the steps in Install the CodeDeploy agent and using the Name=CodeDeployDemo instance tags.
跳过这一步就解决了。不需要,因为 OP 使用 UserData
设置 CodeDeploy 代理。