- .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.
2.4 KiB
2.4 KiB
🪐 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 (
desktopcommand 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 catalogdeploy <app>- Deploy locally (e.g.,deploy wordpress)apps- List deployed applicationsconnect <server>- SSH to cloud servercloud-deploy <app> <server>- Direct cloud deploymentdesktop- Start GUI sessionbrowser- 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