Homelab as Doc
website·Indexed 29 days ago
https://tzshare.netlify.app/homelabasdocDocumentation for a personal homelab infrastructure, covering physical architecture, network addressing, and the deployment of services including GitLab, FreeIPA, Vault, OpenBao, Harbor, Nautobot, and Wazuh. It includes guides on DevSecOps tools like Ansible, AWX, Packer, OpenTofu, and Kubernetes, as well as documentation workflows using Docusaurus, Obsidian, and Netlify.
What's inside Homelab as Doc
- LikeC4 is an 'architecture as code' toolchain used to create architecture diagrams from textual descriptions. It uses a Domain-Specific Language (DSL) inspired by the C4 Model, but offers more flexibility by allowing custom semantics and an unlimited number of nested levels.
Overview of Obsidian for knowledge management
Obsidian is a personal knowledge management and note-taking software application that operates using Markdown files.Overview of HomeLabAsDoc Infrastructure Stack
HomeLabAsDoc is a personal computing environment designed for experimenting with self-hosting, virtualization, containerization, cybersecurity, and automation, with a focus on energy efficiency. The infrastructure utilizes a combination of the following tools for lifecycle management:
- Virtualization: Proxmox (KVM-based) is used to host Virtual Machines.
- Provisioning & Configuration: VMs are provisioned via OpenTofu using images generated by Packer, and configured using Ansible.
- Orchestration & Observability: Ansible playbooks are versioned in a private GitLab instance and executed via Ansible AWX for better observability.
- Network Management: Network information is managed using Nautobot (CMDB/IPAM).
- Containerization: Kubernetes is used for orchestrating application containers (Pods). Containers are built with Buildah and stored in a private Harbor registry.
- CI/CD: GitLab Runners are deployed as containers to execute CI/CD pipelines within the internal GitLab instance.
Overview of Grafana Alloy
Grafana Alloy is a telemetry collector that replaces the olderpromtailpackage from Grafana.Overview of HomeLabAsDoc Infrastructure
HomeLabAsDoc is a personal computing environment designed for experimenting with self-hosting, virtualization, containerization, cybersecurity, and automation, with a focus on energy efficiency.Physical network architecture for MiniPC clusters
In the initial HomeLab-v1.0 setup with only two Ace Magician T8 Plus MiniPCs, the devices are connected directly via a network cable. For expansions involving three or more MiniPCs, a Netgear 8-port switch is required to manage the connectivity.Implement a decrypting proxy with Squid for HTTPS logging
To log full URLs for HTTPS requests (rather than just FQDNs), a decrypting proxy must be implemented. This is achieved by creating an intermediate Certificate Authority (CA)—signed by a root CA like FreeIPA—on the proxy. The proxy uses this intermediate CA to generate certificates on the fly for clients, acting as the TLS termination point to decrypt the traffic. This process is known as 'SslBump Peek and Splice'. To avoid security alerts on client devices, the root CA certificate must be deployed to all clients (e.g., via VM templates).Use Nautobot as a CMDB for infrastructure tracking
Nautobot's CMDB (Configuration Management Database) functionality allows for the centralized management of Configuration Items (CI). This includes tracking both physical equipment (such as switches, servers, and firewalls) and virtual machines to simplify infrastructure oversight.Use Excalidraw for diagrams in Obsidian
Theobsidian-excalidraw-pluginallows users to create and embed hand-drawn diagrams and sketches directly within the Obsidian markdown editor. For full documentation and installation, refer to the official GitHub repository.Use LikeC4 extension for VS Code
The LikeC4 extension for Visual Studio Code provides auto-completion for the DSL and a real-time preview of the architecture diagrams.Manage firewall filtering policies with Nautobot Firewall Models
The Nautobot Firewall Models plugin allows developers and network administrators to manage firewall filtering policies directly within Nautobot. By using configuration elements already declared in the CMDB or IPAM, it eliminates the need for manual flow matrices or Excel files, reducing duplication errors and simplifying team collaboration.Manage network prefixes and IP addresses with Nautobot IPAM
Nautobot's IPAM (IP Address Management) module is used to simplify and automate the management of subnets and IP addresses. It provides two primary functions:
- Network Prefixes: Use the
Prefixespage to declare subnets and track their utilization (number of used vs. available IP addresses). - IP Address Management: Within each subnet, IP addresses can be marked as
Active(assigned) orReserved.
Centralizing IP management in Nautobot prevents subnet overlaps and duplicate IP addresses. Additionally, the Nautobot API can be used to perform automated checks or processing of the IP inventory.
- Network Prefixes: Use the