Skip to content

hpresnall/yodeler

Repository files navigation

Yodeler

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.

Zero Infrastructure Setup

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.

Functionality

Yodeler knows how to do the following:

  1. Setup an Alpine based KVM host
  2. Create minimal, basic Alpine VMs with small footprints and memory requirements
  3. Configure basic Awall firewalls
  4. Manage Open vSwitch vswitches with VLAN support
  5. Configure routers using Shorewall & iptables (eventually nftables)
  6. Configure DNS / DHCP servers based on PowerDNS and Kea for both IPv4 and IPv6
  7. Make IPv6 prefix delegation requests via dhcpcd and distribute to subnets via radvd
  8. Configure ZFS based Samba servers
  9. Configure metrics & monitoring using Grafana and Prometheus (in progress)

See the roadmap for plans & progress.

Quick Start

Use Yodeler to create shell scripts

  1. Install Python 3 and pipx
  2. git clone https://github.com/hpresnall/yodeler.git; cd yodeler
  3. pipx install coverage;pipx inject coverage pyyaml
  4. ~/.local/pipx/venvs/coverage/bin/python3 yodeler.py <site_dir> /tmp where <site_dir> is the location of Yodeler site, e.g. sites/standard
  5. 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.

Boot Alpine installer with Yodeler shell scripts

  1. Create a bootable Alpine installer disk image on an SD card or USB stick from an ISO
  2. Copy /tmp/<site_name> into the install image's root directory as /<site_name>
  3. On the physical system to setup, boot with this disk image. Do not run setup-alpine.

Use Yodeler shell scripts to setup a new host

  1. 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.
  2. Wait for yodel.sh to setup Alpine on the server, configure KVM then create all the VMs for this host.
  3. Reboot the host with your new Yodeler config!

About

Automated creation and setup of a set of Alpine Linux virtual machines

Topics

Resources

License

Stars

Watchers

Forks