automated, self-contained, minimal VM setup; aka yelling at Alpine Linux
this is a work in progress
Yodeler is an opinionated, limited scope, orchestration framework. Yodeler's primary use case is standing up a new KVM host and all the associated VMs needed to run a small, moderate traffic network. The design is primarily based on home lab usage, but could be used for any configuration or network topology. It can automatically create and configure a set of KVM virtual machines running Alpine Linux.
Yodeler attempts to be as self-contained as possible. All that is needed is a single computer and an internet connection. Yodeler turns YAML configuration files into a set of static shell scripts. These scripts can then be run from bootable Alpine install media to setup a new host. The scripts will install Alpine, configure KVM & setup all the desired VMs.
Yodeler is a standalone Python 3 program and is run before any systems are configured. No extra software is required after the systems are running. YAML configuration files can be created and Yodler can be run on any system that has Python 3.
Systems are meant to be immutable. Configuration changes imply destroying the old VM and creating a new one. This is a manual process; there are no processes running on the KVM host that will trigger a VM rebuild.
Yodeler knows how to do the following:
- Setup an Alpine based KVM host
- Create minimal, basic Alpine VMs with small footprints and memory requirements
- Configure basic Awall firewalls
- Manage Open vSwitch vswitches with VLAN support
- Configure routers using Shorewall & iptables (eventually nftables)
- Configure DNS / DHCP servers based on PowerDNS and Kea for both IPv4 and IPv6
- Make IPv6 prefix delegation requests via dhcpcd and distribute to subnets via radvd
- Configure ZFS based Samba servers
- Configure metrics & monitoring using Grafana and Prometheus (in progress)
See the roadmap for plans & progress.
- Install Python 3 and pipx
git clone https://github.com/hpresnall/yodeler.git; cd yodeler
pipx install coverage;pipx inject coverage pyyaml
~/.local/pipx/venvs/coverage/bin/python3 yodeler.py <site_dir> /tmp
where<site_dir>
is the location of Yodeler site, e.g. sites/standard- Confirm the
/tmp/<site_name>
directory exists and has subdicrectories for all the site's hosts
Note, you may need to update site.yaml
, vmhost.yaml
and router.yaml
to use the ethernet ports actually available
on the configured system. You may also need to update vmhost.yaml
disk paths to point to the disk to use on this system.
- Create a bootable Alpine installer disk image on an SD card or USB stick from an ISO
- Copy
/tmp/<site_name>
into the install image's root directory as/<site_name>
- On the physical system to setup, boot with this disk image. Do not run
setup-alpine
.
- On the new system being set up, run
/media/<installer>/<site_name>/<vmhost>/yodel.sh
where<installer>
is the name of the Alpine installer mount location (e.g. sdb or usb) and<vmhost>
is the name of the KVM server. - Wait for
yodel.sh
to setup Alpine on the server, configure KVM then create all the VMs for this host. - Reboot the host with your new Yodeler config!