docs(brain): update homelab architecture plans, cutover status, and Unlicense

This commit is contained in:
kiskaadee committed 2026-09-03 23:44:36 -05:00
1 parent f9cd23a8d7
commit 6074ac6efd
5 files changed
+106 -47

No files matched your search

+24
View File
@@ -0,0 +1,24 @@
This is free and unencumbered software released into the public domain.
Anyone is free to copy, modify, publish, use, compile, sell, or
distribute this software, either in source code form or as a compiled
binary, for any purpose, commercial or non-commercial, and by any
means.
In jurisdictions that recognize copyright laws, the author or authors
of this software dedicate any and all copyright interest in the
software to the public domain. We make this dedication for the benefit
of the public at large and to the detriment of our heirs and
successors. We intend this dedication to be an overt act of
relinquishment in perpetuity of all present and future rights to this
software under copyright law.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR
OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
OTHER DEALINGS IN THE SOFTWARE.
For more information, please refer to <https://unlicense.org>
+1 -1
View File
@@ -17,6 +17,6 @@ Central repository for personal knowledge management, architecture plans, roadma
## 🎯 Active Strategic Goals
1. **Host Roles Separation**: Transition the desktop workstation into a dedicated 24/7 headless NixOS production server, making the laptop the primary graphical workstation.
2. **Domain Migration**: Move from Dynu's free subdomain (`arch-services.mywire.org`) to owned domain (`roadtotech.me`).
2. **Domain Migration**: Completed cutover to custom domain (`roadtotech.me`) with wildcard Let's Encrypt TLS.
3. **Repository Decoupling**: Extract monolithic deployments into standalone Git repositories with CI/CD and manage lifecycles using `appctl`.
4. **Clean Production State**: Remove non-production and development artifacts from the server machine.
+7 -7
View File
@@ -121,13 +121,13 @@ appctl up homelab-ollama
#### Verification Matrix:
| Endpoint | Expected Result | Verified |
| :--- | :--- | :---: |
| `https://roadtotech.me` | Custom Landing Page | [ ] |
| `https://dashboard.roadtotech.me` | getHomepage + Learning Hub | [ ] |
| `https://auth.roadtotech.me` | Authelia SSO portal & 2FA | [ ] |
| `https://jellyfin.roadtotech.me` | Jellyfin Media library & streaming | [ ] |
| `https://excalidraw.roadtotech.me` | Excalidraw whiteboarding app | [ ] |
| `https://docs.roadtotech.me` | Doc2site documentation viewer | [ ] |
| `https://traefik.roadtotech.me` | Traefik routers & middleware overview | [ ] |
| `https://roadtotech.me` | Custom Landing Page | [x] |
| `https://dashboard.roadtotech.me` | getHomepage + Learning Hub | [x] |
| `https://auth.roadtotech.me` | Authelia SSO portal & 2FA | [x] |
| `https://jellyfin.roadtotech.me` | Jellyfin Media library & streaming | [x] |
| `https://excalidraw.roadtotech.me` | Excalidraw whiteboarding app | [x] |
| `https://docs.roadtotech.me` | Doc2site documentation viewer (Brain) | [x] |
| `https://traefik.roadtotech.me` | Traefik routers & middleware overview | [x] |
---
+11 -13
View File
@@ -23,16 +23,14 @@ Migrate all homelab public endpoints, Authelia single sign-on (SSO), Traefik rev
## 📋 Implementation Checklist
- [x] **Step 1: DNS Setup & Propagation Verification**
- Add domain to chosen DNS manager.
- Create wildcard record: `*.roadtotech.me` ➔ Target WAN IP.
- Verify DNS resolution via `dig roadtotech.me +short` and `dig test.roadtotech.me +short`.
- [ ] **Step 2: Update Declarative NixOS Configuration**
- `hosts/desktop/homeserver.nix`: Change `DOMAIN` to `"roadtotech.me"`.
- `hosts/desktop/traefik-deployments.nix`: Update `DOMAIN_SUFFIX` and subdomain variables (`DOCS_DOMAIN`, `GITEA_DOMAIN`, etc.).
- `hosts/desktop/secrets.yaml`: Update DDNS domain variable if stored in SOPS.
- [ ] **Step 3: Traefik & SSL Validation**
- Trigger Traefik reload/restart.
- Inspect Traefik logs to confirm Let's Encrypt DNS-01 challenge completion for `roadtotech.me` and `*.roadtotech.me`.
- [ ] **Step 4: Authelia & Cookie Verification**
- Authenticate against `https://auth.roadtotech.me`.
- Verify SSO forward-auth across subdomains (`gitea.roadtotech.me`, `jellyfin.roadtotech.me`, etc.).
- Hostinger nameservers delegated to Dynu (`ns1.dynu.com` - `ns6.dynu.com`).
- Wildcard dynamic DNS configured for `*.roadtotech.me` and apex `roadtotech.me`.
- [x] **Step 2: Declarative NixOS Configuration Updated**
- `hosts/desktop/homeserver.nix`: Configured `DOMAIN = "roadtotech.me"`.
- `hosts/desktop/traefik-deployments.nix`: Configured `DOMAIN_SUFFIX = "roadtotech.me"` and `DOCS_PROJECT_PATH = "/home/kiskaadee/Brain"`.
- Secrets rendered to `/run/secrets/rendered/homeserver.env` and `/run/secrets/rendered/traefik-deployments.env`.
- [x] **Step 3: Traefik & Wildcard SSL Validation**
- Let's Encrypt DNS-01 wildcard challenge successfully issued certificate for `roadtotech.me` and `*.roadtotech.me`.
- Validated SNI TLS handshake across all subdomains.
- [x] **Step 4: Authelia & Cookie Verification**
- ForwardAuth configured and tested for `auth.roadtotech.me`.
+63 -26
View File
@@ -1,37 +1,74 @@
# 📦 Homelab Architecture: Appctl & Independent Repositories
# 📦 Homelab Architecture: Appctl & Decentralized Repositories
## 🎯 Vision & Goals
1. **Decouple Deployments**: Break monolithic multi-service compose stacks into isolated, independently version-controlled Git repositories.
2. **First-Class Orchestrator (`appctl`)**: Standardize service lifecycle management (start, stop, logs, update, backup, healthcheck) via `appctl`.
## 🎯 Architecture Model & Goals
1. **Decoupled Application Repositories (`~/Sites`)**: Each application lives in an isolated, independently version-controlled Git repository containing its own Docker Compose stack and self-describing `app.yaml` manifest.
2. **Hardened Control Plane (`~/Core`)**: Core reverse proxy (Traefik v3.6), authentication gateway (Authelia), container isolation (`socket-proxy`), management GUI (Portainer), and real-time logs (Dozzle).
3. **Decentralized Metadata & Orchestration (`appctl`)**: Unified CLI tool powered by Python/Bash that dynamically parses `app.yaml` manifests, manages aliases, injects environment configurations, inspects core infrastructure, and auto-compiles the Homepage dashboard (`services.yaml`).
---
## 🏛️ Architecture Model
## 🏛️ Directory Layout
```text
/home/kiskaadee/Production/ (or /srv/deployments/)
├── core-ingress/ # Traefik, Authelia, Socket-Proxy (Git repo)
├── gitea/ # Gitea & Gitea Actions runner (Git repo)
├── jellyfin/ # Media server stack (Git repo)
├── magnetflix/ # MagNetFlix app & microservices (Git repo)
├── nekoweb/ # Haruneko / Nekoweb deployments (Git repo)
└── docs/ # Astro / Starlight documentation (Git repo)
/home/kiskaadee/
├── Core/ # Control Plane (Traefik, Authelia, Socket-Proxy, Portainer, Dozzle)
│ ├── docker-compose.yml
│ ├── config/
│ └── scripts/
│ ├── appctl # Bash entrypoint wrapper
│ └── appctl_engine.py # Python metadata & orchestration engine
└── Sites/ # Data Plane (User Applications & Stacks)
├── homelab-dashboard/ # Homepage portal & Learning API (app.yaml)
├── homelab-doc2site/ # Reactive Obsidian/Markdown viewer (app.yaml)
├── homelab-excalidraw/ # Collaborative whiteboard (app.yaml)
├── homelab-gitea/ # Git service & code repository (app.yaml)
├── homelab-jellyfin/ # Media streaming platform (app.yaml)
├── homelab-landing/ # Apex domain portfolio portal (app.yaml)
├── homelab-mermaid/ # Mermaid live diagramming editor (app.yaml)
├── homelab-minecraft/ # PaperMC server & BlueMap (app.yaml)
├── homelab-mongodb/ # Mongo database & Express GUI (app.yaml)
├── homelab-ollama/ # Local LLM inference engine (app.yaml)
└── homelab-pgsql/ # PostgreSQL database & Adminer (app.yaml)
```
Each service directory contains:
- `compose.yaml` (clean, self-contained Docker Compose file)
- `.env` / environment variable template linked to `/run/secrets/`
- Custom Dockerfiles or build scripts if applicable
---
## ⚙️ `appctl` Responsibilities
## 📋 Self-Describing Manifest Standard (`app.yaml`)
`appctl` acts as the unified CLI wrapper across all production services:
- `appctl list`: Discover registered production services and their operational statuses.
- `appctl up <app>`: Start container stack using standard networks (`proxy-net`, `socket-net`).
- `appctl down <app>`: Gracefully stop container stack.
- `appctl restart <app>`: Restart service.
- `appctl pull <app>`: Pull latest container images and trigger zero-downtime recreation.
- `appctl logs <app> [-f]`: Stream container logs.
- `appctl status <app>`: Inspect health status and resource consumption.
Every repository under `~/Sites` defines its identity and parameters via `app.yaml`:
```yaml
name: "docs" # Canonical service name
aliases: ["doc2site", "notes"] # CLI shortcut aliases
domain: "docs.roadtotech.me" # Primary routed domain
description: "Reactive Obsidian Docs Viewer"
visible: true # Whether visible in dashboard (Homepage)
auth: false # Authelia ForwardAuth protection
networks:
- proxy-net
env:
PROJECT_PATH: "/home/kiskaadee/Brain"
homepage:
title: "Docs-Viewer"
group: "Knowledge & Notes"
icon: "files.png"
container: "docs"
weight: 10
```
---
## ⚙️ `appctl` CLI Commands
* `appctl list`: Formatted table showing `SERVICE`, `STATUS`, `DOMAIN`, and `DIRECTORY`.
* `appctl list --core` (or `-a` / `--all`): Includes the Core infrastructure stack from `~/Core`.
* `appctl info <service>`: Detailed inspection of runtime status, security, domains, environment defaults, and dashboard cards.
* `appctl up <service>`: Start an application stack using short names, aliases, or directory names.
* `appctl down <service>`: Gracefully stop and tear down an application stack.
* `appctl restart <service>`: Restart an application stack.
* `appctl pull <service>`: Pull latest container images and recreate the stack.
* `appctl logs <service>`: Stream live container logs.
* `appctl config <service>`: Validate and inspect resolved Compose configurations.
* `appctl sync`: Compile `Sites/*/app.yaml` manifests where `visible: true` directly into `homelab-dashboard/config/services.yaml`.