Phase Plans (5 files): - 04-RESEARCH.md: Domain research on Docker limits, healthchecks, EC2 parallels - 04-VALIDATION.md: Success criteria and validation strategy - 04-01-PLAN.md: Test infrastructure (RED phase) - 04-02-PLAN.md: Diátxis documentation - 04-03-PLAN.md: Infrastructure implementation (GREEN phase) Test Scripts (6 files, 1300+ lines): - 01-resource-limits-test.sh: Validate INF-03 compliance - 02-healthcheck-test.sh: Validate healthcheck configuration - 03-enforcement-test.sh: Verify resource limits with docker stats - 04-verify-infrastructure.sh: Infrastructure verification - 99-final-verification.sh: End-to-end student verification - run-all-tests.sh: Test orchestration with fail-fast - quick-test.sh: Fast validation (<30s) Documentation (11 files, 2500+ lines): Tutorials (3): - 01-set-resource-limits.md: EC2 instance types, Docker limits syntax - 02-implement-healthchecks.md: ELB health check parallels - 03-dependencies-with-health.md: depends_on with service_healthy How-to Guides (4): - check-resource-usage.md: docker stats monitoring - test-limits-enforcement.md: Stress testing CPU/memory - custom-healthcheck.md: HTTP, TCP, database healthchecks - instance-type-mapping.md: Docker limits → EC2 mapping Reference (3): - compose-resources-syntax.md: Complete deploy.resources reference - healthcheck-syntax.md: All healthcheck parameters - ec2-instance-mapping.md: Instance type mapping table Explanation (1): - compute-ec2-parallels.md: Container=EC2, Limits=Instance Type, Healthcheck=ELB Infrastructure: - docker-compose.yml: 5 services (web, app, worker, db, stress-test) All services: INF-03 compliant (cpus + memory limits) All services: healthcheck configured EC2 parallels: t2.nano, t2.micro, t2.small, t2.medium, m5.large - Dockerfile: Alpine 3.19 + stress tools + non-root user Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
12 KiB
phase, plan, type, wave, depends_on, files_modified, autonomous, requirements, user_setup, must_haves
| phase | plan | type | wave | depends_on | files_modified | autonomous | requirements | user_setup | must_haves | |||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 04-lab-03-compute-ec2 | 02 | execute | 1 |
|
|
true |
|
|
Purpose: Provide students with 4-quadrant documentation following Diátaxis framework: Tutorials (step-by-step learning), How-to Guides (task-focused procedures), Reference (technical specifications), and Explanation (conceptual mapping to EC2).
Output: 11 markdown documents (3 tutorials, 4 how-to guides, 3 reference, 1 explanation) totaling 1800+ lines.
<execution_context> @/home/luca/.claude/get-shit-done/workflows/execute-plan.md @/home/luca/.claude/get-shit-done/templates/summary.md </execution_context>
@.planning/REQUIREMENTS.md @.planning/phases/04-lab-03-compute-ec2/04-RESEARCH.md @.planning/phases/04-lab-03-compute-ec2/04-VALIDATION.md @.planning/phases/03-lab-02-network-vpc/03-02-PLAN.md @labs/lab-02-network/explanation/docker-network-vpc-parallels.mdDiátaxis Framework Overview
From PROJECT.md and Phase 2/3 patterns:
1. Tutorials - Learning-Oriented
- Purpose: Guida passo-passo per studenti nuovi
- Tone: Diretto, semplice, incrementale ("little often")
- Structure:
- Clear learning objectives
- Prerequisites listed
- Step-by-step instructions
- Verification commands after each step
- Troubleshooting tips
2. How-to Guides - Task-Oriented
- Purpose: Procedure specifiche e task-focused
- Tone: Pratico, diretto al punto
- Structure:
- Single specific task
- Prerequisites brief
- Step-by-step procedure
- Expected results
- Common issues
3. Reference - Information-Oriented
- Purpose: Specifiche tecniche nude e crude
- Tone: Formale, completo, conciso
- Structure:
- Complete parameter reference
- All options documented
- Examples for each option
- No tutorial content
4. Explanation - Understanding-Oriented
- Purpose: Parallelismi concettuali locale ↔ cloud
- Tone: Educativo, comparativo
- Structure:
- Concept introduction
- Side-by-side comparisons
- Key differences highlighted
- When to use what
Lab 03 Content Guidelines
EC2 Instance Type Parallels
Core Concept: Docker resource limits simulate EC2 instance types
| Docker | EC2 | Use Case |
|---|---|---|
| cpus: '0.5', memory: 512M | t2.nano | Dev/test |
| cpus: '1', memory: 1G | t2.micro | Small services |
| cpus: '1', memory: 2G | t2.small | Web servers |
| cpus: '2', memory: 4G | t2.medium | Application servers |
| cpus: '2', memory: 8G | m5.large | Production apps |
| cpus: '4', memory: 16G | m5.xlarge | High-traffic services |
Key Teaching Points:
- Resource limits = Cost control (pay for what you use)
- Different instance types for different workloads
- Burstable (t2/t3) vs. consistent performance (m5/c5)
- Right-sizing prevents over-provisioning
Healthcheck Parallels
Core Concept: Docker healthchecks simulate ELB health checks
| Docker | AWS |
|---|---|
| healthcheck.test | ELB health check path |
| healthcheck.interval | ELB interval (default 30s) |
| healthcheck.timeout | ELB timeout (default 5s) |
| healthcheck.retries | ELB unhealthy threshold |
| healthcheck.start_period | ELB grace period |
| docker ps --filter health=healthy | ELB target health |
Key Teaching Points:
- Healthchecks detect failing services
- Dependencies wait for healthy status
- Prevents cascading failures
- Enables zero-downtime deployments
Documentation Structure
Tutorial 1: Set Resource Limits
Learning Objectives:
- Understand EC2 instance types
- Learn Docker Compose resource syntax
- Set CPU and memory limits
- Verify with docker stats
Outline:
- What are EC2 Instance Types? (5 min)
- Docker Resource Limits Syntax (10 min)
- Practice: Set limits for t2.micro (15 min)
- Practice: Set limits for t2.small (15 min)
- Verification with docker stats (5 min)
Tutorial 2: Implement Healthchecks
Learning Objectives:
- Understand healthcheck purpose
- Learn healthcheck syntax
- Add healthcheck to web service
- Monitor health status
Outline:
- What are Healthchecks? (5 min)
- ELB Health Check Parallel (5 min)
- Healthcheck Parameters (10 min)
- Practice: Add HTTP healthcheck (15 min)
- Practice: Add database healthcheck (10 min)
- Monitor health status (5 min)
Tutorial 3: Dependencies with Health
Learning Objectives:
- Understand service dependencies
- Use depends_on with conditions
- Implement ordered startup
- Verify dependency chain
Outline:
- Service Dependencies (5 min)
- depends_on Conditions (10 min)
- Practice: Web depends on App (15 min)
- Practice: App depends on DB (15 min)
- Verify startup order (5 min)
Implementation Notes
- File Locations:
labs/lab-03-compute/
├── tutorial/
│ ├── 01-set-resource-limits.md
│ ├── 02-implement-healthchecks.md
│ └── 03-dependencies-with-health.md
├── how-to-guides/
│ ├── check-resource-usage.md
│ ├── test-limits-enforcement.md
│ ├── custom-healthcheck.md
│ └── instance-type-mapping.md
├── reference/
│ ├── compose-resources-syntax.md
│ ├── healthcheck-syntax.md
│ └── ec2-instance-mapping.md
├── explanation/
│ └── compute-ec2-parallels.md
└── README.md
-
Code Examples:
- Use realistic examples (nginx, postgres, redis)
- Show complete docker-compose.yml snippets
- Include verification commands
- Add expected output
-
Parallelism Emphasis:
- Always show AWS equivalent
- Explain "why" not just "how"
- Highlight key differences
- Link to AWS documentation
Success Criteria
Plan 04-02 is complete when:
- All 11 documents created
- Minimum line requirements met
- Tutorials follow "little often" principle
- How-to guides are task-focused
- Reference documents are complete specifications
- Explanation clearly maps Docker → EC2
- Cross-references between documents
- Italian language (consistent with other labs)