【问题标题】:Orchestrate Cloud Formation using Code Pipeline使用代码管道编排 Cloud Formation
【发布时间】:2016-12-03 11:22:39
【问题描述】:

我正在使用 Code Pipeline:Jenkins 进行构建和 Code Deploy/Opsworks 进行部署。 我可以使用 Jenkins 使用 AWS CLI 编排 Cloud Formation 模板,并指定命令行步骤。 在不使用 Jenkins 或任何 CI 工具的情况下,还有其他选项可以编排云形成吗?构建完成后,能否触发 Cloud Formation in Code 管道?

请提出任何最佳做法。

【问题讨论】:

    标签: amazon-web-services amazon-cloudformation aws-codepipeline


    【解决方案1】:

    Nov 3 2016 起,AWS CloudFormation 堆栈更新现已完全集成到 AWS CodePipeline 中。请参阅 CloudFormation 用户指南中新增的部分,Continuous Delivery with AWS CodePipeline

    简而言之,您现在可以将带有 CloudFormation 提供程序的 Deploy 操作添加到您的 CodePipeline 管道,该管道将对指定的 CloudFormation 堆栈执行操作。使用AWS::CodePipeline::Pipeline 资源,管道阶段定义将如下所示:

    Resources:
      Pipeline:
        Type: AWS::CodePipeline::Pipeline
        Properties:
          # [other properties...]
          Stages:
          # [other stages...]
          - Name: Deploy
            Actions:
            - Name: Deploy
              ActionTypeId:
                Category: Deploy
                Owner: AWS
                Version: 1
                Provider: CloudFormation
              InputArtifacts:
              - Name: Template
              Configuration:
                ActionMode: REPLACE_ON_FAILURE
                RoleArn: !GetAtt [CFNRole, Arn]
                StackName: !Ref AWS::StackName
                TemplatePath: !Sub "Template::${StackFileName}"
                Capabilities: CAPABILITY_IAM
    

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 2019-01-18
      • 2021-12-30
      • 2020-06-09
      • 2020-12-08
      • 2018-03-05
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      相关资源
      最近更新 更多