A lightweight Python application that mimics real-world deployment pipelines — generating synthetic deploy records, tracking running jobs, computing analytics, and exposing everything through a REST API and live browser dashboard.
Deploy Simulator models the lifecycle of CI/CD deployments — from a running job through completion — with per-service metrics, anomaly detection, and success-rate tracking. Everything runs in a single process with no external database.
One Uvicorn process hosts the FastAPI API, background generator thread, in-memory store, metrics engine, and static dashboard — all same-origin.
Deployment record — id, service, status, duration, timestamp, commit SHASelect a workflow below to see how data moves between the browser, API, store, metrics engine, and background generator.
Running-first model: Deployments enter the store with status
running and zero duration. After a simulated wait, the generator (or a
PATCH /deployments/{id} call) finalizes them with a terminal status and
a duration derived from timestamps.
Background generation: Starting the generator spins a daemon thread that enqueues a new running deployment every 10 seconds. Stopping sets a thread event; the id counter persists across start/stop cycles within the same server session.
Live UI: The dashboard polls running and completed deployments automatically, refreshes success rate on a slower interval, and loads P95 / anomaly data on button click — all against the same FastAPI process.
Metrics on completion: Every finalized deployment triggers
MetricOps.record_completed(), which updates per-service statistics,
checks for duration anomalies against recent history, and increments status counters
used by the success-rate endpoint.