refactor: clean up workshop for Science in the City event

- Update workshop name from 'CODE CRISPIES' to 'SCIENCE IN THE CITY'
- Remove all Hetzner cloud deployment references and commands
- Focus documentation on local USB/VM workshop environment
- Remove cloud server connection functionality
- Update WiFi credentials for workshop network
- Clean up AGENTS.md to reflect local-only development workflow
- Remove misleading cloud infrastructure references
- Update help commands and learning flow for local practice only

This commit prepares the workshop materials for the Science in the City event,
focusing exclusively on local Co-op Cloud deployment practice without cloud
infrastructure dependencies.
This commit is contained in:
2025-09-16 19:02:03 +02:00
parent c996924055
commit eaf7667728
4 changed files with 65 additions and 77 deletions

View File

@@ -6,8 +6,8 @@ This file provides guidelines for AI coding agents operating within this reposit
- **Build**: `make usb-build` (Builds the NixOS workshop ISO) - **Build**: `make usb-build` (Builds the NixOS workshop ISO)
- **Local VM**: `make vm` (Starts local VM that simulates USB environment) - **Local VM**: `make vm` (Starts local VM that simulates USB environment)
- **Test**: `make status-cloud` (Health checks for cloud infrastructure) - **Test**: `make usb-test` (Test USB environment in QEMU)
- **Deploy**: `make deploy-cloud` (Deploys 15 VMs to Hetzner Cloud) - **Deploy**: `make usb-build` (Build workshop USB ISO)
- **Format**: `make format` (Format Nix files) - **Format**: `make format` (Format Nix files)
## Code Style Guidelines ## Code Style Guidelines
@@ -27,32 +27,32 @@ This file provides guidelines for AI coding agents operating within this reposit
## Container Architecture ## Container Architecture
- **Local VM**: Provides infrastructure to deploy up to 15 containers on demand (matching production count) - **Local VM**: Provides self-contained workshop environment
- **Container Names**: hopper, curie, lovelace, noether, hamilton, franklin, johnson, clarke, goldberg, liskov, wing, rosen, shaw, karp, rich - **Container Names**: workshop-local (single container environment)
- **Networking**: Private networking with NAT for local development - **Networking**: Local networking with DNS resolution
- **DNS**: Local `.local` domain resolution for testing - **DNS**: `*.workshop.local` domain resolution for testing
## Available Scripts ## Available Scripts
- `connect <name>` - SSH into specific container - `setup` - Initialize local workshop environment
- `containers` - List all containers with IPs - `deploy <recipe>` - Deploy Co-op Cloud applications
- `logs` - Show container setup logs - `browser [app]` - Open applications in Firefox
- `recipes` - Display available Co-op Cloud recipes - `recipes` - Display available Co-op Cloud recipes
- `help` - Show command help - `help` - Show command help
## Development Workflow ## Development Workflow
1. Use `make vm-run` for local development 1. Use `make vm` for local development testing
2. Test with all 15 containers to match production 2. Test workshop environment with `make usb-test`
3. Use `make usb-build` for workshop USB drives (outputs to ./build/iso/) 3. Use `make usb-build` for workshop USB drives (outputs to ./build/iso/)
4. Deploy to cloud with `make deploy-cloud` 4. Focus on local deployment and learning
## General Guidelines ## General Guidelines
- Keep code concise and readable - Keep code concise and readable
- Prefer declarative over imperative approaches - Prefer declarative over imperative approaches
- Document complex logic with comments - Document complex logic with comments
- Test locally before cloud deployment - Test locally in VM before USB deployment
- Maintain feature parity between USB/VM environments where possible - Maintain feature parity between USB/VM environments where possible
- **ALWAYS check package existence on search.nixos.org before adding new packages** - **ALWAYS check package existence on search.nixos.org before adding new packages**

View File

