CodeDeploy Blue/Green 部署 AUTO_SCALING_CONFIGURATION 失败

CodeDeploy Blue/Green Deployment AUTO_SCALING_CONFIGURATION Failure

正在尝试在 AWS 上进行自动 Blue/Green 部署。当我 运行 部署时,我得到:

The deployment failed because a non-empty field was discovered on your Auto Scaling group that Code Deploy does not currently support copying. Unsupported fields: 
[DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.Instances.member.LaunchTemplate.Version, 
DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.LaunchTemplate.LaunchTemplateName, 
DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.LaunchTemplate.LaunchTemplateId, 
DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.LaunchTemplate.Version, 
DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.Instances.member.LaunchTemplate.LaunchTemplateName, 
DescribeAutoScalingGroupsResponse.DescribeAutoScalingGroupsResult.AutoScalingGroups.member.Instances.member.LaunchTemplate.LaunchTemplateId] 
(Error code: AUTO_SCALING_CONFIGURATION)

从阅读 here 来看,这听起来像是因为 CodeDeploy 尚未更新为使用 Auto-Scaling 方面的最新内容。

Unfortunately, this is an issue that customers will likely continue facing. When doing a blue/green deployment where we copy your ASG, we have to copy all of that configuration, which requires CodeDeploy to know about any new attributes that ASG supports. As such, there is a lag.

这是对的还是我做错了什么? AWS 的人能证实这一点吗?

我会尝试 CloudFromation,而不是使用 CodeDeploy 目前不支持的 LaunchTemplates。 LaunchTemplates 是新的,用于在 AWS 控制台中捕获启动设置。

尝试使用 CFN 中的 AWS::AutoScaling::LaunchConfiguration 资源。

https://docs.aws.amazon.com/AWSCloudFormation/latest/UserGuide/aws-properties-as-launchconfig.html

更新: AWS DevOps 团队在他们的博客上为 Performing Blue/Green Deployments with AWS CodeDeploy and Auto Scaling Groups 发布了一个解决方案。

它使我们的流程更加清晰 a 在查看解决方案模板后,我们现在正在生产中进行 blue/green 部署 - 并且多年来一直在进行就地部署。对于很多用例来说,这是一种更好的部署方式。