feat: initial Phase 1 PoC scaffolding for KubeSolo OS

Complete Phase 1 implementation of KubeSolo OS — an immutable, bootable
Linux distribution built on Tiny Core Linux for running KubeSolo
single-node Kubernetes.

Build system:
- Makefile with fetch, rootfs, initramfs, iso, disk-image targets
- Dockerfile.builder for reproducible builds
- Scripts to download Tiny Core, extract rootfs, inject KubeSolo,
  pack initramfs, and create bootable ISO/disk images

Init system (10 POSIX sh stages):
- Early mount (proc/sys/dev/cgroup2), cmdline parsing, persistent
  mount with bind-mounts, kernel module loading, sysctl, DHCP
  networking, hostname, clock sync, containerd prep, KubeSolo exec

Shared libraries:
- functions.sh (device wait, IP lookup, config helpers)
- network.sh (static IP, config persistence, interface detection)
- health.sh (containerd, API server, node readiness checks)
- Emergency shell for boot failure debugging

Testing:
- QEMU boot test with serial log marker detection
- K8s readiness test with kubectl verification
- Persistence test (reboot + verify state survives)
- Workload deployment test (nginx pod)
- Local storage test (PVC + local-path provisioner)
- Network policy test
- Reusable run-vm.sh launcher

Developer tools:
- dev-vm.sh (interactive QEMU with port forwarding)
- rebuild-initramfs.sh (fast iteration)
- inject-ssh.sh (dropbear SSH for debugging)
- extract-kernel-config.sh + kernel-audit.sh

Documentation:
- Full design document with architecture research
- Boot flow documentation covering all 10 init stages
- Cloud-init examples (DHCP, static IP, Portainer Edge, air-gapped)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-11 10:18:42 -06:00
commit e372df578b
50 changed files with 4392 additions and 0 deletions

View File

@@ -0,0 +1,29 @@
# KubeSolo OS Cloud-Init — Air-Gapped Deployment
# For environments with no internet access.
# All container images must be pre-loaded into containerd.
#
# Place at: /mnt/data/etc-kubesolo/cloud-init.yaml
hostname: airgap-node-01
network:
mode: static
interface: eth0
address: 10.0.0.50/24
gateway: 10.0.0.1
dns:
- 10.0.0.1
kubesolo:
local-storage: true
# Disable components that need internet
extra-flags: "--disable traefik --disable servicelb"
# Pre-loaded images (Phase 2+: auto-import at boot)
# Images must be placed as tar files on the data partition at:
# /mnt/data/images/*.tar
# They will be imported into containerd on first boot.
airgap:
import-images: true
images-dir: /mnt/data/images
# registry-mirror: "" # Optional: local registry mirror

View File

@@ -0,0 +1,18 @@
# KubeSolo OS Cloud-Init — DHCP Configuration (Default)
# Place at: /mnt/data/etc-kubesolo/cloud-init.yaml (on data partition)
# Or pass via boot param: kubesolo.cloudinit=/path/to/this.yaml
hostname: kubesolo-node
network:
mode: dhcp
# interface: eth0 # Optional: specify interface (auto-detected if omitted)
# dns: # Optional: override DHCP-provided DNS
# - 8.8.8.8
# - 1.1.1.1
kubesolo:
# extra-flags: "" # Additional flags for KubeSolo binary
# local-storage: true
# apiserver-extra-sans:
# - kubesolo.local

View File

@@ -0,0 +1,26 @@
# KubeSolo OS Cloud-Init — Portainer Edge Agent Integration
# This config connects the KubeSolo node to a Portainer Business instance
# via the Edge Agent for remote management.
#
# Place at: /mnt/data/etc-kubesolo/cloud-init.yaml
hostname: edge-node-01
network:
mode: dhcp
kubesolo:
local-storage: true
# extra-flags: ""
# Portainer Edge Agent configuration
# After KubeSolo starts, deploy the Edge Agent as a workload
portainer:
edge-agent:
enabled: true
# Get these values from Portainer → Environments → Add Environment → Edge Agent
edge-id: "your-edge-id-here"
edge-key: "your-edge-key-here"
portainer-url: "https://portainer.example.com"
# Optional: specify Edge Agent version
# image: portainer/agent:latest

View File

@@ -0,0 +1,17 @@
# KubeSolo OS Cloud-Init — Static IP Configuration
# Place at: /mnt/data/etc-kubesolo/cloud-init.yaml
hostname: kubesolo-edge-01
network:
mode: static
interface: eth0
address: 192.168.1.100/24
gateway: 192.168.1.1
dns:
- 8.8.8.8
- 8.8.4.4
kubesolo:
extra-flags: "--apiserver-extra-sans kubesolo-edge-01.local"
local-storage: true