Skip to content

Lab 06: Deploy, Operate, Rollback

Run software outside the editor and operate it like a real service.

  1. Add environment-based configuration.
  2. Add a /health endpoint.
  3. Containerize the app or write a local deployment script.
  4. Start the app from a clean terminal.
  5. Hit /health.
  6. Create a ticket through the deployed app.
  7. Capture logs.
  8. Break configuration intentionally.
  9. Observe the failure.
  10. Roll back to the working state.

For the starter project, use:

Terminal window
PORT=8090 SUPPORT_DESK_DB=/tmp/support-desk.sqlite3 python3 app.py
curl -i http://localhost:8090/health
  • What artifact is deployed?
  • What configuration is required?
  • What secrets would be needed in production?
  • What health check proves the app can receive traffic?
  • What log line proves a ticket was created?
  • What is the rollback path?

Create operate-runbook.md:

# Runbook
## Start
## Stop
## Config
## Health Check
## Logs
## Common Failures
## Rollback

Someone else can follow your runbook and operate the app.