Skip to content

Scripts to generate Alpine Linux images for home network.

License

Notifications You must be signed in to change notification settings

bfritz/homelab-bootstrap

Repository files navigation

bfritz homelab bootstrap scripts

continuous integration status Bors enabled

Build scripts that use qemu and alpine-chroot-install to create custom Alpine images that run from RAM. Images include:

  • k0s-worker - x86_64 image to run as k0s worker node
  • rpi-basic - armhf and armv7 images for basic Raspberry Pi 0, 2, 3, or 4 host
  • rpi-firewall - armv7 image to run awall, dnsmasq, and wireguard on Raspberry Pi 4 as home router
  • rpi-k0s-controller - armv7 image to run as k0s controller node
  • rpi-ruuvi - armhf image to listen for Ruuvi Tag data on a Raspberry Pi Zero W
  • rpi-snapcast-client - armhf image to run snapcast on a Raspberry Pi Zero W

These Alpine Linux images run on my home network and are rather opinionated. No image tarballs are published because it is unlikely they would be generally useful. However, the scripts that generate them might be interesting to others and are the main reason for publishing.

Image Details

All Images

All images run chrony for NTP time sync, sshd, and the Prometheus node-exporter to expose host metrics.

k0s-worker

Image for x86_64 machines that will be provisioned to run the k0s distribution of Kubernetes. Intended as the foundation for kubernetes worker nodes that will be provisioned with k0sctl.

rpi-basic

Image for Raspberry Pi Zero, 2, 3, or 4 to act as a basic host. Mostly used for adhoc testing.

Pulls dhcp lease on wired interface and runs openssh server. root user does not have password and the only way to login with ssh is with key-based authenticateion. Set HL_SSH_KEY_URL to the URL of a ssh authorized_keys file to pre-authorize one or more keys.

Runs consoles on tty1 and ttyACM0, the Pi's built-in serial port. Boot messages are logged to serial console.

rpi-firewall

Firewall image intended for Raspberry Pi 4. The iptables firewall rules, stored in a separate repo, are defined using awall. VLANs are used so the Pi, with a single ethernet interface, can support multiple network zones. Includes wireguard to create VPN tunnels. Also runs chrony in ntp server mode.

Runs consoles on tty1 and ttyACM0, the Pi's built-in serial port. Boot messages are logged to serial console.

Replaces a similar setup with Seagate DockStar running ArchLinux ARM and Shorewall that served as my home router for many years.

rpi-k0s-controller

k0s controller node for Raspberry Pi 4. Intended as foundation for controllers that will be provisioned with k0sctl.

rpi-snapcast-client

Minimal image with the snapcast client software installed. Intended to run on Raspberry Pi Zero W connected to amplifer for streaming audio. Set HL_SNAPCAST_SERVER to the hostname of the snapcast server the client should connect to at boot.

Prior Art and Inspiration