43 lines
2.4 KiB
Markdown
43 lines
2.4 KiB
Markdown
---
|
||
title: "CTP Topic 32 Using Atlantis CICD for Infrastructure Deployments"
|
||
type: source
|
||
tags: []
|
||
date: 2026-04-14
|
||
---
|
||
|
||
## Source File
|
||
- [[raw/Cloud & DevOps/Public-Cloud-Learning-Sessions/06_CI_CD_GitOps/ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments.md]]
|
||
|
||
## Summary
|
||
- 核心主题:使用 Atlantis 替代 Jenkins 进行基础设施自动化部署
|
||
- 问题域:当前 Jenkins 流水线存在初始化时间长、多代码克隆、顺序测试、ECS 部署器配置慢等问题,且复杂度高、脆弱性强
|
||
- 方法/机制:Atlantis 是开源、自托管的 Terraform 自动化工具,通过 GitHub Pull Request 评论触发 plan/apply,支持并行构建、目录锁定、依赖触发
|
||
- 结论/价值:Atlantis 提供更好的协作模型、简化网络架构(减少 VPC 终端节点需求)、合并前应用确保代码与基础设施同步
|
||
|
||
## Key Claims
|
||
- Atlantis 部署在每个 Landing Zone 共享账户的单个 EC2 实例上
|
||
- Atlantis 通过 GitHub Enterprise Webhook 通知,使用服务账号与 GitHub 交互、发布评论、执行合并和关闭 PR
|
||
- Atlantis 锁定机制在 plan 运行期间锁定模块目录,直至 PR 合并、关闭或 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." — 当前流水线问题
|
||
|
||
> "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 锁定机制
|
||
|
||
## Key Concepts
|
||
- [[Atlantis]]:开源、自托管的 Terraform CI/CD 自动化工具,通过 GitHub PR 评论触发工作流
|
||
- [[Infrastructure-as-Code-IaC]]:通过代码管理基础设施,Atlantis 自动化 Terraform 执行
|
||
- [[CI-CD-流水线]]:持续集成/持续部署管道,Atlantis 替代 Jenkins 作为新方案
|
||
|
||
## Key Entities
|
||
- [[Jenkins]]:现有 CI/CD 工具,被 Atlantis 替代的目标
|
||
- [[Terraform]]:基础设施即代码工具,Atlantis 的主要自动化对象
|
||
- [[GitHub Enterprise]]:代码托管平台,Atlantis 通过 Webhook 集成
|
||
|
||
## Connections
|
||
- [[Jenkins]] ← replaced_by ← [[Atlantis]]
|
||
- [[Terraform]] ← managed_by ← [[Atlantis]]
|
||
- [[GitHub Enterprise]] ← notifies ← [[Atlantis]]
|
||
|
||
## Contradictions |