Content is user-generated and unverified.

πŸš€ Home Lab to the Moon and Back

Proving you can run CozyStack in the cloud for less than a cup of coffee per month
And then fly it back home to Raspberry Pi land


🎯 The Mission

Transform a 76Β°F office space heater (aka home lab) into a cloud-validated, ARM64-first CozyStack deployment that:

  • βœ… Runs on AWS free tier (~$0.10/month - just EBS costs)
  • βœ… Validates on t4g.small instances before Raspberry Pi deployment
  • βœ… Netboots Talos Linux with custom extensions (Spin + Tailscale)
  • βœ… Demonstrates SpinKube on ARM64 in production-like conditions
  • βœ… Proves the economics of hybrid cloud for home labs
  • βœ… Maintains zero GDPR risk (private networking only)

Target: Live demo at CozySummit Virtual 2025 on December 4, 2025


🌑️ The Problem

Home Lab Status: πŸ”₯
Office Temperature: 76Β°F (with AC!)
Electricity Bill: πŸ“ˆ
Wife's Patience: πŸ“‰

Running x86 workloads 24/7 in a home lab is:

  • HOT - Space heater in every season
  • EXPENSIVE - Power consumption adds up
  • LOUD - Fans, lots of fans
  • INFLEXIBLE - Can't easily scale down

The Solution? Validate in the cloud, then bring it home on ARM64 (Raspberry Pi CM3).


πŸ—οΈ The Architecture

Home Lab (Current)

Internet β†’ DD-WRT Router (10.17.12.1)
           └─ Front Subnet (10.17.12.0/24)
              └─ Mikrotik Router (dual-homed)
                 └─ Inner Subnet (10.17.13.0/24)
                    β”œβ”€ Netboot Infrastructure
                    β”‚  β”œβ”€ dnsmasq (DHCP)
                    β”‚  β”œβ”€ matchbox (PXE)
                    β”‚  β”œβ”€ 5x registry caches
                    β”‚  └─ pi-hole (DNS)
                    └─ Talos Nodes
                       └─ CozyStack

AWS Cloud (Target)

VPC: 10.20.0.0/16 (eu-west-1)
β”œβ”€ Public Subnet (10.20.1.0/24)
β”‚  └─ NAT Gateway
β”‚
└─ Private Subnet (10.20.13.0/24)
   β”œβ”€ Bastion (t4g.small, 5hrs/day)
   β”‚  └─ Docker containers:
   β”‚     β”œβ”€ dnsmasq
   β”‚     β”œβ”€ matchbox
   β”‚     β”œβ”€ registry caches (x5)
   β”‚     └─ pi-hole
   β”‚
   └─ Talos Nodes (t4g.small, on-demand)
      └─ CozyStack on ARM64
         └─ SpinKube demo

Key Innovation: Exact replica of home lab topology in AWS, staying within free tier limits.


πŸ“Š The Economics

ResourceMonthly CostFree TierActual Cost
t4g.small compute (750 hrs)~$13.00βœ… FREE$0.00
EBS storage (gp3)~$0.88/GB❌ Paid~$0.04
Data transfer (private)$0.00βœ… FREE$0.00
NAT Gateway~$32.00⚠️ Partial~$0.04
Total~$45Free tier magic~$0.08

Target: Keep monthly cost under $0.10 (one dime!) through December 2025.

After free tier expires: Scale appropriately or return to home (now on efficient ARM64).


πŸ§ͺ Test-Driven Generation (TDG)

This project follows the Test-Driven Generation methodology created by Chanwit Kaewkasi (CozyStack creator).

Principle: Write tests FIRST, then generate code to make them pass.

Read More:

Test Status: 21 Tests Defined

PhaseTestsStatus
Network Foundation1-3❌ In Progress
Bastion & Netboot4-6❌ Pending
CozyStack Deployment7-9❌ Pending
Integration Tests10-21❌ Pending

Run tests: ./tests/run-all.sh


πŸ“š Documentation

Core Documents

Repository Constellation

This project integrates with 8+ repositories:

RepoPurposeStatus
urmanac/aws-accountsInfrastructure Terraformβœ… Active
kingdon-ci/cozy-fleetFlux GitOpsβœ… Active
kingdonb/cozystack-talm-demoHelmReleases & Speed RunsπŸ“Ί Reference
kingdon-ci/kaniko-builderCustom image buildsπŸ”§ Tool
kingdon-ci/time-trackerSession trackingβš™οΈ Optional
kingdonb/mecrisMCP server patternsπŸ• Reference
kingdon-ci/noclaudeSelf-hosted AIπŸ€– Future
chanwit/tdgTDG MethodologyπŸ“– Methodology

See: docs/REPO-OVERVIEW.md for full dependency graph.


🎬 The Demo

