The code accompaniment to the book The Homelab Almanac, by Michael Taggart.
This repo aims to provide a lightly-automated starting point for creating virtual labs for security research. To accomplish this, we rely on 4 technologies:
- Proxmox: Hypervisor/VM Host
- Packer: Base VM template creation
- Terraform: VM/VM set creation/destruction
- Vault: Secrets management
- Ansible: VM post-provisioning
While this repo can be used independently, it is designed to be used in conjunction with The Homelab Almanac. If you find this repo useful, consider purchasing the book. If you already have, thank you so much!
Before cloning this repo, make sure you have:
- A dedicated Proxmox server.
openvswitch
installed.- A jumpbox on the Proxmox server.
- Packer, Terraform, Vault, and Ansible installed, ideally on the jumpbox.
Some assembly required. These steps meant are meant to be executed on a Debian/Ubuntu jumpbox within a Proxmox hypervisor. Full details are in the book, but here are the basic steps.
- Generate a Proxmox API key with permission to create VMs.
- Save the username and API Token for use in the next step.
- Run
jumpbox_setup.sh
to set up the requisite tools. This installs Packer, Terraform, Vault, and Ansible, and sets up your Vault server. - Use Packer to create VM templates for your lab. The
mkiso.sh
andinit-cloud-init.sh
scripts ensure your static files never contain unencrypted secrets. You'll need OS install disks and the VirtIO disk (instructions provided). - Use Terraform to provision VMs. The provided plans are good starting points.
- Use Ansible to create an inventory and provision your VMs with the provided playbooks—or your own!
Pull requests will be considered, but this project is intended as a directed project from The Taggart Institute, and as such we reserve the right to accept/reject PRs based on project direction.
For support using this repo, join our Discord! We'd love to have you in our learning community.