↓ Skip to main content

Post 1: Introduction and Overall Architecture of the DevOps Homelab

Luis Pérez
Author
Luis Pérez
Cybersecurity enthusiast and platform engineer. Focused on Kubernetes, IaC with OpenTofu/Terraform, Talos Linux, and secure declarative architectures by design.
DevOps Homelab: praxis-lab - This article is part of a series.
Part 1: This Article

1. Project Vision
#

This is the first article in a series documenting, piece by piece, the implementation of my DevOps homelab. The project is an online Linux labs platform, called praxis-lab, designed to deliver Linux courses and give every student an isolated practice environment: a micro virtual machine accessible from the browser.

Choosing a homelab as the implementation environment is driven by three goals:

  1. Full control over the entire lifecycle, from virtual machine provisioning all the way to application deployment.
  2. Zero public-cloud cost, which allows iterating on complex architectures without budget constraints.
  3. Technical portfolio: every component is documented with the level of detail that would be expected in a production environment — a practice that transfers directly to SRE and DevOps roles.

The result is a fully automated end-to-end platform: a student opens a browser, selects a lab, and gets an interactive Linux terminal — with zero manual intervention by an administrator.


2. Overall System Architecture
#

The system is divided into five clearly separated layers: virtualized hardware, Kubernetes platform, application, GitOps, and CI/CD. The high-level architecture diagram is shown below:

General Architecture from the DevOps Homelab

General Architecture from the DevOps Homelab

The organizing principle of the architecture is separation of responsibilities per repository:

RepositoryResponsibilityTechnology
infra-opentofuDeclarative VM provisioning, OS configuration, and GitOps bootstrapOpenTofu, bpg/proxmox, siderolabs/talos, hashicorp/helm
gitops-manifestsSingle source of truth for the desired state of the platform in KubernetesArgoCD, Kustomize, Ingress-NGINX, External Secrets Operator
praxis-labApplication source code for the labs platformGo, SQLite, React, TypeScript, Vite, xterm.js

The flow of control moves in a single direction: code → CI/CD → image registry → GitOps repository → ArgoCD → Kubernetes. No change is ever applied directly to the cluster; every state mutation goes through a commit, which guarantees full traceability and reversibility.


3. Technology Stack
#

3.1. Infrastructure, Virtualization & Operating System (infra-opentofu)
#

ComponentRole in the architecture
Proxmox VEType-1 bare-metal hypervisor hosting the Kubernetes virtual machines.
Talos Linux (Sidero Labs)Immutable, minimal, security-hardened Linux distribution designed exclusively for Kubernetes. No SSH: fully managed through its API via talosctl.
OpenTofu (>= 1.6.0)Infrastructure as Code engine. Declaratively defines compute, operating system configuration, and the GitOps pipeline bootstrap.
bpg/proxmox providerDeclarative provisioning of virtual machines on Proxmox VE.
siderolabs/talos providerTalos machine configuration, cluster bootstrap, and kubeconfig generation.
hashicorp/helm providerDeploys the official ArgoCD chart directly into the Talos cluster: the entry point that “seeds” the GitOps engine.

This chain is particularly interesting from an SRE perspective: the infrastructure is provisioned entirely from code (HCL for the VMs, declarative Talos configuration), and the resulting cluster is an immutable system — there is no mutable local state and no shell session on the nodes — a property that eliminates an entire class of configuration-drift problems.

3.2. GitOps & Kubernetes Platform (gitops-manifests)
#

ComponentRole in the architecture
KubernetesContainer orchestrator, bootstrapped and managed by Talos Linux. Runs the labs platform and its supporting services.
ArgoCDGitOps controller: continuous pull-based reconciliation loop, ApplicationSets, and the App-of-Apps pattern.
KustomizeDeclarative templating engine: base/ manifests with dev and prod overlays to parameterize per environment without duplicating content.
Ingress-NGINX ControllerL7 reverse proxy at the cluster edge, configured to support WebSocket upgrades — a critical requirement for the interactive shells.
External Secrets Operator (ESO)Declarative synchronization of secrets from an external secret manager into Kubernetes, keeping credentials out of the GitOps repository.

3.3. Labs Application (praxis-lab)
#

Backend (Go):

ComponentRole in the architecture
Go (>= 1.22)Primary language. Implements the REST API and the WebSocket server. Static compilation produces small, efficient binaries, ideal for containers.
SQLiteLightweight embedded persistence with no external service dependency. In Kubernetes it is configured with a PVC for persistence and WAL mode (Write-Ahead Logging) for reader/writer concurrency.
Gorilla WebSocket / nhooyr.io/websocketReal-time full-duplex communication between the student’s browser and the terminal processes.
Linux PTY (creack/pty)Pseudo-terminal allocation inside the container to run interactive command shells.

Frontend (React):

ComponentRole in the architecture
React (>= 18) + TypeScriptSingle Page Application user interface with static typing across components and services.
ViteFast bundling, development server with hot-reloading, and asset generation.
xterm.js (+ fit and web-links addons)Browser-based terminal emulator: consumes the WebSocket stream and renders it as a real shell session.
NGINX (Alpine)Static web server inside the frontend container: serves the SPA and resolves client-side routing (fallback to index.html for deep links).

