Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 7s
2.3 KiB
2.3 KiB
type, status, project, tags
| type | status | project | tags | ||||||
|---|---|---|---|---|---|---|---|---|---|
| plan | completed | homelab |
|
🚀 Deployment & CI/CD Strategy
🎯 Objective
Automate the build, test, containerization, and deployment lifecycle for services hosted in the homelab.
🔄 CI/CD Pipelines Overview
sequenceDiagram
autonumber
actor Dev as Developer (Laptop)
participant Git as Git Remote (Gitea / GitHub)
participant CI as CI Runner (Actions)
participant Registry as Container Registry (GHCR / Local Registry)
participant Server as 24/7 Homelab Server
Dev->>Git: git push (feat/fix branch -> main)
Git->>CI: Trigger Build & Test workflow
CI->>CI: Run Linters & Unit Tests
CI->>Registry: Build multi-stage Docker image & Push
CI->>Server: Trigger GitOps Deploy / Webhook / SSH appctl pull
Server->>Registry: Pull new image
Server->>Server: Restart container with zero/minimal downtime
🛠️ Realized Architecture: Dynamic Webhook GitOps & Gitea Runner
Rather than relying on continuous image polling via Watchtower, the homelab adopted a push-driven, event-based GitOps architecture:
- Self-Hosted CI Runner (
act_runner):- Runs as a container inside
homelab-giteausingcatthehacker/ubuntu:act-latest. - Executes linting, type-checking, and test validation in 15 seconds.
- Runs as a container inside
- Decentralized Host Dispatcher (
homelab-gitops.service):- Lightweight webhook daemon running on the server host at port 9000.
- Dispatches payloads dynamically to
~/Core/scripts/gitops_dispatcher.py. - Inspects
app.yamldeployment declarations (git_pull,compose_up,appctl_sync) and applies updates with zero delay.
- Knowledge Base Pilot:
- Successfully deployed on
~/Brainwith pre-commit gates, Gitea Actions CI, and instantdoc2sitereflection ondocs.roadtotech.me.
- Successfully deployed on