Packer, Terraform, and Ansible code to run a three node clustered Proxmox Home Lab
Three node Proxmox cluster installed with shared storage.
Ansible will handle:
- Cloud Image creation
- Ceph Installation
- Proxmox VLAN setup
- Post deployment software installation/configuration
Terraform will handle:
- VM deployment
- DNS management
- Netbox
- Install Proxmox on each node, using xfs for storage, leaving the 2TB NVMe drive untouched for future Ceph configuration
- Join the hosts to a cluster
- Run the bootstrap ansible playbook to install prerequisites, and do base configuration
- Run the
vlan_setup.yml
playbook to configure networks - Configure Ceph
- Configure NFS share for Synology DS1618
- Run the
deploy-prep.yml
to handle the creation of the cloud init template - Run terraform to deploy vms
- Run ansible to configure PowerDNS/Netox
- Run terraform to handle dns/netbox things
To generate a new salt for powerdns admin:
source flask/bin/activate
export FLASK_APP=./powerdnsadmin/__init__.py
python -c 'import bcrypt; print(bcrypt.gensalt().decode())'
Still working on how to get PowerDNS to defer to PiHole for adblocking...
To run Terraform and pull AWS creds from Vault, update the following with your mount/field.
AWS_ACCESS_KEY_ID=$(vault kv get -mount=homelab -field=terraform_access_key wasabi) AWS_SECRET_ACCESS_KEY=$(vault kv get -mount=homelab -field=terraform_secret_key wasabi) terraform plan
- Packer templates based on work by Julien Brochet
- Terraform provider for Proxmox by Telmate
- Ceph Ansible code taken and consolidated from peacedata0
- Synology Certs Role by JohnVillalovos
- Additional deployment strategy TotalDebug
- k3s things from Fredrickb