Michael Czechowski cbbebbd35d refactor: Enhance local development environment and documentation
- .gitignore: Ignore result* files.
- Makefile: Refactored to improve clarity, remove unused targets, add new testing targets (test-usb, test-vm), and streamline cloud deployment commands.
- README.md: Significantly updated to reflect the new single-participant environment focus, refine the learning flow, update commands, and improve overall readability.
- flake.nix: Modified to enable Docker for local development, adjust desktop environment behavior (manual start), and implement improved systemd services for container setup and health monitoring, including retry logic.
2025-08-15 04:33:34 +02:00

🪐 CODE CRISPIES Workshop Infrastructure

Single-participant learning environments with local practice and cloud deployment capabilities.

🚀 Quick Start

# 1. Start local VM for development/testing
make local-vm

# 2. Build USB drives for participants  
make build-usb
make flash-usb USB_DEVICE=/dev/sdX

# 3. Deploy cloud infrastructure
export HCLOUD_TOKEN="your_token"
make deploy-cloud

🎯 Learning Flow

Local Practice (USB/VM)

recipes                    # Show available apps
deploy wordpress           # Deploy locally  
browser                    # View at wordpress.workshop.local

Cloud Deployment

connect hopper             # SSH to cloud server
# Same abra commands work here
abra app new wordpress -S --domain=blog.hopper.codecrispi.es
abra app deploy blog.hopper.codecrispi.es

🏗️ Architecture

Single Participant Model: Each environment (USB/VM) is complete and self-contained.

  • USB Boot: Bootable NixOS with Docker + abra for hands-on learning
  • Local VM: Identical environment for development/testing
  • Cloud Servers: 15 production servers (hopper, curie, lovelace, etc.)

💾 USB Environment

Pre-configured with:

  • Docker Swarm + abra installation
  • SSH client for cloud access
  • Terminal-first interface (desktop command for GUI)
  • Helper commands: recipes, deploy, connect, help

Build and flash:

make build-usb
make flash-usb USB_DEVICE=/dev/sdb

🌐 Cloud Deployment

Creates 15 Hetzner VMs at {name}.codecrispi.es:

export HCLOUD_TOKEN="your_token"
make deploy-cloud
make status-cloud  # Check health

🖥️ Local Development

make local-vm      # Start VM
make test-vm       # Verify build

The VM simulates the USB experience with identical configuration and commands.

📚 Available Commands

In USB/VM environments:

  • recipes - Show Co-op Cloud catalog
  • deploy <app> - Deploy locally (e.g., deploy wordpress)
  • apps - List deployed applications
  • connect <server> - SSH to cloud server
  • cloud-deploy <app> <server> - Direct cloud deployment
  • desktop - Start GUI session
  • browser - Launch Firefox

🔧 Prerequisites

  • Nix with flakes enabled
  • SSH key at ~/.ssh/id_ed25519.pub
  • HCLOUD_TOKEN for cloud deployment
  • 2GB+ RAM for VM testing

🧹 Cleanup

make clean         # Local artifacts
make destroy-cloud # Cloud infrastructure
Description
Science in the City Festival (Malta) – Digital Independence Day Workshop
https://dailysh.it/malta Readme 316 KiB
Languages
Nix 85.9%
Makefile 7%
HCL 4.5%
Shell 2.6%