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
+68
-61
No files matched your search
@@ -1,5 +1,5 @@
|
|||||||
---
|
---
|
||||||
type: guide
|
type: plan
|
||||||
project: homelab
|
project: homelab
|
||||||
tags:
|
tags:
|
||||||
- gitea
|
- gitea
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
type: plan
|
type: plan
|
||||||
status: active
|
status: completed
|
||||||
project: homelab
|
project: homelab
|
||||||
tags:
|
tags:
|
||||||
- gitea
|
- gitea
|
||||||
@@ -38,30 +38,23 @@ sequenceDiagram
|
|||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
## 🛠️ Implementation Approaches
|
## 🛠️ Realized Architecture: Dynamic Webhook GitOps & Gitea Runner
|
||||||
|
|
||||||
### 1. Webhooks & Watchtower / Diun (Pull Model - Recommended)
|
Rather than relying on continuous image polling via Watchtower, the homelab adopted a **push-driven, event-based GitOps architecture**:
|
||||||
- **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.
|
|
||||||
|
|
||||||
### 2. GitOps with Gitea Actions / GitHub Actions Runner
|
1. **Self-Hosted CI Runner (`act_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>`.
|
- Runs as a container inside `homelab-gitea` using `catthehacker/ubuntu:act-latest`.
|
||||||
- **Pros**: Full visibility, reproducible deployments, direct log output in CI UI.
|
- 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
|
## 🔗 Production Guides & Specifications
|
||||||
|
* [Dynamic Decentralized GitOps Dispatcher Architecture](../../guides/homelab-gitops-dispatcher-architecture.md)
|
||||||
The following micro-repos are selected as prioritized pilot targets for automated CI/CD pipelines:
|
* [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. **`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.
|
|
||||||
|
|
||||||
@@ -1,6 +1,6 @@
|
|||||||
---
|
---
|
||||||
type: plan
|
type: plan
|
||||||
status: active
|
status: completed
|
||||||
project: homelab
|
project: homelab
|
||||||
tags:
|
tags:
|
||||||
- homelab
|
- 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
|
```text
|
||||||
/home/kiskaadee/
|
/home/kiskaadee/
|
||||||
├── Config/ # NixOS declarative configuration for this host
|
├── Core/ # Hardened Ingress & Gateway (Traefik, Authelia, Socket-Proxy)
|
||||||
├── Deployments/ # Or Production/ - Live Docker compose services (Git tracked)
|
├── Sites/ # Decentralized micro-repositories for each container stack
|
||||||
│ ├── core/ # Ingress (Traefik, Authelia, Socket-Proxy)
|
├── Brain/ # Synced personal knowledge base & operational docs
|
||||||
│ ├── apps/ # Individual standalone services
|
├── Config/ # NixOS declarative configuration (hosts/server)
|
||||||
│ └── data/ # Persistent volumes or bind-mount configs
|
└── Media/ # High-capacity media storage for Jellyfin (/media)
|
||||||
├── Media/ # Jellyfin media libraries, recordings, storage
|
|
||||||
└── second-brain/ # Synced knowledge base & operational docs
|
|
||||||
```
|
```
|
||||||
|
|
||||||
*Rule for Server*:
|
*Rules for Server*:
|
||||||
- **No** active development trees, compiler build caches (`target/`, `node_modules/` in home), or transient scratchpads.
|
- **No** active development trees, compiler build caches (`target/`, `node_modules/` in home root), or transient scratchpads.
|
||||||
- All running services run as containers or declarative systemd units.
|
- All running services run as containers orchestrated via `appctl` or declarative systemd units.
|
||||||
|
|
||||||
---
|
---
|
||||||
|
|
||||||
### 💻 Laptop Workstation Layout
|
### 💻 Laptop Workstation Layout (`/home/kiskaadee/`)
|
||||||
```text
|
```text
|
||||||
/home/kiskaadee/
|
/home/kiskaadee/
|
||||||
├── Config/ # Shared NixOS repository (laptop configuration)
|
├── Projects/ # Active source code repositories
|
||||||
├── Projects/ # Active source code repositories
|
│ └── active/ # Current work trees (e.g. homelab micro-repos, new-repo, dynu-monitor)
|
||||||
├── Learn/ # Backend residency and study coursework
|
├── Learn/ # Backend residency and study coursework
|
||||||
├── Experiments/ # Prototypes, spike tests, scratchpads
|
├── Experiments/ # Prototypes, spike tests, scratchpads
|
||||||
├── second-brain/ # Personal notes & architecture plans
|
├── Brain/ # Local canonical knowledge graph vault
|
||||||
└── Downloads/ / Pictures/ # Standard user directories
|
├── 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
|
type: plan
|
||||||
status: active
|
status: completed
|
||||||
project: homelab
|
project: homelab
|
||||||
tags:
|
tags:
|
||||||
- homelab
|
- homelab
|
||||||
@@ -13,7 +13,7 @@ tags:
|
|||||||
# 🖥️ NixOS Server & Laptop Workstation Migration
|
# 🖥️ NixOS Server & Laptop Workstation Migration
|
||||||
|
|
||||||
## 🎯 Executive Summary
|
## 🎯 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
|
## 📋 Phased Execution Roadmap
|
||||||
|
|
||||||
### Phase 1: Laptop NixOS Baseline & Graphical Parity
|
### Phase 1: Laptop NixOS Baseline & Graphical Parity
|
||||||
- [ ] Install NixOS on the target laptop.
|
- [x] Install NixOS on the target laptop.
|
||||||
- [ ] Pull and configure `hosts/laptop/` from `nixos-config`.
|
- [x] 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/`.
|
- [x] 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).
|
- [x] Verify GPU hardware acceleration (Intel/AMD/Nvidia drivers on laptop).
|
||||||
- [ ] Test user applications and shell environments on the laptop.
|
- [x] Test user applications and shell environments on the laptop.
|
||||||
|
|
||||||
### Phase 2: Workspaces & Project Data Transfer
|
### 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/`.
|
- Working trees in `Projects/`, `Learn/`, `Experiments/`.
|
||||||
- [ ] Configure SSH keys, GPG keys, and GitHub/Gitea credentials on the laptop.
|
- [x] 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] Verify that all ongoing development compiles and runs natively on the laptop.
|
||||||
|
|
||||||
### Phase 3: Server Configuration & Headless Conversion
|
### Phase 3: Server Configuration & Headless Conversion
|
||||||
- [ ] Refactor NixOS configuration repository:
|
- [x] Refactor NixOS configuration repository:
|
||||||
- Rename/refactor `hosts/desktop` into `hosts/server` (or enforce pure headless specialization as default).
|
- Establish `hosts/server` as dedicated headless configuration.
|
||||||
- Remove graphical packages, desktop managers, display managers (`greetd`), and desktop-only daemons from the server host.
|
- 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.
|
- Maintain 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.
|
- [x] 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`).
|
- [x] Dry-build and validate server configuration (`nix build .#nixosConfigurations.server.config.system.build.toplevel --no-link`).
|
||||||
|
|
||||||
### Phase 4: Production Hygiene & Decommissioning
|
### Phase 4: Production Hygiene & Decommissioning
|
||||||
- [ ] Clean up redundant folders on the server (e.g. personal browser profiles, desktop scratchpads, non-production experiments).
|
- [x] 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] 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