Provisions SGF Devs workload VMs on Proxmox and bootstraps the k3s cluster and Argo CD baseline used to deploy Kubernetes manifests.
- Owns: OpenTofu resources for three workload VMs, persistent data disks, SSH/Git deploy keys, the backup bucket, and SSM parameters used by cluster automation.
- Owns: Ansible node/storage preparation, k3s installation, and Argo CD bootstrap.
- Does not own: public edge connectivity or Proxmox metrics configuration.
src/tf/: Provisions Proxmox VMs and emits Terraform-backed Ansible inventory data.src/ansible/: Rebuilds the cluster (cluster-bootstrap.yml) and supports rerunning Argo CD bootstrap (argocd-bootstrap.yml)..github/workflows/: Terraform plan/apply and Ansible lint/manual execution workflows.
make help
make tf-init
make tf-plan
make tf-apply
make ansible-install
make ansible PLAYBOOK=cluster-bootstrap.yml
make ansible PLAYBOOK=argocd-bootstrap.yml- Apply Terraform first to create the VMs, 300 GB data disks, backup resources, and SSM parameters.
- Replace
CHANGEMEinsgfdevs/infra-k8s-apps/src/k8s/platform/dex.yamlwith the GitHub OAuth App client ID before bootstrapping the platform. - Add the
git_deploy_public_keyoutput as a read-only deploy key insgfdevs/infra-k8s-apps. - After the first apply, manually replace the write-only
CHANGEMEvalue in/vm-workloads/sgfdevs/infra-vm-workloads/dex-github-oauth-client-secretwith the Dex GitHub OAuth App client secret. Do not incrementvalue_wo_versionunless intentionally replacing the manual value. - Replace
CHANGEMEin/vm-workloads/sgfdevs/infra-vm-workloads/backups/{b2-account-id,b2-account-key}with credentials scoped only tosgfdevs-on-prem-k3s-backups. - Apply
sgfdevs/infra-aws-corefirst; it creates the scoped External Secrets IAM identity and bootstrap credentials at/homelab/sgfdevs-vms/eso-ssm-access-key-idand/homelab/sgfdevs-vms/eso-ssm-secret-access-key. - Run
cluster-bootstrap.ymlfor a complete rebuild, orargocd-bootstrap.ymlto reconcile only Argo CD bootstrap resources.
- This repo mixes infrastructure provisioning and cluster bootstrap; run Terraform and Ansible steps intentionally and in order.
- Generated OpenBao, Dex client, OAuth2 Proxy cookie, SeaweedFS, and backup secrets use
prevent_destroy. A full destroy is intentionally blocked until an operator explicitly removes those lifecycle guards after preserving or accepting loss of the values. - Apply
sgfdevs/infra-dnsand reconcile the existinglz/infra-public-edgebefore expecting public ingress or HTTP-01 certificates to become ready.