@@ -1,6 +1,6 @@
# 🚀 DIGITAL INDEPENDENCE DAY Workshop Infrastructure # 🚀 SCIENCE IN THE CITY Workshop Infrastructure
Single-participant learning environments with local practice and cloud deployment capabilities. Single-participant learning environments for hands-on Co-op Cloud deployment practice.
## 🚀 Quick Start ## 🚀 Quick Start
@@ -12,9 +12,8 @@ make vm
make usb-build make usb-build
make usb-flash USB_DEVICE=/dev/sdX make usb-flash USB_DEVICE=/dev/sdX
# 3. Deploy cloud infrastructure # 3. Test your USB build
export HCLOUD_TOKEN="your_token" make usb-test
make deploy-cloud
``` ```
## 🎯 Learning Flow ## 🎯 Learning Flow
@@ -27,12 +26,10 @@ deploy wordpress # Deploy locally
browser wordpress # Open directly in Firefox browser wordpress # Open directly in Firefox
``` ```
### Cloud Deployment ### Local Practice Only
```bash ```bash
connect hopper # SSH to cloud server # Focus on local development and testing
# Same abra commands work here # All deployment happens locally on your USB/VM
abra app new wordpress -S --domain=blog.hopper.codecrispi.es
abra app deploy blog.hopper.codecrispi.es
``` ```
## 🗃️ Architecture ## 🗃️ Architecture
@@ -41,7 +38,7 @@ abra app deploy blog.hopper.codecrispi.es
- **USB Boot**: Bootable NixOS with Docker + abra for hands-on learning - **USB Boot**: Bootable NixOS with Docker + abra for hands-on learning
- **Local VM**: Identical environment for development/testing - **Local VM**: Identical environment for development/testing
- **Cloud Servers**: 15 production servers (hopper, curie, lovelace, etc.) - **Local Environment**: Self-contained workshop environment
- **Wildcard DNS**: `*.workshop.local` resolves to `127.0.0.1` via dnsmasq - **Wildcard DNS**: `*.workshop.local` resolves to `127.0.0.1` via dnsmasq
## 💾 USB Environment ## 💾 USB Environment
@@ -60,14 +57,13 @@ make usb-build
make usb-flash USB_DEVICE=/dev/sdb make usb-flash USB_DEVICE=/dev/sdb
``` ```
## 🌐 Cloud Deployment ## 🧪 Testing & Validation
Creates 15 Hetzner VMs at `{name}.codecrispi.es`: Test your workshop environment:
```bash ```bash
export HCLOUD_TOKEN="your_token" make usb-test # Test ISO in QEMU
make deploy-cloud make status-local # Check local services
make status-cloud # Check health
``` ```
## 🖥️ Local Development ## 🖥️ Local Development
@@ -131,7 +127,7 @@ Based on Co-op Cloud with quality scoring:
- `recipes` - Show complete Co-op Cloud catalog - `recipes` - Show complete Co-op Cloud catalog
- `deploy <app>` - Deploy locally with tab completion - `deploy <app>` - Deploy locally with tab completion
- `browser [app]` - Launch Firefox [to specific app] - `browser [app]` - Launch Firefox [to specific app]
- `connect <server>` - SSH to cloud server with tab completion - `connect <server>` - SSH connection helper (local use only)
- `desktop` - Start GUI session - `desktop` - Start GUI session
- `help` - Show all commands and debug info - `help` - Show all commands and debug info
@@ -146,15 +142,15 @@ browser # Opens Firefox with blank page
# Use tab completion # Use tab completion
deploy <TAB> # Shows all available recipes deploy <TAB> # Shows all available recipes
connect <TAB> # Shows all available servers browser <TAB> # Shows deployed applications
``` ```
## 🔧 Prerequisites ## 🔧 Prerequisites
- Nix with flakes enabled - Nix with flakes enabled
- SSH key at `~/.ssh/id_ed25519.pub` - SSH key at `~/.ssh/id_ed25519.pub`
- HCLOUD_TOKEN for cloud deployment
- 2GB+ RAM for VM testing - 2GB+ RAM for VM testing
- USB drive (8GB+) for workshop distribution
## 🛠️ Development Tools ## 🛠️ Development Tools
@@ -170,7 +166,6 @@ make opencode # Start opencode in dev shell
```bash ```bash
make clean # Clean build artifacts (./build/ and ./result/) make clean # Clean build artifacts (./build/ and ./result/)
make destroy-cloud # Cloud infrastructure
``` ```
## 🔍 Troubleshooting ## 🔍 Troubleshooting

View File

