/homelab

Modern self-hosting framework, fully automated from empty disk to operating services with a single command.

Primary LanguageGoGNU General Public License v3.0GPL-3.0

Test Homelab

FeaturesGet StartedDocumentation

tag document license

This project utilizes Infrastructure as Code and GitOps to automate provisioning, operating, and updating self-hosted services in my homelab. It can be used as a highly customizable framework to build your own homelab.

What is a homelab?

Homelab is a laboratory at home where you can self-host, experiment with new technologies, practice for certifications, and so on. For more information about homelab in general, see the r/homelab introduction.

Overview

Project status: ALPHA

This project is still in the experimental stage, and I don't use anything critical on it. Expect breaking changes that may require a complete redeployment. A proper upgrade path is planned for the stable release. More information can be found in the roadmap below.

Hardware

Hardware replace

  • 5 × SFF Beelink Mini PC:
    • CPU: Intel Core N95 @ 3.40GHz
    • RAM: 8GB
    • SSD: 256GB
  • TP-Link TL-SG108E switch:
    • Ports: 8
    • Speed: 1000Mbps
  • DDW35U3 Enclosure:
    • 8 TB Sata

Features

  • Common applications: Gitea, Seafile, Jellyfin, Paperless...
  • Automated bare metal provisioning with PXE boot
  • Automated Kubernetes installation and management
  • Installing and managing applications using GitOps
  • Automatic rolling upgrade for OS and Kubernetes
  • Automatically update apps (with approval)
  • Modular architecture, easy to add or remove features/components
  • Automated certificate management
  • Automatically update DNS records for exposed services
  • VPN without port forwarding
  • Expose services to the internet securely with Cloudflare Tunnel
  • CI/CD platform
  • Private container registry
  • Distributed storage
  • Support multiple environments (dev, prod)
  • Monitoring and alerting 🚧
  • Automated offsite backups 🚧
  • Single sign-on 🚧
  • Infrastructure testing

Some demo videos and screenshots are shown here. They can't capture all the project's features, but they are sufficient to get a concept of it.

Demo
![][deploy-demo]
Deploy with a single command (after updating the configuration files)
![][pxe-demo]
PXE boot
[![][homepage-demo]][homepage-demo]
Homepage with Ingress discovery powered by Hajimari
[![][grafana-demo]][grafana-demo]
Monitoring dashboard powered by Grafana
[![][gitea-demo]][gitea-demo]
Git server powered by Gitea
[![][matrix-demo]][matrix-demo]
Matrix chat server
[![][tekton-demo]][tekton-demo]
Continuous integration with Tekton
[![][argocd-demo]][argocd-demo]
Continuous deployment with ArgoCD
[![][lens-demo]][lens-demo]
Cluster management using Lens
[![][vault-demo]][vault-demo]
Secret management with Vault

Terms

Term
PXE (Preboot Execution Environment)
SFF (Small Form Factor)
DNS (Domain Name System)
CI/CD (Continuous Integration/Continuous Deployment)
CI/CD
IaC (Infrastructure as Code)
TFTP (Trivial File Transfer Protocol)

DevOps Tools

Category Tool
Version Control Git
Continuous Integration GitLab, Jenkins
Continuous Deployment Ansible, Docker
Infrastructure as Code (IaC) Terraform, OpenTufu
Configuration Management Chef, Puppet
Continuous Monitoring Prometheus
Collaboration/Commmunication
Cloud Platforms
Testing Automation Selenium
Log Management
Project Management Monday, Wrike, ClickUp

Tech stack

Logo Name Description
Ansible Automate bare metal provisioning and configuration
ArgoCD GitOps tool built to deploy applications to Kubernetes
cert-manager Cloud native certificate management
Cloudflare DNS and Tunnel
Pi-Hole DNS Server
ExternalDNS Synchronizes exposed Kubernetes Services and Ingresses with DNS providers
Docker Ephemeral PXE server and convenient tools container
Docker Registry Private container registry
Gitea Self-hosted Git service
GitLab Self-hosted Git service
Tekton Cloud native solution for building CI/CD systems
Grafana Operational dashboards
Loki Log aggregation system
Prometheus Systems monitoring and alerting toolkit
Kubernetes Container-orchestration system
K3s Lightweight distribution of Kubernetes
Helm Package manager for Kubernetes
MetalLB Bare metal load-balancer for Kubernetes
NGINX Kubernetes Ingress Controller
RancherD Container/Kubernetes management on the Desktop
Longhorn Cloud native distributed block storage for Kubernetes
Lens Kubernetes management
Vault Secrets and encryption management system
Renovate Automatically update dependencies
Ubuntu Base OS
NixOS Declarative builds and deployments
Terraform Automated infrastructure as code
OpenTofu Automated infrastructure as code
Knative Serverless containers
Talos Kubernetes Linux OS
Logo Name Description
ZeroTier VPN without port forwarding

Get Started

Roadmap

See roadmap and open issues for a list of proposed features and known issues.

License

Copyright © 2020 - 2022 Khue Doan

Distributed under the GPLv3 License. See license page or LICENSE.md file for more information.

References