What You'll See (December 4)

  1. Home Lab Reality Check πŸ”₯
    • Temperature monitoring
    • Power consumption
    • The space heater problem
  2. AWS Economics πŸ’°
    • Live cost explorer query
    • $0.04/month current state
    • Free tier breakdown
  3. Netboot Magic ⚑
    • Launch t4g.small instance
    • Watch Talos netboot (< 5 min)
    • CozyStack dashboard
  4. SpinKube on ARM64 🎯
    • Deploy demo app
    • Show running workload
    • Verify ARM64 architecture
  5. The Exit πŸšͺ
    • Terminate instance
    • Return to $0.04/month
    • Compare to home lab costs

Live Channels

  • πŸ“Ί YouTube: @yebyen/streams
  • πŸŽ₯ CozyStack Speed Runs: Previous demos and validation runs

πŸš€ Quick Start

Prerequisites

bash
# AWS CLI with MFA-authenticated profile
aws configure --profile sb-terraform-mfa-session

# Terraform (or OpenTofu)
brew install opentofu

# kubectl + talosctl
brew install kubectl
brew install siderolabs/tap/talosctl

# Flux CLI
brew install fluxcd/tap/flux

Deploy Infrastructure

bash
# Clone this repo
git clone https://github.com/urmanac/cozystack-moon-and-back.git
cd cozystack-moon-and-back

# Review TDG tests
./tests/run-all.sh --dry-run

# Deploy network foundation (Test 1)
cd terraform/network
terraform init
terraform plan
terraform apply

# Deploy bastion (Test 2-3)
cd ../bastion
terraform apply

# Verify netboot infrastructure (Test 3)
ssh ubuntu@10.20.13.140 "docker ps"

# Launch Talos node (Test 4)
# (Manual for now, see docs/BOOTSTRAP.md)

Bootstrap CozyStack

bash
# Get talos config
talosctl -n 10.20.13.x config

# Bootstrap cluster
talosctl -n 10.20.13.x bootstrap

# Install CozyStack
# (See docs/COZYSTACK.md for detailed steps)

πŸŽ“ What You'll Learn

This project demonstrates:

  • ✨ Hybrid Cloud Economics - When cloud makes sense vs. home lab
  • πŸ—οΈ Infrastructure Replication - Exact topology in AWS and home
  • πŸ”§ ARM64 Validation - Test before bare-metal deployment
  • 🌐 Network Architecture - Private-first, GDPR-safe design
  • πŸ“¦ Custom Talos Images - Extensions for Spin + Tailscale
  • πŸ”„ GitOps with Flux - Including new ExternalArtifact features
  • πŸ’° Cost Optimization - Free tier strategies and monitoring
  • πŸ§ͺ TDG Methodology - Test-driven infrastructure generation

πŸ† Success Metrics

Demo Day (December 4)

  • Tests 1-6 passing (Network β†’ Demo workload)
  • Live netboot < 5 minutes
  • SpinKube demo runs on ARM64
  • Cost stays under $0.10/month
  • Audience can replicate in their own AWS account

Post-Demo

  • Home lab transitions to Raspberry Pi CM3 modules
  • Office temperature drops 15Β°F
  • Power bill decreases measurably
  • Wife's approval rating improves πŸ“ˆ

πŸ‘₯ Credits

Speaker: Kingdon Barrett
Flux Maintainer, DevOps Engineer at Navteca, LLC
Working on Science Cloud for NASA Goddard Space Flight Center

Methodology: Chanwit Kaewkasi
CozyStack Creator, TDG Innovator

Built with:

  • πŸ€– Claude (Anthropic) - Infrastructure design & TDG implementation
  • 🧰 CozyStack - Kubernetes platform for bare metal
  • 🐧 Talos Linux - Immutable Kubernetes OS
  • ☁️ AWS - Free tier cloud validation
  • πŸ”„ Flux - GitOps toolkit
  • πŸƒ SpinKube - WebAssembly on Kubernetes

πŸ“… Timeline

DateMilestone
Nov 16🎬 Project kickoff, TDG tests defined
Nov 23πŸ—οΈ Network foundation + bastion deployed
Nov 30🐧 First Talos node netboots successfully
Dec 4🎀 Live demo at CozySummit Virtual 2025
Dec 31🏠 Home lab transitions to Raspberry Pi

Free tier expires: December 2025 (t4g instances)


🀝 Contributing

This is a conference talk demo, but if you want to replicate or improve:

  1. Follow TDG - Write tests first
  2. Reference, don't duplicate - Reuse existing repos
  3. Document your journey - Others can learn from your experience
  4. Share costs - Transparency helps everyone

Open issues for questions, PRs for improvements!


πŸ“œ License

Apache 2.0 - See LICENSE for details.


πŸ”— Links


<div align="center">

"It's 2025 - If you're running a cluster, why not host it in the cloud first?"

πŸŒ™ β†’ ☁️ β†’ 🏠 β†’ πŸ₯§

From basement to cloud and back to Raspberry Pi

</div>
Content is user-generated and unverified.
    CozyStack Home Lab to Cloud: ARM64 Kubernetes Under $0.10/Month | Claude