Revise BUILD-GUIDE and enhance ISO build process

- Updated BUILD-GUIDE.md to streamline instructions for building the Archipelago Auto-Installer ISO, including prerequisites and post-installation steps.
- Added detailed sections on capturing the live server state and building from source.
- Enhanced Docker and Podman integration in build scripts for improved backend and web UI capture.
- Introduced new app metadata for "IndeedHub" in the Docker package scanner and updated UI components for better installation progress tracking.
- Improved styling and functionality in the Bitcoin UI for a more cohesive user experience.
This commit is contained in:
Dorian
2026-02-03 21:43:33 +00:00
parent 0f40cb88b5
commit 337ebee510
22 changed files with 2619 additions and 509 deletions
+86
View File
@@ -0,0 +1,86 @@
# Archipelago ISO Build - Quick Guide
## TL;DR - Build ISO with Live Server State
```bash
cd ~/archy/image-recipe
sudo bash build-auto-installer-iso.sh
```
The script will automatically:
1. Try to capture backend from `/usr/local/bin/archipelago`
2. Try to capture frontend from `/opt/archipelago/web-ui`
3. Fall back to building from source if capture fails
## Build Modes
### Default: Capture from Dev Server (RECOMMENDED)
```bash
# From your Mac (captures from remote dev server):
cd image-recipe
DEV_SERVER=archipelago@192.168.1.228 sudo bash build-auto-installer-iso.sh
# From the dev server itself:
cd ~/archy/image-recipe
sudo bash build-auto-installer-iso.sh
```
### Alternative: Build from Source
```bash
BUILD_FROM_SOURCE=1 sudo bash build-auto-installer-iso.sh
```
## Known Issues & Workarounds
### Issue: Can't capture from localhost via SCP
**Problem**: When running on the server itself, `scp localhost:/path` doesn't work.
**Workaround**: Use direct file copy instead:
```bash
# Instead of building on the server, build from your Mac:
cd ~/Projects/archy/image-recipe
DEV_SERVER=archipelago@192.168.1.228 sudo bash build-auto-installer-iso.sh
```
### Issue: Podman registry not configured
**Problem**: Podman can't pull images because `/etc/containers/registries.conf` has no unqualified-search registries.
**Fix**:
```bash
ssh archipelago@192.168.1.228
sudo tee -a /etc/containers/registries.conf <<EOF
[registries.search]
registries = ['docker.io']
EOF
```
## Flash ISO to USB
```bash
cd ~/Projects/archy/image-recipe
./write-usb-dd.sh /dev/diskX
```
## What Gets Captured
From your dev server (192.168.1.228):
- ✅ Backend binary: `/usr/local/bin/archipelago` (6.2M)
- ✅ Frontend: `/opt/archipelago/web-ui` (~64M)
- ✅ Nginx config: `/etc/nginx/sites-available/default`
- ✅ Systemd service: `/etc/systemd/system/archipelago.service`
- ✅ App manifests: `~/archy/apps/`
## Current Status
**Latest Working ISO**: `archipelago-debian-12-x86_64.iso` (469M, built 18:28)
- This ISO was built earlier today
- Contains the auto-installer
- **Should be tested** - might already have your live server state
## Next Steps
1. **Flash the existing ISO** and test it on the Dell OptiPlex
2. **Fix the build script** to properly capture from localhost (use `cp` instead of `scp`)
3. **Configure Podman registries** on dev server for fallback source builds
+118 -38
View File
@@ -5,17 +5,29 @@
# This creates an ISO that automatically installs to the internal disk
# with minimal user interaction - similar to StartOS experience.
#
# CRITICAL: This script CAPTURES the LIVE SERVER state by default.
# Set DEV_SERVER to point to your development server.
#
# Usage:
# DEV_SERVER=archipelago@192.168.1.228 ./build-auto-installer-iso.sh
# OR just: ./build-auto-installer-iso.sh (uses default server)
#
# To build from source instead:
# BUILD_FROM_SOURCE=1 ./build-auto-installer-iso.sh
#
# Features:
# - Pre-built root filesystem (no network needed during install)
# - Auto-detects internal disk (skips USB boot drive)
# - Automatic installation with progress display
# - Boots directly to web UI after install
#
# Usage: ./build-auto-installer-iso.sh
#
set -e
# Configuration
DEV_SERVER="${DEV_SERVER:-archipelago@192.168.1.228}"
BUILD_FROM_SOURCE="${BUILD_FROM_SOURCE:-0}"
SCRIPT_DIR="$(cd "$(dirname "$0")" && pwd)"
WORK_DIR="$SCRIPT_DIR/build/auto-installer"
OUTPUT_DIR="$SCRIPT_DIR/results"
@@ -26,6 +38,13 @@ echo "╔═══════════════════════
echo "║ Building Archipelago Auto-Installer ISO (StartOS-like) ║"
echo "╚════════════════════════════════════════════════════════════════╝"
echo ""
if [ "$BUILD_FROM_SOURCE" = "1" ]; then
echo "📦 Mode: Building from SOURCE CODE"
else
echo "📦 Mode: Capturing LIVE SERVER state"
echo " Server: $DEV_SERVER"
fi
echo ""
# Check for required tools
check_tools() {
@@ -243,53 +262,114 @@ mkdir -p "$ARCH_DIR/scripts"
echo " Including root filesystem..."
cp "$ROOTFS_TAR" "$ARCH_DIR/rootfs.tar"
# Build and copy backend binary
echo " Building backend binary for Linux x86_64..."
BACKEND_DOCKERFILE="$WORK_DIR/Dockerfile.backend"
cat > "$BACKEND_DOCKERFILE" <<'BACKENDFILE'
# Capture backend binary from live server
if [ "$BUILD_FROM_SOURCE" = "1" ]; then
echo " Building backend binary from source..."
else
echo " Capturing backend binary from live server..."
fi
# Try to get from live server first (unless BUILD_FROM_SOURCE=1)
BACKEND_CAPTURED=0
if [ "$BUILD_FROM_SOURCE" != "1" ]; then
# Check if we're running on the server itself (localhost or same machine)
if [ "$DEV_SERVER" = "localhost" ] || [ "$DEV_SERVER" = "127.0.0.1" ]; then
# Direct copy from local filesystem
if [ -f "/usr/local/bin/archipelago" ]; then
cp "/usr/local/bin/archipelago" "$ARCH_DIR/bin/archipelago"
chmod +x "$ARCH_DIR/bin/archipelago"
echo " ✅ Backend captured from local system ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
BACKEND_CAPTURED=1
fi
else
# Remote copy via SCP
if scp "$DEV_SERVER:/usr/local/bin/archipelago" "$ARCH_DIR/bin/archipelago" 2>/dev/null; then
chmod +x "$ARCH_DIR/bin/archipelago"
echo " ✅ Backend captured from remote server ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
BACKEND_CAPTURED=1
fi
fi
fi
if [ "$BACKEND_CAPTURED" = "0" ]; then
if [ "$BUILD_FROM_SOURCE" != "1" ]; then
echo " ⚠️ Could not capture from live server, building from source..."
fi
BACKEND_DOCKERFILE="$WORK_DIR/Dockerfile.backend"
cat > "$BACKEND_DOCKERFILE" <<'BACKENDFILE'
FROM rust:1.93-bookworm as builder
WORKDIR /build
COPY core ./core
RUN cd core && cargo build --release --bin archipelago
BACKENDFILE
if $CONTAINER_CMD build --platform linux/amd64 -t archipelago-backend -f "$BACKEND_DOCKERFILE" "$SCRIPT_DIR/.." 2>&1 | tail -20; then
echo " Extracting backend binary..."
BACKEND_CONTAINER=$($CONTAINER_CMD create --platform linux/amd64 archipelago-backend)
$CONTAINER_CMD cp "$BACKEND_CONTAINER:/build/core/target/release/archipelago" "$ARCH_DIR/bin/" && \
echo " ✅ Backend binary included ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
$CONTAINER_CMD rm "$BACKEND_CONTAINER"
else
echo " ⚠️ Backend build failed - using existing binary if available"
if [ -f "$SCRIPT_DIR/../core/target/release/archipelago" ]; then
cp "$SCRIPT_DIR/../core/target/release/archipelago" "$ARCH_DIR/bin/"
echo " Using local backend binary (may not be compatible)"
if $CONTAINER_CMD build --platform linux/amd64 -t archipelago-backend -f "$BACKEND_DOCKERFILE" "$SCRIPT_DIR/.." 2>&1 | tail -20; then
echo " Extracting backend binary..."
BACKEND_CONTAINER=$($CONTAINER_CMD create --platform linux/amd64 archipelago-backend)
$CONTAINER_CMD cp "$BACKEND_CONTAINER:/build/core/target/release/archipelago" "$ARCH_DIR/bin/" && \
echo " ✅ Backend binary built ($(du -h "$ARCH_DIR/bin/archipelago" | cut -f1))"
$CONTAINER_CMD rm "$BACKEND_CONTAINER"
else
echo " Backend build failed and server capture failed"
exit 1
fi
fi
# Build and copy web UI
echo " Building web UI..."
cd "$SCRIPT_DIR/../neode-ui"
if npm run build 2>&1 | tail -5; then
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
echo " Including web UI from web/dist/neode-ui..."
cp -r "$SCRIPT_DIR/../web/dist/neode-ui" "$ARCH_DIR/web-ui"
echo " ✅ Web UI included ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))"
fi
# Capture web UI from live server
if [ "$BUILD_FROM_SOURCE" = "1" ]; then
echo " Building web UI from source..."
else
echo " ⚠️ Web UI build failed"
# Try to use existing build
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
echo " Using existing web UI build..."
cp -r "$SCRIPT_DIR/../web/dist/neode-ui" "$ARCH_DIR/web-ui"
elif [ -d "$SCRIPT_DIR/../neode-ui/dist" ]; then
echo " Using neode-ui/dist..."
cp -r "$SCRIPT_DIR/../neode-ui/dist" "$ARCH_DIR/web-ui"
echo " Capturing web UI from live server..."
fi
mkdir -p "$ARCH_DIR/web-ui"
# Try to get from live server first (unless BUILD_FROM_SOURCE=1)
WEBUI_CAPTURED=0
if [ "$BUILD_FROM_SOURCE" != "1" ]; then
# Check if we're running on the server itself
if [ "$DEV_SERVER" = "localhost" ] || [ "$DEV_SERVER" = "127.0.0.1" ]; then
# Direct copy from local filesystem
if [ -d "/opt/archipelago/web-ui" ] && [ "$(ls -A /opt/archipelago/web-ui 2>/dev/null)" ]; then
cp -r /opt/archipelago/web-ui/* "$ARCH_DIR/web-ui/"
echo " ✅ Web UI captured from local system ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))"
WEBUI_CAPTURED=1
fi
else
echo " ❌ No web UI available"
# Remote copy via rsync
if rsync -az "$DEV_SERVER:/opt/archipelago/web-ui/" "$ARCH_DIR/web-ui/" 2>/dev/null && [ "$(ls -A "$ARCH_DIR/web-ui")" ]; then
echo " ✅ Web UI captured from remote server ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))"
WEBUI_CAPTURED=1
fi
fi
fi
cd "$SCRIPT_DIR"
if [ "$WEBUI_CAPTURED" = "0" ]; then
if [ "$BUILD_FROM_SOURCE" != "1" ]; then
echo " ⚠️ Could not capture from live server, building from source..."
fi
cd "$SCRIPT_DIR/../neode-ui"
if npm run build 2>&1 | tail -5; then
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
echo " Including web UI from web/dist/neode-ui..."
cp -r "$SCRIPT_DIR/../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/"
echo " ✅ Web UI built ($(du -sh "$ARCH_DIR/web-ui" | cut -f1))"
fi
else
echo " ⚠️ Web UI build failed"
# Try to use existing build
if [ -d "$SCRIPT_DIR/../web/dist/neode-ui" ]; then
echo " Using existing web UI build..."
cp -r "$SCRIPT_DIR/../web/dist/neode-ui/"* "$ARCH_DIR/web-ui/"
elif [ -d "$SCRIPT_DIR/../neode-ui/dist" ]; then
echo " Using neode-ui/dist..."
cp -r "$SCRIPT_DIR/../neode-ui/dist/"* "$ARCH_DIR/web-ui/"
else
echo " ❌ No web UI available"
exit 1
fi
fi
cd "$SCRIPT_DIR"
fi
# Copy app manifests
if [ -d "$SCRIPT_DIR/../apps" ]; then
@@ -792,8 +872,8 @@ cat > "$OVERLAY_DIR/etc/profile.d/z99-archipelago-installer.sh" <<'AUTOSTART'
#!/bin/bash
# Auto-start Archipelago installer on login
# Only run once, only in interactive terminal, only for regular users
if [ -n "$INSTALLER_STARTED" ] || [ ! -t 0 ]; then
# Only run once
if [ -n "$INSTALLER_STARTED" ]; then
return 0 2>/dev/null || exit 0
fi
export INSTALLER_STARTED=1