跳到正文
原文
Google AI:DEV 作者专属(RSS)· Richard Atodo·· 7 小时前AI 评分18

IncidentCopilot 如何搭建本地优先的 AI DevOps 开发基础

Building IncidentCopilot: Establishing a Local-First AI DevOps Development Foundation

AI 导读

IncidentCopilot 完成 Milestone 1,搭建起本地优先的 AI DevOps 事故调查开发基础,采用 Docker Compose 运行 FastAPI、PostgreSQL、Qdrant、Ollama 与 React,不依赖 AWS/Azure/GCP、付费 API 或专有 SaaS。

正文

Cover image for Building IncidentCopilot: Establishing a Local-First AI DevOps Development Foundation

Richard Atodo

Project: IncidentCopilot — AI DevOps Incident Investigation

Milestone: 1 — Repository & Local Development Foundation

Status: ✅ Completed

IncidentCopilot Homepage


🎯 Why Start With the Foundation?

When building an AI-powered DevOps system, it’s tempting to jump straight into the LLM.

For IncidentCopilot, I deliberately chose not to.

Evidence first. AI second. Human in the loop.

The AI should reason over verified evidence, not replace deterministic systems like parsing, normalization, persistence, or correlation.

So Milestone 1 focused on:

  • Repository structure
  • Local dev environment
  • Backend & frontend foundations
  • Config management
  • Testing setup
  • Docker & Compose
  • Documentation & reproducibility

🖥️ Local-First Decision

IncidentCopilot is intentionally local-first. No reliance on:

  • AWS / Azure / GCP
  • Paid APIs
  • Proprietary SaaS infrastructure

Instead, the stack runs via Docker Compose:

  • FastAPI
  • PostgreSQL
  • Qdrant
  • Ollama
  • React

📂 Repository Structure

incidentcopilot/
├── backend/
├── frontend/
├── runbooks/
├── test-data/
├── evaluation/
├── docker-compose.yml
├── .env.example
├── README.md
└── Makefile

Backend packages were defined but left intentionally empty — establishing architectural direction without premature implementation.


⚙️ Backend Foundation

Fastapi UI

  • FastAPI app with two endpoints:
GET /health → {"status": "ok"}
GET /ready → {"status": "ready"}
  • Config management via pydantic-settings
  • Testing with Pytest + FastAPI’s TestClient
  • Dockerized backend (minimal container, no DB/AI yet)

🎨 Frontend Foundation

  • React + TypeScript + Vite + Tailwind CSS + Lucide icons
  • Minimal shell:

IncidentCopilot — AI DevOps Incident Investigation

  • Cleaned unused Vite starter files
  • Dockerized frontend with Node-based build image

🛠️ Real Problems & Fixes

  • Node.js mismatch: upgraded from v20 → v24 for Vite
  • Docker Desktop: CLI installed but engine not running — fixed by starting Docker Desktop
  • Windows make: used mingw32-make instead of GNU make
  • Git hygiene: fixed invalid UTF-8 README + refined .gitignore

✅ Verification

  • Git hygiene → clean
  • Backend tests → 1 passed
  • Frontend lint → 0 errors
  • Frontend build → ✓ built
  • Docker Compose config → valid
  • Backend & frontend containers → running locally

🧩 What We Didn’t Build (Yet)

Milestone 1 deliberately excluded:

  • PostgreSQL models
  • Log ingestion APIs
  • Parsers (Nginx, Kubernetes, Docker, GitHub Actions)
  • Normalization & correlation
  • Qdrant + RAG integration
  • Ollama integration
  • Structured AI diagnosis
  • Full incident dashboard

These belong to future milestones.


🏗️ Architecture Principle

Reliable evidence
       ↓
Deterministic analysis
       ↓
AI reasoning

The LLM will sit after the deterministic evidence pipeline.


📌 Key Takeaways

  1. Foundation work = real development
  2. Verification > assumptions
  3. Starter templates should be questioned
  4. Local-first changes dev strategy
  5. AI shouldn’t be the first thing we build

🔮 What’s Next?

Milestone 2 — FastAPI Foundation + PostgreSQL

Moving toward:

FastAPI
   ↓
Services
   ↓
PostgreSQL

🏁 Final Thoughts

IncidentCopilot is still at the beginning. No AI diagnosis yet. No RAG. No ingestion pipeline.

And that’s okay.

Milestone 1 established the engineering environment needed to build those capabilities correctly.

The project now has:

  • Structured monorepo
  • FastAPI + React/TypeScript
  • Tailwind CSS
  • Config management
  • Testing
  • Docker + Compose
  • Verified local workflow

Most importantly:

Build the evidence pipeline first. Let AI reason over verified evidence later.


来源:Google AI:DEV 作者专属(RSS) · dev.to