4.1 KiB
4.1 KiB
title, type, tags, date
| title | type | tags | date | |||||
|---|---|---|---|---|---|---|---|---|
| CTP Topic 58 AWS EC2 Image Builder | source |
|
2026-04-14 |
Source File
Summary(用中文描述)
- 核心主题:AWS EC2 Image Builder 替代 Packer/Jenkins 实现企业级 AMI 生命周期自动化管理
- 问题域:当前 AMI 发布流程依赖 GitLab 加固脚本 + Jenkins + Packer,存在修改周期长、跨 Landing Zone 兼容性差、手动 Bakery 自动化不足等问题
- 方法/机制:Image Builder 通过 Pipeline(流水线)/Recipe(配方)/Component(组件)/Infrastructure Config 四层抽象,将 CCOE 加固脚本模块化为可复用组件,产品团队通过服务模块向 Golden AMI 添加组件
- 结论/价值:提升生产力(自动化)、构建时内建测试、合规加固标准、跨账户跨区域分发;与 AWS Organizations/RAM 集成;支持 AWS Inspector Lambda 工作流做 AMI 安全扫描
Key Claims(用中文描述)
- Image Builder 通过 Pipeline/Recipe/Component/Infrastructure Config 四层组件实现 AMI 构建全生命周期自动化
- 当前 AMI 发布流程(GitLab + Jenkins + Packer)存在修改周期长、跨 LZ 兼容性差、手动 Bakery 自动化不足等缺陷
- POC 已实现 CentOS 7 和 Ubuntu 18 端到端流水线,CCOE 加固脚本转换为独立组件
- Lambda 工作流触发 AWS Inspector 扫描、邮件通知、S3 报告归档,维护历史 AMI 数据
- Qualys 扫描集成正在评估中
Key Quotes
"A component is basically just a particular step that you want to execute in order to achieve the output AMI." — Image Builder 组件定义 "Due to these limitations, eventually the product teams try to cater to their requirements by developing some kind of workflow or CI CD pipelines wherein they consume that CCOE AMI and they try to update or install whatever packages they require." — 当前流程的局限性驱动产品团队自建 CI/CD "Product groups can use a service module to add components to the golden AMI. A component is a script, and components should be added in alphabetical order." — 产品团队通过服务模块添加组件的机制
Key Concepts
- Golden-AMI:由 CCOE 维护的标准化基础镜像,产品团队在其上添加自定义组件
- CCOE(Cloud Center of Excellence):云卓越中心,负责维护 Golden AMI 和加固脚本
- Image-Pipeline:定义 AMI 发布时间线、安装步骤、安全加固和分发策略
- Image-Recipe:YAML 格式定义源 AMI 到输出 AMI 的转换规则
- Image-Component:在源 AMI 内执行的具体步骤(安装包、运行脚本)
- Infrastructure-Configuration:定义构建 AMI 所需的 EC2 实例属性(类型/VPC/子网/安全组)
- Distribution-Settings:管理 AMI 跨区域跨账户的分发配置
- AWS-Inspector:AWS 原生 AMI 安全扫描工具
Key Entities
- AWS:Image Builder 服务的云提供商
Connections
- ctp-topic-26-standard-ami-build-publish-share-processes ← builds_on ← ctp-topic-58-aws-ec2-image-builder(Image Builder 是对 Packer/Jenkins AMI 流程的升级)
- ctp-topic-58-aws-ec2-image-builder ← depends_on ← learning-sessions-standard-amis-updates(CCOE 加固脚本和标准 AMI 生命周期管理是 Image Builder 的输入)
- ctp-topic-50-ami-roadmap-for-aws-amis ← related_to ← ctp-topic-58-aws-ec2-image-builder(AMI 路线图与 Image Builder 自动化策略相关)
Contradictions
- 与 ctp-topic-26-standard-ami-build-publish-share-processes:
- 冲突点:当前 AMI 流程(GitLab + Jenkins + Packer)vs Image Builder 自动化流程
- 当前观点:Packer/Jenkins 流程是现状,存在修改周期长、跨 LZ 兼容性差等问题
- 对方观点:Jenkins 多分支流水线 + 机器人框架验证已将验证周期从 3-4 天缩短至 60 分钟
- 说明:两者并非完全矛盾——Image Builder 替代 Packer 作为镜像构建工具,而 Jenkins 流水线可能继续用于 Terraform 部署触发