docs(homelab): align migration and deployment plans with implementation milestones
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 5s
Brain Structural Validation / Validate Markdown Structure & Links (push) Successful in 5s
This commit is contained in:
1 parent
4e41c3ab1c
commit
d86b9d4622
4 files changed
+64
-57
No files matched your search
@@ -1,5 +1,5 @@
|
||||
---
|
||||
type: guide
|
||||
type: plan
|
||||
project: homelab
|
||||
tags:
|
||||
- gitea
|
||||
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
type: plan
|
||||
status: active
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- gitea
|
||||
@@ -38,30 +38,23 @@ sequenceDiagram
|
||||
|
||||
---
|
||||
|
||||
## 🛠️ Implementation Approaches
|
||||
## 🛠️ Realized Architecture: Dynamic Webhook GitOps & Gitea Runner
|
||||
|
||||
### 1. Webhooks & Watchtower / Diun (Pull Model - Recommended)
|
||||
- **Approach**: CI pushes tagged images to GHCR. Watchtower/Diun running on the server detects new digest and automatically updates containers.
|
||||
- **Pros**: Zero inbound SSH keys or open firewall ports needed from CI into homelab.
|
||||
- **Cons**: Less granular control over immediate rollbacks.
|
||||
Rather than relying on continuous image polling via Watchtower, the homelab adopted a **push-driven, event-based GitOps architecture**:
|
||||
|
||||
### 2. GitOps with Gitea Actions / GitHub Actions Runner
|
||||
- **Approach**: Run a self-hosted lightweight Gitea runner on the server. On release/push to `main`, the runner executes `appctl pull <service> && appctl restart <service>`.
|
||||
- **Pros**: Full visibility, reproducible deployments, direct log output in CI UI.
|
||||
1. **Self-Hosted CI Runner (`act_runner`)**:
|
||||
- Runs as a container inside `homelab-gitea` using `catthehacker/ubuntu:act-latest`.
|
||||
- Executes linting, type-checking, and test validation in 15 seconds.
|
||||
2. **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.yaml` deployment declarations (`git_pull`, `compose_up`, `appctl_sync`) and applies updates with zero delay.
|
||||
3. **Knowledge Base Pilot**:
|
||||
- Successfully deployed on `~/Brain` with pre-commit gates, Gitea Actions CI, and instant `doc2site` reflection on `docs.roadtotech.me`.
|
||||
|
||||
---
|
||||
|
||||
## 🎯 Candidate Pilot Services for CI/CD
|
||||
|
||||
The following micro-repos are selected as prioritized pilot targets for automated CI/CD pipelines:
|
||||
|
||||
1. **`homelab-landing`** (`~/Sites/homelab-landing`):
|
||||
- Pure static/nginx web portal (`roadtotech.me`).
|
||||
- Fast, low-risk playground to test multi-stage Docker build, GHCR push, and automated deployment.
|
||||
2. **`homelab-dashboard`** (`~/Sites/homelab-dashboard`):
|
||||
- Fast-evolving Learning Hub API backend & Homepage customization.
|
||||
- Ideal for testing pytest/linting pipelines before publishing.
|
||||
3. **`homelab-minecraft`** (`~/Sites/homelab-minecraft`):
|
||||
- Custom FastAPI Identity Manager Web Admin.
|
||||
- Ideal for testing Python security linters, JWT validation, and container packaging.
|
||||
|
||||
## 🔗 Production Guides & Specifications
|
||||
* [Dynamic Decentralized GitOps Dispatcher Architecture](../../guides/homelab-gitops-dispatcher-architecture.md)
|
||||
* [Brain GitOps & Auto-Sync Deployment Pipeline](../../guides/brain-gitops-deployment-pipeline.md)
|
||||
* [GitHub to Gitea Automated Batch Migration Plan](github-to-gitea-migration-plan.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
type: plan
|
||||
status: active
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
@@ -16,33 +16,41 @@ Establish clear, unambiguous directory boundaries across both the Server and Lap
|
||||
|
||||
---
|
||||
|
||||
## 🗺️ Standardized Directory Layout
|
||||
## 🗺️ Realized Production Layout
|
||||
|
||||
### 🖥️ Production Server Layout
|
||||
> [!NOTE]
|
||||
> The initial proposal for a monolithic `~/Deployments` directory was superseded by the decoupled `~/Core` and `~/Sites` architecture documented in [Homelab Architecture: Appctl & Decentralized Repositories](../../guides/homelab-appctl-architecture.md) and executed in [Core & Sites Cutover and Testing Plan](../appctl/core-sites-cutover-testing-plan.md).
|
||||
|
||||
### 🖥️ Production Server Layout (`/home/kiskaadee/`)
|
||||
```text
|
||||
/home/kiskaadee/
|
||||
├── Config/ # NixOS declarative configuration for this host
|
||||
├── Deployments/ # Or Production/ - Live Docker compose services (Git tracked)
|
||||
│ ├── core/ # Ingress (Traefik, Authelia, Socket-Proxy)
|
||||
│ ├── apps/ # Individual standalone services
|
||||
│ └── data/ # Persistent volumes or bind-mount configs
|
||||
├── Media/ # Jellyfin media libraries, recordings, storage
|
||||
└── second-brain/ # Synced knowledge base & operational docs
|
||||
├── Core/ # Hardened Ingress & Gateway (Traefik, Authelia, Socket-Proxy)
|
||||
├── Sites/ # Decentralized micro-repositories for each container stack
|
||||
├── Brain/ # Synced personal knowledge base & operational docs
|
||||
├── Config/ # NixOS declarative configuration (hosts/server)
|
||||
└── Media/ # High-capacity media storage for Jellyfin (/media)
|
||||
```
|
||||
|
||||
*Rule for Server*:
|
||||
- **No** active development trees, compiler build caches (`target/`, `node_modules/` in home), or transient scratchpads.
|
||||
- All running services run as containers or declarative systemd units.
|
||||
*Rules for Server*:
|
||||
- **No** active development trees, compiler build caches (`target/`, `node_modules/` in home root), or transient scratchpads.
|
||||
- All running services run as containers orchestrated via `appctl` or declarative systemd units.
|
||||
|
||||
---
|
||||
|
||||
### 💻 Laptop Workstation Layout
|
||||
### 💻 Laptop Workstation Layout (`/home/kiskaadee/`)
|
||||
```text
|
||||
/home/kiskaadee/
|
||||
├── Config/ # Shared NixOS repository (laptop configuration)
|
||||
├── Projects/ # Active source code repositories
|
||||
│ └── active/ # Current work trees (e.g. homelab micro-repos, new-repo, dynu-monitor)
|
||||
├── Learn/ # Backend residency and study coursework
|
||||
├── Experiments/ # Prototypes, spike tests, scratchpads
|
||||
├── second-brain/ # Personal notes & architecture plans
|
||||
├── Brain/ # Local canonical knowledge graph vault
|
||||
├── Config/ # NixOS configuration repository (hosts/laptop)
|
||||
└── Downloads/ / Pictures/ # Standard user directories
|
||||
```
|
||||
|
||||
---
|
||||
|
||||
## 🔗 Related Documents
|
||||
* [Homelab Architecture: Appctl & Decentralized Repositories](../../guides/homelab-appctl-architecture.md)
|
||||
* [Core & Sites Cutover and Testing Plan](../appctl/core-sites-cutover-testing-plan.md)
|
||||
@@ -1,6 +1,6 @@
|
||||
---
|
||||
type: plan
|
||||
status: active
|
||||
status: completed
|
||||
project: homelab
|
||||
tags:
|
||||
- homelab
|
||||
@@ -13,7 +13,7 @@ tags:
|
||||
# 🖥️ NixOS Server & Laptop Workstation Migration
|
||||
|
||||
## 🎯 Executive Summary
|
||||
Transition the current physical machine (`desktop`) into a dedicated, headless, 24/7 homelab production server (`server`). Transfer all GUI workflows, desktop environments, and active development workspaces to the `laptop`.
|
||||
Transition the physical machine (`desktop`) into a dedicated, headless, 24/7 homelab production server (`server`). Transfer all GUI workflows, desktop environments, and active development workspaces to the `laptop`.
|
||||
|
||||
---
|
||||
|
||||
@@ -43,26 +43,32 @@ graph LR
|
||||
## 📋 Phased Execution Roadmap
|
||||
|
||||
### Phase 1: Laptop NixOS Baseline & Graphical Parity
|
||||
- [ ] Install NixOS on the target laptop.
|
||||
- [ ] Pull and configure `hosts/laptop/` from `nixos-config`.
|
||||
- [ ] Move graphical stack definitions (Niri, Hyprland, Waybar, Mako, Rofi/Fuzzel, audio tools) to be enabled on `hosts/laptop/`.
|
||||
- [ ] Verify GPU hardware acceleration (Intel/AMD/Nvidia drivers on laptop).
|
||||
- [ ] Test user applications and shell environments on the laptop.
|
||||
- [x] Install NixOS on the target laptop.
|
||||
- [x] Pull and configure `hosts/laptop/` from `nixos-config`.
|
||||
- [x] Move graphical stack definitions (Niri, Hyprland, Waybar, Mako, Rofi/Fuzzel, audio tools) to be enabled on `hosts/laptop/`.
|
||||
- [x] Verify GPU hardware acceleration (Intel/AMD/Nvidia drivers on laptop).
|
||||
- [x] Test user applications and shell environments on the laptop.
|
||||
|
||||
### Phase 2: Workspaces & Project Data Transfer
|
||||
- [ ] Migrate local development repositories from desktop to laptop:
|
||||
- [x] Migrate local development repositories from desktop to laptop:
|
||||
- Working trees in `Projects/`, `Learn/`, `Experiments/`.
|
||||
- [ ] Configure SSH keys, GPG keys, and GitHub/Gitea credentials on the laptop.
|
||||
- [ ] Verify that all ongoing development compiles and runs natively on the laptop.
|
||||
- [x] Configure SSH keys, GPG keys, and GitHub/Gitea credentials on the laptop.
|
||||
- [x] Verify that all ongoing development compiles and runs natively on the laptop.
|
||||
|
||||
### Phase 3: Server Configuration & Headless Conversion
|
||||
- [ ] Refactor NixOS configuration repository:
|
||||
- Rename/refactor `hosts/desktop` into `hosts/server` (or enforce pure headless specialization as default).
|
||||
- [x] Refactor NixOS configuration repository:
|
||||
- Establish `hosts/server` as dedicated headless configuration.
|
||||
- Remove graphical packages, desktop managers, display managers (`greetd`), and desktop-only daemons from the server host.
|
||||
- Keep homelab modules: `homeserver.nix`, `traefik-deployments.nix`, `dynu.nix`, Docker daemon, SOPS secrets.
|
||||
- [ ] Set up robust unattended boot, power management (disable sleep/suspend on idle), and wake-on-LAN/systemd watchdog if applicable.
|
||||
- [ ] Dry-build and validate server configuration (`nix build .#nixosConfigurations.server.config.system.build.toplevel --no-link`).
|
||||
- Maintain homelab modules: `homeserver.nix`, `traefik-deployments.nix`, `dynu.nix`, Docker daemon, SOPS secrets.
|
||||
- [x] Set up robust unattended boot, power management (disable sleep/suspend on idle), and wake-on-LAN/systemd watchdog if applicable.
|
||||
- [x] Dry-build and validate server configuration (`nix build .#nixosConfigurations.server.config.system.build.toplevel --no-link`).
|
||||
|
||||
### Phase 4: Production Hygiene & Decommissioning
|
||||
- [ ] Clean up redundant folders on the server (e.g. personal browser profiles, desktop scratchpads, non-production experiments).
|
||||
- [ ] Verify 24/7 stability, monitoring, and auto-restart of all Docker containers on boot.
|
||||
- [x] Clean up redundant folders on the server (e.g. personal browser profiles, desktop scratchpads, non-production experiments).
|
||||
- [x] Verify 24/7 stability, monitoring, and auto-restart of all Docker containers on boot.
|
||||
|
||||
---
|
||||
|
||||
## 🏁 Outcome & Operational State
|
||||
* **Headless Server (`server`)**: Operating 24/7 at `192.168.1.36` (port 2222), hosting `Core/`, `Sites/`, `Brain/`, and `Config/`.
|
||||
* **Laptop Workstation (`laptop`)**: Primary daily development machine managing repositories locally and syncing declaratively via Git and SSH.
|
||||
Reference in new issue
Block a user