3.4. CI/CD, Containers & Local Environment
#

ComponentRole in the architecture
DockerMulti-stage builds: the Go backend is compiled in one stage and copied onto a minimal base image; the frontend is built with Vite and served from NGINX Alpine.
ttl.sh (Ephemeral Registry)Anonymous, ephemeral container registry with immutable tags via Git commit SHA and TTL (ttl.sh/<uuid>/praxis:sha-<commit>), eliminating credential management and token rotation in CI/CD.
GitHub ActionsCI pipelines: push triggers, linting and tests, image builds, publishing to ttl.sh, and an automatic commit of the new tags into gitops-manifests.
GNU MakeTask automation at both the repository root (homelab/Makefile) and the application (praxis-lab/Makefile).
Vim / ViStandard terminal editor for local configuration and script editing.

4. End-to-End Flow: From Code to Lab
#

The following sequence diagram describes the full cycle of a code change until a student uses it:

Sequence diagram

Sequence diagram

And the lab execution flow from the student’s perspective:

Execution flow

Execution flow


5. Design Principles
#

The architecture is grounded in principles that apply directly to production SRE/DevOps operations:

  • 100% declarative, reproducible infrastructure: from the VMs in Proxmox to the ArgoCD chart, all state is defined in versioned code. The entire environment can be rebuilt from the repositories alone.
  • Immutable nodes: Talos Linux eliminates traditional server administration (no SSH, no mutable local state). The only management path is its API and its declarative configuration.
  • GitOps: the gitops-manifests repository is the single source of truth. ArgoCD continuously reconciles; any deviation of cluster state is either corrected or recorded as drift.
  • Immutable, traceable images: the SHA tag binds each deployed image to an exact commit. Rollback is a tag change, not a rebuild.
  • Security by design: secrets never live in the repository (ESO injects them at runtime), traffic is segmented with NetworkPolicies, and access is controlled with RBAC.
  • Low-friction local development: unified Makefiles at both levels let any pipeline task run locally with a single command.

6. Decision Records
#

A few decisions deserve explicit mention:

DecisionAlternativeRationale
Proxmox VE + Talos LinuxManaged Kubernetes in the public cloud, or kubeadm on traditional distrosA type-1 homelab with immutable nodes eliminates the administration surface and configuration drift; Talos, being API-first, is fully manageable from OpenTofu.
OpenTofu with bpg/proxmox + siderolabs/talos + hashicorp/helm providersManual steps with talosctl and helm installThe complete bootstrap (VMs → cluster → ArgoCD) must be idempotent, reproducible, and auditable from a single IaC layer.
SQLite + WAL + PVC instead of PostgreSQLExternal database serviceFor a homelab, an embedded database removes an operational dependency. WAL allows concurrent writes alongside reads; the PVC guarantees volume persistence.
xterm.js + PTY over WebSocketVNC, Serial Console, JupyterA real POSIX terminal with a minimal surface: no graphical protocol, no notebook server — just a full-duplex byte stream.
ArgoCD App-of-Apps + ApplicationSetsManual list of ApplicationsManages n applications (currently praxis-lab; soon the labs themselves) from a single controlling Application, scaling without duplication.
Ephemeral registry ttl.sh with SHA tagsTraditional private registries with credentials / latest tagsRemoves token and secret management from CI/CD; TTL handles automatic cleanup while SHA guarantees exact traceability.

7. Series Structure
#

Each article in the series dives deep into one layer of the architecture described in section 2:

#ArticleLayer
1Introduction and Overall Architecture (this article)Big picture
2Infrastructure as Code: Proxmox, Talos Linux, and OpenTofu (bpg/proxmox, siderolabs/talos, hashicorp/helm)infra-opentofu
3GitOps with ArgoCD, Kustomize, and secret management with ESOgitops-manifests
4CI/CD with GitHub Actions, Docker multi-stage, and ephemeral publishing on ttl.shCI/CD
5The praxis-lab application: Go backend (REST, WebSockets, PTY, SQLite) and React frontend (xterm.js)praxis-lab
6Observability and resilience: metrics, logs, alerting, and recovery strategyOperations

8. Conclusions
#

This project demonstrates a complete DevOps pipeline implemented on self-owned hardware: IaC (OpenTofu provisioning Proxmox and Talos), GitOps (ArgoCD + Kustomize), CI/CD (GitHub Actions + Docker + ttl.sh), and a business application with non-trivial real-time requirements (interactive terminals over WebSocket) and persistence (SQLite on Kubernetes).

The homelab serves as a proving ground: the patterns documented are identical to those that would be applied on a managed public-cloud cluster, with the difference that every decision — and every failure — is fully inspectable and reproducible.

The next article dives deep into the infrastructure layer: the complete provisioning chain — VMs on Proxmox with bpg/proxmox, immutable cluster bootstrap with siderolabs/talos, and ArgoCD seeding with hashicorp/helm.


DevOps Homelab: praxis-lab - This article is part of a series.
Part 1: This Article