简体   繁体   English

AWS Pipeline部署cloudformation

[英]AWS Pipeline deploy cloudformation

I am looking to deploy new services on my ECS cluster using CodePipeline and cloudformation. 我希望使用CodePipeline和cloudformation在ECS群集上部署新服务。

I was thinking I would make a template file in my project defining my service and task definition. 我当时想在项目中创建一个模板文件来定义我的服务和任务定义。 Then I defined a deploy stage in my pipeline create a change-set. 然后,我在管道中定义了一个部署阶段,以创建一个变更集。 The problem is that since my template only contains my task definition and service (rest of stack is defined in a more general template) the change set wants to basically remove all resources except the service/task-definition. 问题在于,由于我的模板仅包含我的任务定义和服务(堆栈的其余部分在更通用的模板中定义),因此更改集希望基本上删除除服务/任务定义之外的所有资源。

Is my approach wrong, should I use the AWS cli instead and use "aws ecs register-task-definition" in a custom build step? 我的方法是否错误,是否应该在自定义构建步骤中使用AWS cli并使用“ aws ecs register-task-definition”?

我意识到现在我必须在服务中部署另一个独立的堆栈,并将其余基础结构保留在单独的堆栈中:)

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM