Skip to content

Homelab ⚗️

This project aims to build a homelab for personal testing on infrastructure, development, CI/CD, etc...

It provides a complete configuration with common web services using:

  • Ansible for infrastructure deployment (gateway and k3s cluster)
  • GitOps (ArgoCD) for Kubernetes applications deployment

It is a quick starting point for simple infrastructure needs or for testing various tools such as monitoring, alerting, automated deployment, security testing, etc...

Quickstart

Make sure all prerequisites are met (check the installation section if needed).

Setup directory:

sh
# Clone the repository
git clone --depth 1 https://github.com/this-is-tobi/homelab.git && cd ./homelab && rm -rf ./.git && git init

# Copy inventory example to inventory
cp -R ./ansible/inventory-example ./ansible/inventory

Infrastructure

Setup inventory:

Install:

sh
# Deploy gateway and K3s cluster, fetch kubeconfig
./run.sh -p ./ansible/install.yml -u -k

Kubernetes Services (GitOps)

Setup configuration:

Install:

sh
# Set kubectl context
kubectl config use-context homelab

# Bootstrap ArgoCD
./run.sh -b

# Apply core services (Longhorn, Vault, Cert-Manager, etc.)
./run.sh -c homelab

# Apply platform services (Keycloak, Gitea, Harbor, etc.)
./run.sh -s homelab