553caf8f1d
---ci--- project: acdl phase: 21 milestone: v1.6 status: execute ---/ci--- README.md rewrite: - Remove all .ciagent/ references (links + repository-layout row). - Remove .gitea/workflows/ row from repository layout. - Restate repository roles: consumer repo = app code + 1+ contracts + CI definitions (thin .github/workflows/*.yml uses:-ing the central workflow); platform repo owns modules/adapters/core/schemas/pipelines/ scripts/workflows. - Replace Status section with Features list (consumer + platform-engineer referenceable) + Roadmap (planned only, no version changelog, no internal CIAgent status). Includes the composition-redesign roadmap entry (dynamic module creation from a contract). - Fix the mermaid flowchart: all node text visible (short multi-line labels via <br/>), add a security-checks stage before policy checks, do not name specific tools (security checks/policy checks/infrastructure plan via adapter), add infrastructure-apply stage (dev only, after evidence event). - Remove the environments table (dev/qa/prod/dr) completely; point to docs/environments/ for platform-managed environments. - Credentials section: remove go-gitea/gitea#36988 blocked mention + waivers D-039/D-047 language. State OIDC+ABAC default; alternative is a static AWS key (GitHub Secrets for platform-runner runs, .env.secrets locally) with daily rotation (platform-managed) or out-of-band rotation (consumer-managed for local .env.secrets). - forge -> platform runners / platform-managed throughout. - Links point to docs/ Pages paths, not .ciagent/. modules/ terminology: - modules/README.md: L1 primitives -> primitives, L2 compositions -> modules, composition -> pattern (prose); add roadmap note for the composition redesign. - README-TEMPLATE.md: L1 primitive -> primitive. - All 7 L1 READMEs: L1 primitive -> primitive. - L2 static-asset + microservice READMEs: L2 composition -> module pattern, composition -> pattern, L1 -> primitive; bump stale @v1 -> @v1.4 in usage examples; fix CONSUMER_GUIDE.md -> consumer-guide.md link. Verification: grep sweeps for .ciagent/.gitea/forge/go-gitea/waiver/ D-039/D-047/acdl_platform in docs/ README.md modules/ contracts/ all return 0 hits. Tests: 166 pass. run_ci.sh green.
70 lines
2.4 KiB
Markdown
70 lines
2.4 KiB
Markdown
# microservice — ECS Fargate microservice
|
|
|
|
> **Module kind:** module pattern | **Version:** 1.0.0
|
|
|
|
A pattern that references multiple primitives to deploy an ECS
|
|
Fargate microservice end-to-end (VPC, cluster, ECR, IAM role, ALB,
|
|
ECS service).
|
|
|
|
## Resources
|
|
|
|
The pattern references these primitives:
|
|
|
|
| Primitive | Purpose | README |
|
|
|-----------|---------|--------|
|
|
| `vpc` | VPC, subnets, routing | [README](../l1/vpc/README.md) |
|
|
| `ecs-cluster` | ECS Fargate cluster | [README](../l1/ecs-cluster/README.md) |
|
|
| `ecr` | ECR image repository | [README](../l1/ecr/README.md) |
|
|
| `iam-role` | IAM task execution role | [README](../l1/iam-role/README.md) |
|
|
| `alb` | Application Load Balancer | [README](../l1/alb/README.md) |
|
|
| `ecs-service` | ECS task definition + service | [README](../l1/ecs-service/README.md) |
|
|
|
|
## Inputs
|
|
|
|
| Name | Type | Required | Description |
|
|
|------|------|----------|-------------|
|
|
| `image` | string | yes | ECR image URL for the task container |
|
|
| `port` | number | yes | Container port the service listens on |
|
|
| `region` | string | yes | AWS region |
|
|
| `cidr` | string | no | VPC CIDR block (default 10.0.0.0/16) |
|
|
| `azs` | string | no | Comma-separated availability zones |
|
|
|
|
## Outputs
|
|
|
|
| Name | Type | Description |
|
|
|------|------|-------------|
|
|
| `lb_arn` | arn | The load balancer ARN |
|
|
| `service_arn` | arn | The ECS service ARN |
|
|
|
|
## Usage
|
|
|
|
Define a contract referencing this module:
|
|
|
|
```yaml
|
|
uses: acdl/pipelines/deploy.yaml@v1.4
|
|
module: microservice
|
|
environment: dev
|
|
inputs:
|
|
image: 581513795199.dkr.ecr.us-east-1.amazonaws.com/acdl-microservice:latest
|
|
port: 8080
|
|
region: us-east-1
|
|
```
|
|
|
|
## Compliance extension points
|
|
|
|
The pattern can wire compliance resources across primitives when the
|
|
compliance milestone (GDPR, SOX, SOC2, HIPAA, DORA) lands:
|
|
|
|
- **KMS key** — shared encryption key referenced by S3, ECR, CloudWatch Logs, and Secrets Manager.
|
|
- **CloudTrail** — management-plane audit trail for the entire stack.
|
|
- **VPC Flow Logs** — network audit trail.
|
|
- **Security groups** — proper network segmentation between ALB, service, and data tiers.
|
|
- **Private subnets** — ECS tasks in private subnets with NAT egress.
|
|
|
|
See each primitive's README for per-module compliance extension points.
|
|
|
|
## Versioning
|
|
|
|
`1.0.0` — interface MAJOR, behavior MINOR, lifecycle PATCH. MAJOR bumps
|
|
require a new registry entry (immutable publication); old entries enter
|
|
a 12-month deprecation window. |