Owner
Dave Cockson
A clean, modular Python runner — codified infrastructure, hybrid graph + vector retrieval, single-person observability via Grafana Cloud. Nine phases, one solo operator, one filesystem-as-message-queue.
Enabled on davidcockson-tfstate.infra-contabo, infra-homelab, infra-shared, llm-runner, platform-docs) with baseline CI + main-branch protection.~/Documents/GitHub/rebuild-v2-repos/; git status clean.| Layer | Choice |
|---|---|
| Language | Python 3.12 |
| Package manager | uv → requirements.txt |
| Lint / format / types | ruff + mypy --strict |
| Web framework | FastAPI |
| Async | asyncio throughout |
| Config | Pydantic Settings v2 |
| LLM orchestration | LangGraph |
| Vector store | Qdrant |
| Graph store | Neo4j Community |
| Agent KG library | graphiti-core (Zep) |
| MCP | FastMCP (jlowin) |
| Embeddings | nomic-embed-text via Ollama |
| Layer | Choice |
|---|---|
| Tracing | OTel SDK → Alloy → Tempo |
| Logs | stdlib → Alloy → Loki |
| Metrics | Prometheus → Alloy → Mimir |
| Alerts | Grafana Cloud → Discord |
| Testing | pytest + pytest-asyncio + httpx |
| Containers | Docker Compose |
| Secrets | Infisical Cloud (EU) |
| IaC — Contabo | Terraform + Ansible |
| IaC — Homelab | Ansible only |
| Object storage | AWS S3 (us-east-1) |
| CI/CD | GitLab CI |
| Public ingress · VPN | Cloudflare Tunnel · Tailscale |
| Phase | Outcome | Status |
|---|---|---|
| Pre-flight | Reconciliation answers PF.1–PF.6 — Infisical, S3, GitLab/Gitea, runner cohabitation, Langfuse. | done |
| P0 | Infisical project + machine identities. AWS + 3 S3 buckets. GitLab repos with baseline CI. | in progress |
| P1 | Terraform state in S3. Contabo provisioned (firewall, Cloudflare DNS). Hosts bootstrapped via Ansible. | not started |
| P2 | Observability live — Alloy on both hosts shipping logs+metrics+traces; Discord alerts wired. | not started |
| P3 | Runner foundation — config, providers, Docker Compose boot. | not started |
| P4 | Worker — queue poller, executor, job types, Discord notifications. | not started |
| P5 | Web UI + chat at control.davidcockson.com. | not started |
| P6 | MCP server, tools, research mode. | not started |
| P7 | RAG (Qdrant) + KG (Neo4j + graphiti) hybrid retrieval. | not started |
| P8 | Scheduled agents, usage tracking. | not started |
| P9 | Cutover — vault migration, decommission old runner, snapshot to S3. | not started |
// gitlab.com/davidcockson/ ├── infra-contabo terraform + ansible ├── infra-homelab ansible only ├── infra-shared reusable roles ├── llm-runner ⤵ python runner └── platform-docs runbooks + dashboards // llm-runner/ ├── services/ │ ├── web/ FastAPI + HTMX UI │ ├── worker/ queue poller + executor │ ├── mcp/ FastMCP tool server │ └── rag/ LangGraph hybrid retrieval ├── shared/ │ ├── providers/ ollama·groq·gemini·anthropic │ ├── config/ Pydantic Settings v2 │ ├── observability/ │ └── models/ ├── agents/ briefing · research · memory ├── tests/ mirrors source tree ├── docker-compose.yml ├── pyproject.toml uv-managed └── requirements.txt generated, committed
| Model | Provider | When to use | Quirk to remember |
|---|---|---|---|
| qwen2.5:14b | Ollama (Contabo) | Default chat + jobs · always-on | localhost via host.docker.internal |
| gemma4:27b | Ollama (Davas) | Project mode · deep work | UI greys out when health-check unreachable; never silently fall back |
| llama-3.3-70b-versatile | Groq | Fast iteration | Log 429s clearly; 60s timeout |
| models/gemini-2.5-flash | Gemini | Long context, planning | Needs models/ prefix; streaming token count cosmetic 0 |
| qwen/qwen3-32b | Groq | Coding | Same Groq guards as above |
| claude-sonnet-4-6 | Anthropic | Paid · sparingly | max_tokens required; default 8192 |
| ID | Question | Resolution |
|---|---|---|
| PF.1 | Existing Infisical project name | Reuse homelab-rebuild (org davidcockson); only prod env in active use throughout the rebuild. |
| PF.2 | S3 bucket inventory | Three buckets confirmed in us-east-1: davidcockson-tfstate, -vault-snapshots, -artifacts (created 2026-05-08). IAM updated. |
| PF.3 | Backup restore drill | contabo-backup-v1.tar.gz (1.5 GB) extracted clean. Runbook at platform-docs/runbooks/restore-from-s3.md. |
| PF.4 | GitLab vs Gitea | GitLab.com for all rebuild repos. Gitea retained for Obsidian vault only. |
| PF.5 | Old runner cohabitation | New runner uses /root/obsidian-vault-v2 on Contabo until P9 cutover. No separate VM needed. |
| PF.6 | Langfuse decision | Langfuse stays for old runner only; torn down at P9 cutover (snapshot first). |