Auto-sync: update nexus workspace
This commit is contained in:
@@ -1,79 +1,57 @@
|
||||
---
|
||||
title: "CTP Topic 32 Using Atlantis CICD for Infrastructure Deployments"
|
||||
type: source
|
||||
tags: [Atlantis, CI/CD, IaC, Terraform, GitOps, CTP]
|
||||
date: 2026-04-14
|
||||
tags:
|
||||
- Atlantis
|
||||
- CI/CD
|
||||
- IaC
|
||||
- Terraform
|
||||
- GitOps
|
||||
date: 2026-04-29
|
||||
---
|
||||
|
||||
## Source File
|
||||
- [[raw/Cloud & DevOps/Public-Cloud-Learning-Sessions/06_CI_CD_GitOps/ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments.md]]
|
||||
- [[Cloud & DevOps/Public-Cloud-Learning-Sessions/06_CI_CD_GitOps/ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments.md]]
|
||||
|
||||
## Summary(用中文描述)
|
||||
|
||||
### 核心主题
|
||||
Atlantis 作为 Terraform IaC 自动化工具,替代 Jenkins 用于 AWS Landing Zone 的基础设施部署流水线。
|
||||
|
||||
### 问题域
|
||||
当前 Jenkins 流水线面临两大核心痛点:
|
||||
- **速度慢**:初始化时间长、多次代码克隆、顺序测试、ECS Deployer 预配置导致整个流程极慢
|
||||
- **复杂度高**:持续叠加功能以覆盖更多场景和边缘用例,导致流水线脆弱且易漂移
|
||||
|
||||
### 方法/机制
|
||||
- **架构**:Atlantis 以单台 EC2 实例形式部署于每个 Landing Zone 的共享账户,通过 GitHub Enterprise Webhook 接收通知
|
||||
- **协作模型**:开发者直接在 GitHub Pull Request 上评论即可与 Atlantis 交互,无需单独账号和复杂集成
|
||||
- **跨账户访问**:通过在每个账户部署的 IAM 角色实现,支持简单和跨账户模块部署
|
||||
- **权限控制**:用户管理基于 GitHub 构建,构建日志以评论形式存储用于审计
|
||||
- **并行构建**:支持多模块 plan 和 apply 命令并发执行
|
||||
|
||||
### 结论/价值
|
||||
Atlantis 提供更好的协作模型、简化的网络架构(Jenkins 需要大量 VPC Endpoints)、代码与基础设施同步更新(merge 前即应用变更),是替换 Jenkins 的理想方案。
|
||||
- 核心主题:Atlantis 作为 Terraform IaC 自动化工具,用于替代 Jenkins 执行基础设施部署
|
||||
- 问题域:当前 CI/CD 流水线速度慢(初始化时间长、多次代码克隆、顺序测试、ECS Deployer 预配置)、复杂度高(持续修修补补导致脆弱和漂移)
|
||||
- 方法/机制:Atlantis 部署在每个 Landing Zone 的 Shared Account 中单一 EC2 实例上,通过 GitHub Enterprise Webhook 接收通知,用户在 PR 上评论 `atlantis plan/apply` 触发操作;内置 Locking 机制防止并发冲突,支持并行构建和跨账户角色访问
|
||||
- 结论/价值:Atlantis 通过合并前 Apply 的机制确保代码与基础设施同步,提供更优协作模型、简化网络架构、节省 VPC 端点成本
|
||||
|
||||
## Key Claims(用中文描述)
|
||||
|
||||
- Atlantis 团队通过在 PR 上评论即可完成 plan/apply,无需独立的 Jenkins 账号和集成
|
||||
- Atlantis 在代码 merge 前即执行变更,确保代码始终与基础设施同步
|
||||
- Atlantis 锁定机制防止多 PR 同时对同一模块执行 plan 产生冲突
|
||||
- Atlantis 通过 Webhook 接收 GitHub 通知,服务账号负责与 GitHub 交互(评论、合并、关闭 PR)
|
||||
- Atlantis 团队使用 Atlantis 替代 Jenkins 进行基础设施部署,解决了原流水线速度慢的问题
|
||||
- Atlantis 部署在每个 Landing Zone 的 Shared Account 中单一 EC2 实例上,通过 GitHub Enterprise Webhook 与代码库集成
|
||||
- Atlantis 支持模块级 Locking:Plan 运行时锁定模块目录,直到 PR 合并、关闭或 Plan 被丢弃才释放,防止并发冲突
|
||||
- Atlantis 通过声明模块和数据文件依赖关系实现依赖触发计划(依赖变更自动触发相关模块的 Plan)
|
||||
- Atlantis 支持并行构建,对多个模块同时运行 Plan 和 Apply 命令
|
||||
|
||||
## Key Quotes
|
||||
|
||||
> "The current pipeline is practically very slow due to significant initialization time, multiple code cloning, sequential testing, and ECS deployer provisioning." — 当前 Jenkins 流水线的性能痛点
|
||||
|
||||
> "Atlantis applies changes before merging, ensuring code in sync with infrastructure." — Atlantis 的核心价值主张
|
||||
|
||||
> "When a plan is run, the directory of each module is locked until the pull request that has this folder locked is merged or closed, or the plan is manually discarded." — Atlantis 锁定机制
|
||||
> "The current pipeline is practically very slow due to significant initialization time, multiple code cloning, sequential testing, and ECS deployer provisioning." — 原流水线速度瓶颈描述
|
||||
> "Atlantis applies changes before merging, ensuring code in sync with infrastructure." — Atlantis 核心价值:合并前 Apply,确保代码与基础设施同步
|
||||
> "When a plan is run, the directory of each module is locked until the pull request that has this folder locked is merged or closed, or the plan is manually discarded." — Atlantis Locking 机制说明
|
||||
|
||||
## Key Concepts
|
||||
|
||||
- [[Infrastructure-as-Code]]:通过 Terraform 代码声明式管理 AWS 基础设施,Atlantis 是其 CI/CD 执行层
|
||||
- [[GitOps]]:以 Git 为单一事实来源,通过 PR 协作和 Atlantis 自动化 apply 实现 GitOps 工作流
|
||||
- [[CI/CD Pipeline]]:持续集成/持续部署流水线,Atlantis 替代传统 Jenkins 流水线用于 IaC 场景
|
||||
- [[Terraform]]:HashiCorp 的基础设施即代码工具,Atlantis 的核心执行对象
|
||||
- [[Atlantis]]:开源、自托管的 Terraform 自动化工具,通过 GitHub PR 评论触发 Plan/Apply 操作,替代传统 CI/CD 流水线执行 IaC 部署
|
||||
- [[Terraform]]:基础设施即代码(IaC)工具,用于声明式定义和配置云基础设施
|
||||
- [[GitOps]]:基于 Git 仓库作为单一事实来源的基础设施和应用程序交付方法论,Atlantis 是 GitOps 落地的核心工具
|
||||
- [[Infrastructure as Code (IaC)]]:通过代码管理和配置基础设施的实践,Terraform 是主流 IaC 工具之一
|
||||
- [[CI/CD Pipeline]]:持续集成/持续交付流水线,Atlantis 在 IaC 场景下替代了传统 Jenkins 流水线
|
||||
|
||||
## Key Entities
|
||||
|
||||
- [[Terraform]]:Atlantis 管理的基础设施即代码工具,替代手动控制台操作
|
||||
- [[Jenkins]]:被 Atlantis 替代的现有 CI/CD 系统,存在初始化慢和架构复杂的问题
|
||||
- [[GitHub Enterprise]]:Atlantis 的事件来源,通过 Webhook 通知 Atlantis 执行 plan/apply
|
||||
- [[Atlantis]]:本视频核心产品 — 开源 Terraform CI/CD 自动化工具,替代 Jenkins 用于基础设施部署
|
||||
- [[Jenkins]]:Atlantis 所替代的传统 CI/CD 工具 — 存在初始化慢、复杂度高、脆弱等问题
|
||||
- [[GitHub Enterprise]]:Atlantis 的协作平台 — 通过 Webhook 与 Atlantis 通信,用户通过 PR 评论触发 Plan/Apply
|
||||
|
||||
## Connections
|
||||
|
||||
- [[ctp-topic-33-an-introduction-to-gitops]] ← extends ← [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]](Topic 33 介绍 GitOps 概念,Topic 32 展示 Atlantis 工具实现)
|
||||
- [[ctp-topic-9-ci-cd-with-gruntwork]] ← extends ← [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]](Topic 9 介绍 Gruntwork CI/CD,Topic 32 进一步细化为 Atlantis 替代方案)
|
||||
- [[ctp-topic-3-deploy-and-maintain-infrastructure]] ← depends_on ← [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]](Topic 3 部署和维护基础设施,Topic 32 提供具体 CI/CD 工具)
|
||||
- [[ctp-topic-16-cross-account-terraform-modules]] ← relates_to ← [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]](跨账户 Terraform 模块与 Atlantis 跨账户访问机制关联)
|
||||
- [[CTP Topic 33 An Introduction to GitOps]] ← is_implemented_by ← [[CTP Topic 32 Using Atlantis CICD for Infrastructure Deployments]]
|
||||
- [[CTP Topic 9 CI CD with Gruntwork]] ← shares_pattern ← [[CTP Topic 32 Using Atlantis CICD for Infrastructure Deployments]](均涉及 IaC 自动化)
|
||||
- [[CTP Topic 56 Automated Infrastructure Testing]] ← relates_to ← [[CTP Topic 32 Using Atlantis CICD for Infrastructure Deployments]](Terraform 测试为 Atlantis Plan 阶段的一部分)
|
||||
- [[CTP Topic 55 AWS Firewall Manager]] ← uses ← [[Atlantis]](Firewall Manager 策略通过 Atlantis CI/CD 流水线部署)
|
||||
- [[Jenkins]] ← replaced_by → [[Atlantis]](在 IaC 部署场景下的替代关系)
|
||||
|
||||
## Contradictions
|
||||
|
||||
- 与 [[ctp-topic-39-implementing-eks-in-the-aws-lab-landing-zone]]:
|
||||
- **冲突点**:EKS 部署是否支持 Atlantis
|
||||
- **当前观点(Topic 39)**:Atlantis 当前不支持 EKS 部署,需通过 Jenkins + Terragrunt 模块替代
|
||||
- **对方观点(Topic 32)**:Atlantis 可替代 Jenkins 用于所有 Terraform IaC 部署
|
||||
- **分析**:两者描述的语境不同——Topic 39 聚焦特定 EKS 场景下的实践经验,Topic 32 描述 Atlantis 整体优势。可能 Atlantis 在某些复杂场景(如 EKS 特定依赖)下存在限制,需进一步验证
|
||||
|
||||
## Source Metadata
|
||||
|
||||
- **Category**: DevOps & SRE / 06_CI_CD_GitOps
|
||||
- **Type**: Video(CTP Learning Session)
|
||||
- **Status**: Summarized(Gemini 摘要)
|
||||
- **Video Source**: NAS `/volume2/work/Public Cloud Learning Sessions/CTP _ Topic 32_ Using Atlantis CICD for infrastructure deployments.mp4`
|
||||
- 与 [[Jenkins]] 的传统 CI/CD 模式:
|
||||
- 冲突点:Atlantis 主张合并前 Apply,Jenkins 传统模式通常为合并后部署
|
||||
- 当前观点:Atlantis 认为合并前 Apply 能确保代码与基础设施始终同步,减少漂移风险
|
||||
- 对方观点:传统 Jenkins 流水线通过自动化测试后合并部署,更符合 DevOps 最佳实践
|
||||
|
||||
Reference in New Issue
Block a user