Skip to content

aw042/strata-seeder

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

6 Commits
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

Strata Seeder

A bootable USB stick that provisions a bare metal node into a self-bootstrapping Kubernetes seed cluster with integrated routing.

What It Does

  1. Boots from USB and installs Flatcar Linux to disk
  2. Configures Gateway (choose your mode):
    • Strata Router (default): Native Flatcar routing (~270MB RAM) ⭐ Recommended
    • VyOS on KubeVirt: VM-based routing (~4GB RAM)
  3. Runs Strata to provision your infrastructure from topology.yaml
  4. Pivots the controller to Layer 1 and goes dormant

Architecture

β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”
β”‚                      Flatcar USB Seed                                    β”‚
β”œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€
β”‚                                                                          β”‚
β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚  β”‚                    Gateway Mode Selection                        β”‚    β”‚
β”‚  β”‚                 (select-gateway-mode.sh)                         β”‚    β”‚
β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                        β”‚                       β”‚                         β”‚
β”‚          β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”   β”Œβ”€β”€β”€β”€β–Όβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”    β”‚
β”‚          β”‚    Strata Router Mode     β”‚   β”‚     VyOS Mode           β”‚    β”‚
β”‚          β”‚    (Recommended)          β”‚   β”‚     (Legacy)            β”‚    β”‚
β”‚          β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”  β”‚   β”‚  β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β” β”‚    β”‚
β”‚          β”‚  β”‚ systemd-networkd   β”‚  β”‚   β”‚  β”‚ k0s Cluster        β”‚ β”‚    β”‚
β”‚          β”‚  β”‚ nftables           β”‚  β”‚   β”‚  β”‚ KubeVirt           β”‚ β”‚    β”‚
β”‚          β”‚  β”‚ FRR (container)    β”‚  β”‚   β”‚  β”‚ VyOS VM            β”‚ β”‚    β”‚
β”‚          β”‚  β”‚ CoreDNS (container)β”‚  β”‚   β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜ β”‚    β”‚
β”‚          β”‚  β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜  β”‚   β”‚                         β”‚    β”‚
β”‚          β”‚  RAM: ~270MB              β”‚   β”‚  RAM: ~4GB              β”‚    β”‚
β”‚          β”‚  Boot: ~10s               β”‚   β”‚  Boot: ~60s             β”‚    β”‚
β”‚          β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜   β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜    β”‚
β”‚                        β”‚                       β”‚                         β”‚
β”‚                        β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”¬β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                         β”‚
β”‚                                    β–Ό                                     β”‚
β”‚                    β”Œβ”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”                     β”‚
β”‚                    β”‚        Strata Provisioner      β”‚                     β”‚
β”‚                    β”‚      (provisions Layer 1+)     β”‚                     β”‚
β”‚                    β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜                     β”‚
β”‚                                                                          β”‚
β””β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”€β”˜

Gateway Modes

Feature Strata Router VyOS on KubeVirt
RAM Usage ~270MB ~4GB
Boot Time ~10s ~60s
Throughput ~40Gbps ~10Gbps
Dependencies None k0s + KubeVirt
Complexity Low High
Migration New standard Legacy support

Strata Router (Recommended)

Native Flatcar routing using Linux networking primitives:

  • systemd-networkd β€” Interface configuration, VLANs, VXLAN
  • nftables β€” Stateful firewall and NAT
  • FRR β€” BGP/OSPF routing (containerized)
  • CoreDNS β€” DNS resolver and caching (containerized)
# config/seed-config.yaml
gateway_mode: "strata-router"

strata_router:
  wan:
    interface: "eth1"
    ip: "10.100.0.1/24"
    gateway: "10.100.0.254"
  lan:
    interface: "eth2"
    ip: "10.100.1.1/24"
  bgp:
    asn: 65001
    neighbors:
      - ip: "10.100.0.254"
        asn: 65000

VyOS on KubeVirt (Legacy)

Runs VyOS as a KubeVirt virtual machine. Use this for:

  • Compatibility with existing VyOS configurations
  • Features not yet in Strata Router (IPsec, advanced firewall rules)
# config/seed-config.yaml
gateway_mode: "vyos"

vyos:
  bgp_asn: 65001
  bgp_neighbor: "192.168.1.254"
  bgp_neighbor_asn: 65000

Quick Start

# 1. Clone the repo
git clone https://github.com/your-org/flatcar-usb-seed.git
cd flatcar-usb-seed

# 2. Check dependencies
make deps

# 3. Customize configuration
cp config/seed-config.example.yaml config/seed-config.yaml
cp config/ssh_authorized_keys.example config/ssh_authorized_keys
vim config/seed-config.yaml

# 4. Validate and Generate config
make validate
make generate-templates

# 5. (Optional) Embed the Strata provisioner
make embed-provisioner

# 5. Build the USB image
make usb GATEWAY_MODE=strata-router

# 6. Write to USB stick
sudo dd if=build/seed-usb.img of=/dev/sdX bs=4M status=progress

# 7. Plug USB into your seed node and boot from it

Prerequisites

Required tools on the build machine:

  • butane β€” Transpiles Butane YAML to Ignition JSON
  • coreos-installer β€” Customizes ISO with Ignition
  • jq β€” JSON processing (for Ignition merging)
  • curl β€” Download Flatcar ISO
  • python3 β€” Config validation (requires PyYAML)
  • yq (optional) or python3 β€” Template generation

Install on Fedora/RHEL:

sudo dnf install butane coreos-installer jq curl python3 python3-pyyaml

