Module 07: DevOps, Cloud, And Operations
Learn how code becomes running software and how to keep it alive.
The Mental Model
Section titled “The Mental Model”Deployment is not copying code. Deployment is producing a runnable artifact, configuring it, exposing it safely, observing it, and being able to roll back.
source -> build -> artifact -> config -> deploy -> health -> traffic -> observeAnalogy
Section titled “Analogy”Shipping software is like opening a shop. Writing code is designing the shop. Operations is making sure electricity works, doors open, staff show up, payment works, customers can find it, and there is a plan when something breaks.
Runtime Pieces
Section titled “Runtime Pieces”| Piece | Question |
|---|---|
| Process/container | What actually runs? |
| Port | Where does it listen? |
| Config | What changes by environment? |
| Secret | What must not be in Git? |
| Database | What durable system does it need? |
| Health check | How does the platform know it is alive? |
| Logs | How do humans inspect behavior? |
| Metrics | How do humans see trends? |
| Rollback | How do we return to safe state? |
Visual: Deployment Path
Section titled “Visual: Deployment Path”release to runtime
CodeReviewed source change.
CI checksTests, lint, build.
ArtifactVersioned image or bundle.
ConfigEnvironment, secrets, flags.
DeployRoll out safely.
HealthRuntime readiness.
TrafficReal user path.
ObserveLogs, metrics, alerts.
Operational Failure Cases
Section titled “Operational Failure Cases”- Missing environment variable.
- Secret not mounted.
- Database migration not applied.
- Health check points to the wrong path.
- Container listens on wrong port.
- Image tag points to old code.
- Logs are not collected.
- Rollback breaks because schema changed.
Agentic Angle
Section titled “Agentic Angle”Ask an agent:
Review this deployment/runbook. Find missing config, secret handling, healthchecks, rollback risk, and verification gaps. Do not assume successful deploymeans successful operation.Questions
Section titled “Questions”- What is the deployable artifact?
- What is different between local, staging, and production?
- What should
/healthcheck? - What is the difference between logs and metrics?
- What is a safe rollback?
- Why can a deploy succeed while the product is broken?
- Create
portfolio/07-devops-cloud-operations/runbook.md. - Add a health endpoint.
- Add environment-based config.
- Run the app from a clean terminal or container.
- Capture startup logs.
- Hit the health endpoint.
- Break one config value.
- Observe the failure.
- Roll back.
- Document the process.
Done When
Section titled “Done When”- Someone else can start and stop the app.
- Health and logs prove runtime behavior.
- A known failure is documented.
- Rollback is tested.