Auto-sync: update nexus workspace
This commit is contained in:
@@ -1,95 +1,36 @@
|
||||
---
|
||||
title: "Atlantis"
|
||||
type: entity
|
||||
tags:
|
||||
- devops
|
||||
- iac
|
||||
- terraform
|
||||
- gitops
|
||||
- cicd
|
||||
created: 2026-04-26
|
||||
---
|
||||
|
||||
# Atlantis
|
||||
|
||||
## Definition
|
||||
|
||||
Atlantis 是一个开源的**Terraform CI/CD 工具**,通过与 GitHub/GitLab 深度集成,将 Terraform 的 plan 和 apply 操作转移到 Pull Request(PR)评论层面,实现基础设施即代码的协作式自动化部署。
|
||||
|
||||
## Core Model: PR-Driven IaC
|
||||
|
||||
Atlantis 的核心理念:**每个 Pull Request 都是一次 Terraform 操作**。
|
||||
|
||||
```
|
||||
Developer Atlantis AWS Accounts
|
||||
│ │ │
|
||||
│ 1. Open PR │ │
|
||||
│───────────────────────>│ │
|
||||
│ │ 2. !atlantis plan │
|
||||
│ │───────────────────────>│
|
||||
│ │<───────────────────────│ 3. terraform plan
|
||||
│ 4. Post plan result │ │
|
||||
│<───────────────────────│ │
|
||||
│ 5. Review & Approve │ │
|
||||
│───────────────────────>│ │
|
||||
│ │ 6. !atlantis apply │
|
||||
│ │───────────────────────>│
|
||||
│ │<───────────────────────│ 7. terraform apply
|
||||
│ 8. Merge PR │ │
|
||||
│───────────────────────>│ │
|
||||
```
|
||||
|
||||
**来源**: [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]
|
||||
|
||||
## Key Features
|
||||
|
||||
| 特性 | 说明 |
|
||||
|------|------|
|
||||
| **PR 评论触发** | 无需独立 CI 账号,开发者在 PR 上评论即可 |
|
||||
| **并行 plan/apply** | 多模块并发执行,提升部署效率 |
|
||||
| **锁定机制** | 防止多 PR 同时操作同一模块产生冲突 |
|
||||
| **跨账户访问** | 通过 IAM 角色实现多 AWS 账户部署 |
|
||||
| **零额外基础设施** | 只需一台 EC2 共享账户实例 |
|
||||
|
||||
**来源**: [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]
|
||||
|
||||
## Comparison: Atlantis vs Jenkins
|
||||
|
||||
| 维度 | Atlantis | Jenkins |
|
||||
|------|----------|---------|
|
||||
| 触发方式 | PR 评论 | SCM 轮询/定时 |
|
||||
| 初始化速度 | 快速(按需) | 慢(Jenkins 预配置) |
|
||||
| 代码克隆 | 单次 | 多次 |
|
||||
| 测试执行 | 并行 | 顺序 |
|
||||
| 架构复杂度 | 简单 | 复杂(持续叠加功能) |
|
||||
| Terraform 专用 | ✅ 是 | ❌ 通用(需配置) |
|
||||
| PR 协作 | ✅ 原生 | ❌ 无 |
|
||||
|
||||
**来源**: [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]
|
||||
|
||||
## Micro Focus Usage
|
||||
|
||||
Micro Focus 在 Labs Landing Zone 中使用 Atlantis 替代 Jenkins 进行 Terraform IaC 部署:
|
||||
- 每个 Landing Zone 共享账户部署单台 EC2 实例
|
||||
- GitHub Enterprise Webhook 接收 PR 事件
|
||||
- 服务账号负责评论/合并/关闭 PR
|
||||
- Atlantis 在 merge 前即应用变更
|
||||
|
||||
**局限性**: Atlantis 当前不支持 EKS 部署,需通过 Jenkins + Terragrunt 模块替代。
|
||||
|
||||
**来源**: [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]], [[ctp-topic-39-implementing-eks-in-the-aws-lab-landing-zone]]
|
||||
|
||||
## Related Entities
|
||||
|
||||
- [[Terraform]] — Atlantis 操作的核心 IaC 工具
|
||||
- [[Gruntwork]] — Terragrunt 的开发者(Atlantis 生态伙伴)
|
||||
|
||||
## Related Concepts
|
||||
|
||||
- [[GitOps]] — Atlantis 是 GitOps 在 Terraform 领域的实现工具
|
||||
- [[CI/CD Pipeline]] — Atlantis 提供 CI/CD 能力
|
||||
|
||||
## Related Sources
|
||||
|
||||
- [[ctp-topic-32-using-atlantis-cicd-for-infrastructure-deployments]]
|
||||
- [[ctp-topic-39-implementing-eks-in-the-aws-lab-landing-zone]]
|
||||
---
|
||||
title: "Atlantis"
|
||||
type: entity
|
||||
entity_type: tool
|
||||
tags:
|
||||
- IaC
|
||||
- DevOps
|
||||
- Terraform
|
||||
- GitOps
|
||||
- CI/CD
|
||||
sources:
|
||||
- ctp-topic-48-terraform-vs-terragrunt.md
|
||||
last_updated: 2026-05-13
|
||||
---
|
||||
|
||||
## Overview
|
||||
Atlantis 是一个开源的 Pull Request 驱动的 Terraform 自动化工具,将 Terraform 与 GitHub/GitLab 等 Git 平台深度集成,实现基础设施即代码的协作式管理。
|
||||
|
||||
## Core Mechanism
|
||||
- **PR 触发**:当 Pull Request 打开或更新时,自动运行 `terraform plan`
|
||||
- **自动化 apply**:在 PR 合并后,自动执行 `terraform apply`
|
||||
- **工作流控制**:通过 `atlantis.yaml` 配置文件定义项目和工作流
|
||||
- **多云支持**:支持所有 Terraform Provider(AWS、GCP、Azure 等)
|
||||
|
||||
## GitOps Workflow
|
||||
1. 开发者提交 PR 修改 Terraform 代码
|
||||
2. Atlantis 自动检测 PR,运行 `terraform plan` 并将计划结果以评论形式发布到 PR
|
||||
3. 团队成员审查计划变更
|
||||
4. PR 合并后,Atlantis 执行 `terraform apply`
|
||||
5. Apply 结果同样发布到 PR 评论
|
||||
|
||||
## Connections
|
||||
- [[Atlantis]] ← extends ← [[Terraform]]
|
||||
- [[Atlantis]] ← implements ← [[GitOps]]
|
||||
- [[Atlantis]] ← integrates_with ← [[GitHub]]
|
||||
- [[Atlantis]] ← integrates_with ← [[GitLab]]
|
||||
|
||||
Reference in New Issue
Block a user