Files
nexus/wiki/concepts/ECS-Module.md

40 lines
1.6 KiB
Markdown
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
---
title: "ECS Module"
type: concept
tags:
- ECS
- Terraform
- IaC
- Modules
sources:
- learning-sessions-cloud-transformation-programme-20230808-183322-meeting-recordi
last_updated: 2023-08-08
---
## Definition
ECS Module 是 CTP/SRE 团队基于 Gruntwork 仓库构建的 Terraform 模块,用于在 AWS 上自动化部署和管理 ECSElastic Container Service容器化应用。
## Core Features
- **Docker 容器化**:将应用封装为 Docker 容器作为逻辑部署单元
- **多部署模式**:支持 EC2 实例部署
- **自动扩缩容Auto-Scaling**:根据负载动态调整容器实例数量
- **自动故障恢复Auto-Healing**:自动重启失败的容器任务
- **金丝雀部署Canary Deployment**:支持渐进式流量切换
- **集中管理**:通过 Listener 方式统一管理各产品团队的 ECS 部署
## Architecture
- 基于 Gruntwork terraform-aws-ecs 模块
- 使用 VPC、ELB 安全组、EFS 卷作为前置条件
- 支持 YAML/JSON 配置传递
- 集成 CloudWatch、Splunk、Grafana、Prometheus 监控
## Listener Approach集中管理
避免各产品团队直接下载 Gruntwork 模板并本地使用导致的碎片化问题,改为统一通过 Listener 机制集中管理和更新 ECS 配置。
## Connections
- [[Gruntwork]] ← based_on ← ECS Module技术基础来源
- [[ECS]] ← manages ← ECS ModuleAWS ECS 服务层面)
- [[Canary-Deployment]] ← included_in ← ECS Module
- [[Cloud-Transformation-Programme]] ← implements ← ECS ModuleCTP 核心产出)
- [[Terraform]] ← tool ← ECS Module模块实现工具