Auto-sync: 2026-04-18 17:09

This commit is contained in:
2026-04-18 17:09:43 +08:00
parent 60d2f8254b
commit 3f2e1765d8
276 changed files with 17241 additions and 20 deletions

42
wiki/concepts/Packer.md Normal file
View File

@@ -0,0 +1,42 @@
---
id: Packer
title: "Packer"
type: concept
tags:
- DevOps
- IaC
- AMI
- AWS
last_updated: 2026-04-18
---
## Aliases
- HashiCorp Packer
## Summary
- **定义**HashiCorp 开发的开源工具通过模板定义自动构建机器镜像AMI、VMDK、QCOW2 等)
- **用途**:实现基础设施的不可变部署
- **云迁移价值**:标准化镜像构建,确保环境一致性
## Key Details
- **核心功能**
- 多平台镜像构建AWS AMI、VMware、Vagrant、Docker 等)
- JSON/HCL 模板定义
- 预置和后置配置脚本
- 并行构建加速
- **工作流程**
1. 定义模板Builder 配置)
2. 运行 provisioner配置脚本
3. 输出镜像
- **与 Terraform 集成**
- Packer 构建 AMI
- Terraform 使用 AMI 部署基础设施
## Octane Hub 案例
- Octane Hub 使用 Packer 构建自定义 AMI
- 从手动控制台脚本演进到自动化镜像构建
## Connections
- [[Terraform]] ← uses_ami_from ← [[Packer]]
- [[Infrastructure-as-Code-IaC]] ← implementd_by ← [[Packer]]
- [[AMI]] ← built_by ← [[Packer]]