Skip to content

TF module to (reapeatably) stand up new VMs from cloud-init configs

Notifications You must be signed in to change notification settings

zhengyi13/tf-libvirt-kube

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Purpose

My hope here is to turn this working example `main.tf` into a module that can be used to spin up an arbitrary number of machines, and in as automated a fashion as possible, turn that into a k8s cluster.

Underlying Setup

A libvirt KVM/QEMU virtualization server under my desk. My bridge device puts the VMs on the same flat network as the rest of the devices in my house, because I haven’t yet figured out routing to a private subnet on that same server.

DHCP is on the network’s main firewall/gateway, and auto-registers names with the DNS service on the same.

Tech

TODOs

  • An automated Ansible inventory

    This turns out to be both possible with an Ansible community plugin, and frustratingly not-so-possible given Fedora base images have SELinux turned on, which breaks the Ansible plugin if we use the libvirt_qemu connection instead of plain ssh.

    … So, automate a static inventory file creation

  • Fix base image SELinux policies to work with the Ansible libvirt_qemu connection plugin
  • Figure out routing/subnetting so I can do this on a normal out-of-the-box bridge device with a private subnet.
  • Speed up k8s rollout.

    kubespray is nice and thorough, but it takes a long time. How much of what it does can be massaged into the cloud-init config to save time further down the road?

  • Automate etdctl config to take etcd backups

About

TF module to (reapeatably) stand up new VMs from cloud-init configs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published