{"repo":"jgoos/home-lab-as-code","free":true,"listed":false,"github":"https://github.com/jgoos/home-lab-as-code","clone":"git clone https://github.com/jgoos/home-lab-as-code.git","description":"Generate cloud-init ready vm images via packer and deploy these via terraform.","language":"HCL","stars":16,"topics":["ansible","cloud-init","packer","terraform","libvirt","homelab","homelab-automation"],"license":"MIT","category":"deployment-docker-iac","readme_excerpt":"Home Lab As Code This repository provides a way to easily create and manage virtual machines on your local machine. It uses Packer to generate cloud-init ready Red Hat Enterprise Linux (RHEL) images, and Terraform to automate the provisioning of virtual machines. The included dnsmasq configuration makes the virtual machines resolvable from the local machine using the home.arpa domain. Additionally, after the provisioning process with Terraform, it will create an updated ansible inventory that can be used for further management and configuration of the provisioned machines. Prerequisites - Have ansible installed on your system - Have packer installed on your system - Have terraform installed on your system - Red Hat Enterprise Linux (RHEL) based distribution Downloading Content Download ISO files To create the RHEL images, you'll need to download the appropriate ISO files and place them in the packer/iso-files directory. Check the rhel8.pkr.hcl and rhel9.pkr.hcl packer config files to see which ISO files are needed. Building Packer Images To build the Packer images, follow these steps: Configuring libvirt The libvirt configuration is based on the following instructions: howto-automated-dns-resolution-for-kvmlibvirt-guests-with-a-local-domain. This configuration uses home.arpa for the domain name. (see rfc8375). Edit libvirt Local Domain You'll need to configure the default libvirt network to use the home.arpa domain. To check the current network configuration, run the followin","default_branch":null,"files":null,"tree":[],"storefront":"/r/jgoos","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/jgoos/home-lab-as-code/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}