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)
- **Local VM**: `make vm` (Starts local VM that simulates USB environment)
- **Test**: `make status-cloud` (Health checks for cloud infrastructure)
- **Deploy**: `make deploy-cloud` (Deploys 15 VMs to Hetzner Cloud)
- **Test**: `make usb-test` (Test USB environment in QEMU)
- **Deploy**: `make usb-build` (Build workshop USB ISO)
- **Format**: `make format` (Format Nix files)
## Code Style Guidelines
@@ -27,32 +27,32 @@ This file provides guidelines for AI coding agents operating within this reposit
## Container Architecture
- **Local VM**: Provides infrastructure to deploy up to 15 containers on demand (matching production count)
- **Container Names**: hopper, curie, lovelace, noether, hamilton, franklin, johnson, clarke, goldberg, liskov, wing, rosen, shaw, karp, rich
- **Networking**: Private networking with NAT for local development
- **DNS**: Local `.local` domain resolution for testing
- **Local VM**: Provides self-contained workshop environment
- **Container Names**: workshop-local (single container environment)
- **Networking**: Local networking with DNS resolution
- **DNS**: `*.workshop.local` domain resolution for testing
## Available Scripts
- `connect <name>` - SSH into specific container
- `containers` - List all containers with IPs
- `logs` - Show container setup logs
- `setup` - Initialize local workshop environment
- `deploy <recipe>` - Deploy Co-op Cloud applications
- `browser [app]` - Open applications in Firefox
- `recipes` - Display available Co-op Cloud recipes
- `help` - Show command help
## Development Workflow
1. Use `make vm-run` for local development
2. Test with all 15 containers to match production
1. Use `make vm` for local development testing
2. Test workshop environment with `make usb-test`
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
- Keep code concise and readable
- Prefer declarative over imperative approaches
- 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
- **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
@@ -12,9 +12,8 @@ make vm
make usb-build
make usb-flash USB_DEVICE=/dev/sdX
# 3. Deploy cloud infrastructure
export HCLOUD_TOKEN="your_token"
make deploy-cloud
# 3. Test your USB build
make usb-test
```
## 🎯 Learning Flow
@@ -27,12 +26,10 @@ deploy wordpress # Deploy locally
browser wordpress # Open directly in Firefox
```
### Cloud Deployment
### Local Practice Only
```bash
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
# Focus on local development and testing
# All deployment happens locally on your USB/VM
```
## 🗃️ Architecture
@@ -41,7 +38,7 @@ abra app deploy blog.hopper.codecrispi.es
- **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.)
- **Local Environment**: Self-contained workshop environment
- **Wildcard DNS**: `*.workshop.local` resolves to `127.0.0.1` via dnsmasq
## 💾 USB Environment
@@ -60,14 +57,13 @@ make usb-build
make usb-flash USB_DEVICE=/dev/sdb
```
## 🌐 Cloud Deployment
## 🧪 Testing & Validation
Creates 15 Hetzner VMs at `{name}.codecrispi.es`:
Test your workshop environment:
```bash
export HCLOUD_TOKEN="your_token"
make deploy-cloud
make status-cloud # Check health
make usb-test # Test ISO in QEMU
make status-local # Check local services
```
## 🖥️ Local Development
@@ -131,7 +127,7 @@ Based on Co-op Cloud with quality scoring:
- `recipes` - Show complete Co-op Cloud catalog
- `deploy <app>` - Deploy locally with tab completion
- `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
- `help` - Show all commands and debug info
@@ -146,15 +142,15 @@ browser # Opens Firefox with blank page
# Use tab completion
deploy <TAB> # Shows all available recipes
connect <TAB> # Shows all available servers
browser <TAB> # Shows deployed applications
```
## 🔧 Prerequisites
- Nix with flakes enabled
- SSH key at `~/.ssh/id_ed25519.pub`
- HCLOUD_TOKEN for cloud deployment
- 2GB+ RAM for VM testing
- USB drive (8GB+) for workshop distribution
## 🛠️ Development Tools
@@ -170,7 +166,6 @@ make opencode # Start opencode in dev shell
```bash
make clean # Clean build artifacts (./build/ and ./result/)
make destroy-cloud # Cloud infrastructure
```
## 🔍 Troubleshooting

View File

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

View File

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