Enhance ISO build process and documentation for Archipelago
- Updated BUILD-GUIDE.md to clarify instructions for building the Archipelago Auto-Installer ISO, emphasizing the recommended method of building directly on the target server. - Added auto-installation of missing dependencies (xorriso, podman) when running the build script with sudo. - Enhanced the build-auto-installer-iso.sh script to capture container images from the live server, ensuring the ISO includes the same set of applications as the dev server. - Revised deployment documentation to stress the importance of building the Rust backend on the Linux dev server and included new instructions for capturing system-level changes for ISO builds. - Improved UI components and added new bundled applications (BTCPay Server, Mempool Explorer, Nostr Relay, Strfry Relay, Tailscale) to enhance user experience.
This commit is contained in:
@@ -38,6 +38,7 @@ This is where ALL development happens:
|
||||
1. **Snapshot the dev server** (192.168.1.228):
|
||||
- Capture current backend binary (`/usr/local/bin/archipelago`)
|
||||
- Capture current frontend files (`/opt/archipelago/web-ui`)
|
||||
- When `DEV_SERVER` is set: capture container images from the live server so the ISO prepackages current apps
|
||||
- Capture system configs (Nginx, systemd, etc.)
|
||||
- Capture app manifests and configs
|
||||
|
||||
@@ -120,6 +121,12 @@ Creates a live system ISO (boots into a live environment, doesn't install).
|
||||
|
||||
## Deployment to Dev Server
|
||||
|
||||
### Dev server access
|
||||
|
||||
- **Host:** `archipelago@192.168.1.228`
|
||||
- **Password:** `archipelago` — use this for deployment. For non-interactive sync/deploy from scripts or the agent, use: `sshpass -p "archipelago"` (e.g. `sshpass -p "archipelago" rsync ...` or prepend it to ssh/rsync when running `./scripts/deploy-to-target.sh` or equivalent).
|
||||
- **Build approach:** We build **directly on the server** by SSHing in and running `cargo build --release` there. Do not build the backend on macOS and copy the binary.
|
||||
|
||||
### ⚠️ CRITICAL: Backend Compilation Architecture
|
||||
|
||||
**NEVER compile the Rust backend on macOS and deploy to Linux!**
|
||||
@@ -133,23 +140,20 @@ The dev server (`192.168.1.228`) is **x86_64 Linux (Debian 12)**. Binaries compi
|
||||
|
||||
### Deployment Procedures
|
||||
|
||||
1. **Backend** (MUST build on Linux):
|
||||
1. **Backend** (MUST build on Linux — use rsync then build on server):
|
||||
```bash
|
||||
# Option 1: SSH and build directly on server
|
||||
ssh archipelago@192.168.1.228
|
||||
cd ~/archy/core/archipelago
|
||||
source ~/.cargo/env # Load Rust environment
|
||||
cargo build --release --bin archipelago
|
||||
sudo systemctl stop archipelago
|
||||
sudo cp ../target/release/archipelago /usr/local/bin/
|
||||
sudo systemctl start archipelago
|
||||
|
||||
# Option 2: Update source and build remotely
|
||||
# From local machine:
|
||||
scp core/archipelago/src/**/*.rs archipelago@192.168.1.228:~/archy/core/archipelago/src/
|
||||
ssh archipelago@192.168.1.228 'source ~/.cargo/env && cd ~/archy/core/archipelago && cargo build --release'
|
||||
ssh archipelago@192.168.1.228 'sudo systemctl stop archipelago && sudo cp ~/archy/core/target/release/archipelago /usr/local/bin/ && sudo systemctl start archipelago'
|
||||
# From project root. Sync source to server (exclude local target/.git).
|
||||
sshpass -p "archipelago" rsync -avz --exclude target --exclude .git -e "ssh -o StrictHostKeyChecking=no" \
|
||||
core/ archipelago@192.168.1.228:~/archy/core/
|
||||
|
||||
# Build on server and deploy binary
|
||||
sshpass -p "archipelago" ssh -o StrictHostKeyChecking=no archipelago@192.168.1.228 \
|
||||
'source ~/.cargo/env && cd ~/archy/core/archipelago && cargo build --release && \
|
||||
sudo systemctl stop archipelago && \
|
||||
sudo cp ~/archy/core/target/release/archipelago /usr/local/bin/ && \
|
||||
sudo systemctl start archipelago'
|
||||
```
|
||||
**Do not** build the binary on macOS and copy it; always rsync source and build on the server.
|
||||
|
||||
2. **Frontend** (can build locally):
|
||||
```bash
|
||||
@@ -175,16 +179,17 @@ The dev server (`192.168.1.228`) is **x86_64 Linux (Debian 12)**. Binaries compi
|
||||
### 🚨 NEVER VIOLATE THESE
|
||||
|
||||
1. **ALWAYS deploy to the live development server (192.168.1.228)** for testing
|
||||
2. **🔴 NEVER EVER compile the Rust backend on macOS and deploy to Linux**
|
||||
2. **After every change: sync and build on the live server.** When you finish implementing a feature or fix, run the deploy script so the live server has the latest code. Command: `./scripts/deploy-to-target.sh --live` (from project root). If SSH is not available in the current environment, tell the user to run it locally. Do not skip this step. **App UIs** (e.g. `docker/lnd-ui/`, `docker/bitcoin-ui/`) are served by their own containers; the deploy script rebuilds the LND UI image and restarts its container so changes to the LND UI are visible after deploy.
|
||||
3. **🔴 NEVER EVER compile the Rust backend on macOS and deploy to Linux**
|
||||
- Dev server is `x86_64 Linux (Debian 12)`
|
||||
- Always build backend **ON the Linux server** using `source ~/.cargo/env && cargo build --release`
|
||||
- macOS binaries will cause "Exec format error" and break the system
|
||||
- Frontend (Vue.js) CAN be built on macOS - it's just HTML/CSS/JS
|
||||
3. **The ISO must capture the CURRENT STATE of the dev server**, not build from source
|
||||
4. **Frontend build output is in `web/dist/neode-ui/`**, NOT `neode-ui/dist/`
|
||||
5. **Nginx serves on port 80** and proxies backend on `localhost:5678`
|
||||
6. **App icons are in `neode-ui/public/assets/img/app-icons/`**
|
||||
7. **The auto-installer ISO is the ONLY way to deploy** - no live systems
|
||||
4. **The ISO must capture the CURRENT STATE of the dev server**, not build from source
|
||||
5. **Frontend build output is in `web/dist/neode-ui/`**, NOT `neode-ui/dist/`
|
||||
6. **Nginx serves on port 80** and proxies backend on `localhost:5678`
|
||||
7. **App icons are in `neode-ui/public/assets/img/app-icons/`**
|
||||
8. **The auto-installer ISO is the ONLY way to deploy** - no live systems
|
||||
|
||||
## Testing Checklist
|
||||
|
||||
|
||||
Reference in New Issue
Block a user