Intended use case: Provision Fedora CoreOS virtual machines using libvirt. Further configuring them utilizing Ansible.
- Terraform
- Libvirt hypervisor
- Libvirt provider
- Internet connection on machine that will run VMs and on VMs
fcos_version
: Corresponds to the version in the url.https://builds.coreos.fedoraproject.org/prod/streams/stable/builds/${FCOS_VERSION}/x86_64/fedora-coreos-${FCOS_VERSION}-qemu.x86_64.qcow2.xz
- This file will be downloaded and decompressed on the local machine and uploaded to the target hypervisor if it is not present.
This project comes with a butane configuration file with the following parameters:
- The ansible user's password is set to
ChangeMe123
. You can generate a new password usingmkpasswd
. - The timezone is set to
America/Detroit
. - Installs Python on boot for Ansible.
main.tf will look first for a file in the format ${path.module}/butane/${node.name}.yaml
, if it isnt found it will fallback to the generic butane file included in this repository.
The butane yaml will be passed through the terraform templatefile
function and then handed off the the fcos_vm
module's poseidon/ct
resource to convert it to the ignition format.
Documentation for butane is here
I used the following projects to piece this together as I learn terraform.