Directory Structure

flatcar-usb-seed/
β”œβ”€β”€ butane/                    # Butane (Ignition) configs
β”‚   β”œβ”€β”€ seed.bu                # Base config (common to all modes)
β”‚   β”œβ”€β”€ strata-router.bu       # Strata Router mode additions
β”‚   └── vyos.bu                # VyOS mode additions
β”œβ”€β”€ scripts/                   # Build and runtime scripts
β”‚   β”œβ”€β”€ select-gateway-mode.sh # Chooses gateway at boot
β”‚   β”œβ”€β”€ configure-strata-router.sh
β”‚   β”œβ”€β”€ install-k0s.sh
β”‚   β”œβ”€β”€ install-kubevirt.sh
β”‚   β”œβ”€β”€ deploy-vyos.sh
β”‚   └── run-provisioner.sh
β”œβ”€β”€ templates/                 # Configuration templates
β”‚   β”œβ”€β”€ nftables.conf          # Firewall rules
β”‚   β”œβ”€β”€ frr.conf               # FRR routing config
β”‚   └── Corefile               # CoreDNS config
β”œβ”€β”€ manifests/                 # Kubernetes manifests
β”‚   β”œβ”€β”€ kubevirt-operator.yaml
β”‚   β”œβ”€β”€ vyos-vm.yaml
β”‚   └── multus-bridge.yaml
β”œβ”€β”€ config/                    # User configuration
β”‚   β”œβ”€β”€ seed-config.example.yaml
β”‚   └── ssh_authorized_keys.example
β”œβ”€β”€ embed/                     # Embedded binaries
β”‚   β”œβ”€β”€ strata                 # Strata provisioner (fetched via fetch-provisioner.sh)
β”‚   └── topology.yaml          # Infrastructure definition
β”œβ”€β”€ Makefile                   # Build system
└── build/                     # Output directory (gitignored)

Configuration

seed-config.yaml

This is the main configuration file. Key sections:

Section Description
gateway_mode strata-router or vyos
network Management interface settings
strata_router WAN/LAN interfaces, BGP, DNS
vyos VyOS-specific BGP and DHCP settings
provisioner Strata provisioner settings

See config/seed-config.example.yaml for all options.

topology.yaml

Defines the infrastructure that Strata will provision. This file is embedded in the USB image and used by the Strata provisioner to deploy your datacenter.

See embed/topology.yaml for an example.

How It Works

Boot Sequence (Strata Router Mode)

USB Boot β†’ Flatcar Install β†’ Ignition
    β”‚
    β”œβ”€β”€ select-gateway-mode.sh
    β”‚       └── Creates /opt/seed/.strata-router-mode
    β”‚
    β”œβ”€β”€ sysctl-router.service
    β”‚       └── Enable IP forwarding
    β”‚
    β”œβ”€β”€ nftables.service
    β”‚       └── Load firewall rules
    β”‚
    β”œβ”€β”€ frr.service (Quadlet)
    β”‚       └── Start FRR container (BGP/OSPF)
    β”‚
    β”œβ”€β”€ coredns.service (Quadlet)
    β”‚       └── Start CoreDNS container
    β”‚
    β”œβ”€β”€ strata-router-gateway.service
    β”‚       └── Verify all components
    β”‚
    └── seed-provisioner.service
            └── Run Strata to provision Layer 1+

Boot Sequence (VyOS Mode)

USB Boot β†’ Flatcar Install β†’ Ignition
    β”‚
    β”œβ”€β”€ select-gateway-mode.sh
    β”‚       └── Creates /opt/seed/.vyos-mode
    β”‚
    β”œβ”€β”€ seed-k0s-install.service
    β”‚       └── Install k0s single-node cluster
    β”‚
    β”œβ”€β”€ seed-kubevirt-install.service
    β”‚       └── Install KubeVirt operator
    β”‚
    β”œβ”€β”€ seed-vyos-deploy.service
    β”‚       └── Deploy VyOS VM
    β”‚
    └── seed-provisioner.service
            └── Run Strata to provision Layer 1+

Troubleshooting

Check Gateway Mode

ssh core@<seed-ip>

# Which mode is active?
ls /opt/seed/.*-mode
# /opt/seed/.strata-router-mode  OR  /opt/seed/.vyos-mode

# Check running services
systemctl status strata-router-gateway.service  # Strata Router
systemctl status seed-vyos-deploy.service       # VyOS

Strata Router Mode

# Check FRR BGP neighbors
sudo podman exec -it systemd-frr vtysh -c "show bgp summary"

# Check nftables rules
sudo nft list ruleset

# Check CoreDNS
dig @10.100.1.1 example.com

# Check resource usage (should be ~200-300MB)
free -h

# View container logs
sudo podman logs systemd-frr
sudo podman logs systemd-coredns

VyOS Mode

# Check k0s status
k0s status

# Check KubeVirt
kubectl --kubeconfig=/var/lib/k0s/pki/admin.conf get kubevirt -n kubevirt

# Check VyOS VM
kubectl --kubeconfig=/var/lib/k0s/pki/admin.conf get vmi -A

# Access VyOS console
virtctl console vyos-gateway -n default

Relationship with Strata

This repository provides the bootable USB image that deploys a seed node. The seed node runs the Strata provisioner which then provisions additional infrastructure layers.

flatcar-usb-seed     β†’    Provisions seed node
       β”‚
       └──→ strata   β†’    Provisions Layer 1, 2, 3...

See Strata documentation for topology configuration and provisioning details.

License

Apache 2.0

About

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors