Skip to content

Latest commit

 

History

History
104 lines (73 loc) · 2.74 KB

File metadata and controls

104 lines (73 loc) · 2.74 KB

Home Server

This is the configuration for my home server running in Kubernetes.

Home Server

App Dashboard

Trello Board

Setup

Configure Hosts

  1. Install Proxmox.

  2. Create user.

    apt update
    apt install sudo
    useradd -m mchill
    passwd mchill
    echo "mchill ALL=(ALL) NOPASSWD: ALL" | tee -a /etc/sudoers.d/mchill
  3. Add ssh key from GitHub.

    mkdir ~/.ssh
    touch ~/.ssh/authorized_keys
    chmod 700 ~/.ssh
    chmod 600 ~/.ssh/authorized_keys
    wget -O - https://github.com/mchill.keys >> ~/.ssh/authorized_keys
  4. Configure the hosts with Ansible.

    ansible-playbook playbooks/configure_proxmox_hosts.yaml -i inventory.yaml --extra-vars "@variables.yaml"
  5. If Ceph was installed for the first time, some values need to be replaced.

Provision Virtual Machines

When creating VMs for the first time, set initialize=true to add the bootable CD and exclude devices that interfere with the OS installation process.

terraform apply -var="initialize=true"

Install Operating System

  1. Install Ubuntu Server 24.04. Keep defaults except where noted below.

    1. Disable "Set up this disk as an LVM group"
    2. Enable "Install OpenSSH server"
    3. Import SSH key from GitHub
  2. Reapply terraform configuration, removing the bootable CD and adding PCI and serial devices.

    cd terraform
    terraform apply
  3. Enable passwordless sudo to allow Ansible to run later.

    echo "mchill ALL=(ALL) NOPASSWD: ALL" | sudo tee -a /etc/sudoers.d/mchill

Configure Virtual Machines

cd ansible
ansible-playbook playbooks/configure_proxmox_vms.yaml -i inventory.yaml --extra-vars "@variables.yaml"

Deploy Workloads

cd k8s

# Sealed Secrets key
kubectl create namespace sealed-secrets
kubectl apply -f sources/sealed-secrets/sealed-secrets-key.yaml

# Argo CD
helm repo add argo https://argoproj.github.io/argo-helm
helm repo update
helm upgrade --install --create-namespace -n argocd \
  --version $(yq '.spec.sources[0].targetRevision' applications/wave2/argocd.yaml) \
  --values argocd/values.yaml argocd argo/argo-cd

# Workloads
kubectl apply -f applications/root.yaml