Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
57 changes: 57 additions & 0 deletions Justfile
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,16 @@ deploy-all: \
setup-prod \
k8s-monitoring-setup \
k8s-apply-monitors
@echo ""
@echo " Full stack deployed. Allow 30-60s for pods to stabilize."
@echo ""
@echo " Open in browser:"
@echo " Streamlit UI -> http://localhost:30000"
@echo " API Docs -> http://localhost:30100/docs"
@echo " API Health -> http://localhost:30100/health"
@echo " Grafana -> http://localhost:30200 (admin / prom-operator)"
@echo " Prometheus -> http://localhost:30300"
@echo ""

mlflow-ui:
uv run mlflow ui --backend-store-uri sqlite:///mlruns/mlflow.db
Expand All @@ -99,3 +109,50 @@ k8s-update:
just build-ui
just k8s-load
-kubectl rollout restart deployment rossmann-api rossmann-ui

# ── Local development servers (no Docker, no K8s) ──────────────────────────

serve-api:
@echo ""
@echo " Starting FastAPI inference server ..."
@echo " Once running, open: http://localhost:8000/docs"
@echo ""
uv run uvicorn rossmann_ops.api.main:app --host 0.0.0.0 --port 8000 --reload

serve-ui:
@echo ""
@echo " Starting Streamlit dashboard ..."
@echo " Once running, open: http://localhost:8501"
@echo ""
uv run streamlit run ui/app.py

demo:
@echo ""
@echo " Running observability demo (3 phases: normal / schema errors / poisoning attack)."
@echo " Requires inference API running on port 30100 (K8s or Docker Compose)."
@echo " Watch live Grafana metrics at: http://localhost:30200 (K8s only)"
@echo ""
uv run python scripts/observability_demo.py

# ── Docker Compose — published images, no K8s required ─────────────────────

docker-up: check-docker
docker compose pull
docker compose up -d
@echo ""
@echo " Services started from DockerHub images. Open:"
@echo " Streamlit UI -> http://localhost:30000"
@echo " API Docs -> http://localhost:30100/docs"
@echo " API Health -> http://localhost:30100/health"
@echo ""
@echo " Note: Grafana/Prometheus not available in Docker Compose mode."
@echo " Run 'just deploy-all' for the full K8s stack with observability."
@echo ""

docker-down:
docker compose down

# ── Tool installation ───────────────────────────────────────────────────────

install-k8s-tools:
uv run python scripts/install_k8s_tools.py
379 changes: 379 additions & 0 deletions README.md

Large diffs are not rendered by default.

39 changes: 39 additions & 0 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
# docker-compose.yml
#
# Runs the published DockerHub images without requiring a Kubernetes cluster.
# Requires only Docker Desktop — no kind, kubectl, or helm needed.
#
# Usage:
# just docker-up # Pull latest images and start services
# just docker-down # Stop and remove containers
#
# Services will be available at:
# Streamlit UI -> http://localhost:30000
# API Docs -> http://localhost:30100/docs
# API Health -> http://localhost:30100/health
#
# Note: Prometheus/Grafana monitoring is NOT included in this mode.
# Use 'just deploy-all' for the full K8s stack with observability.

services:
api:
image: miles25420/rossmann-api:latest
ports:
- "30100:8000"
healthcheck:
test: ["CMD-SHELL", "curl -f http://localhost:8000/health || exit 1"]
interval: 15s
timeout: 5s
retries: 5
start_period: 15s

ui:
image: miles25420/rossmann-ui:latest
ports:
- "30000:8501"
environment:
# Docker Compose default network allows services to resolve each other by name.
- API_URL=http://api:8000
depends_on:
api:
condition: service_healthy
Loading
Loading