@@ -1,7 +1,6 @@
{ {
pkgs, pkgs,
lib ? pkgs.lib, lib ? pkgs.lib,
cloudServerNames,
isLiveIso ? false, isLiveIso ? false,
... ...
}: }:
@@ -604,11 +603,10 @@ isoConfig
programs.bash.interactiveShellInit = programs.bash.interactiveShellInit =
let let
recipeList = builtins.concatStringsSep " " allRecipes; recipeList = builtins.concatStringsSep " " allRecipes;
serverList = builtins.concatStringsSep " " cloudServerNames;
in in
'' ''
# Workshop Environment Welcome # Workshop Environment Welcome
echo "🚀 CODE CRISPIES Workshop Environment" echo "🚀 SCIENCE IN THE CITY Workshop Environment"
echo "Mode: Local Development (Offline Co-op Cloud)" echo "Mode: Local Development (Offline Co-op Cloud)"
echo "" echo ""
@@ -1208,13 +1206,9 @@ isoConfig
} }
connect() { connect() {
if [[ -z "$1" ]]; then echo "🔌 SSH connection helper (workshop environment)"
echo "Usage: connect <name>" echo "Usage: ssh -o StrictHostKeyChecking=no user@host"
echo "Available: ${serverList}" echo "Note: This workshop focuses on local development only"
return 1
fi
echo "🔌 Connecting to $1.codecrispi.es..."
ssh -o StrictHostKeyChecking=no workshop@$1.codecrispi.es
} }
browser() { browser() {
@@ -1296,35 +1290,35 @@ isoConfig
echo " 4. Use 'browser <app>' to access deployed services" echo " 4. Use 'browser <app>' to access deployed services"
} }
help() { help() {
echo "🚀 CODE CRISPIES Workshop Commands:" echo "🚀 SCIENCE IN THE CITY Workshop Commands:"
echo "" echo ""
echo "🏠 Local Development:" echo "🏠 Local Development:"
echo " setup - Setup local proxy (REQUIRED FIRST!)" echo " setup - Setup local proxy (REQUIRED FIRST!)"
echo " recipes - Show all available apps" echo " recipes - Show all available apps"
echo " deploy <recipe> - Deploy app locally" echo " deploy <recipe> - Deploy app locally"
echo " browser [recipe] - Launch browser [to app]" echo " browser [recipe] - Launch browser [to app]"
echo " desktop - Start GUI session" echo " desktop - Start GUI session"
echo " sudo abra - Run abra CLI directly as root" echo " sudo abra - Run abra CLI directly as root"
echo "" echo ""
echo "🌐 Network:" echo "🌐 Network:"
echo " network_help - Network configuration guide" echo " network_help - Network configuration guide"
echo "" echo ""
echo " Cloud Access:" echo "🔧 Workshop Tools:"
echo " connect <name> - SSH to cloud server" echo " connect - SSH connection helper"
echo " Available: ${serverList}" echo " help - Show this help message"
echo "" echo ""
echo "🔍 Debug:" echo "🔍 Debug:"
echo " docker service ls - List running services" echo " docker service ls - List running services"
echo " systemctl status dnsmasq - Check DNS" echo " systemctl status dnsmasq - Check DNS"
echo " systemctl status workshop-abra-install - Check abra installation" echo " systemctl status workshop-abra-install - Check abra installation"
echo "" echo ""
echo "📚 Learning Flow:" echo "📚 Learning Flow:"
echo " 1. setup" echo " 1. setup"
echo " 2. deploy wordpress" echo " 2. deploy wordpress"
echo " 3. browser wordpress" echo " 3. browser wordpress"
echo " 4. connect hopper" echo " 4. explore workshop environment"
} }
''; '';
programs.firefox = { programs.firefox = {

View File

@@ -2,8 +2,7 @@
### Quick Reference Card ### Quick Reference Card
**Your assigned server:** `__________.codecrispi.es` **Workshop WiFi:** `CODE_CRISPIES` / Password: `scienceinthecity2025`
**Workshop WiFi:** `CODE_CRISPIES_GUEST` / Password: `workshop2024`
--- ---
@@ -72,10 +71,10 @@
## Getting Started Commands ## Getting Started Commands
```bash ```bash
# Connect to your assigned server # Set up your local environment
connect hopper setup
# See available app recipes # See available app recipes
recipes recipes
# Get help # Get help