fix: make building on start-dev.sh opt in

This commit is contained in:
Julian Sommer
2026-02-25 08:33:51 +10:00
parent e08b8140a6
commit 1910347cce
6 changed files with 25 additions and 19 deletions
+3 -3
View File
@@ -745,9 +745,9 @@ All three processes will exit with a cluster summary once formation is complete.
Start services on each node (in separate terminals or background):
```bash
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node1/
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node2/
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node3/
./scripts/start-dev.sh ~/node1/
./scripts/start-dev.sh ~/node2/
./scripts/start-dev.sh ~/node3/
```
### Option B: Real Multi-Node (Physical Servers)
+3 -3
View File
@@ -74,13 +74,13 @@ echo "Step 2: Starting Services"
echo "========================="
# Start node 1 first (Predastore needs quorum)
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node1/ &
UI=false ./scripts/start-dev.sh ~/node1/ &
sleep 5
# Start nodes 2 and 3
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node2/ &
UI=false ./scripts/start-dev.sh ~/node2/ &
sleep 2
HIVE_SKIP_BUILD=true UI=false ./scripts/start-dev.sh ~/node3/ &
UI=false ./scripts/start-dev.sh ~/node3/ &
# Wait for all start scripts to finish
wait
+1 -1
View File
@@ -158,7 +158,7 @@ for i in $(seq 0 $((NODE_COUNT - 1))); do
ip="${MGMT_IPS[$i]}"
(
echo " node$((i + 1)) ($ip): starting services..."
remote "$ip" "export PATH=\$PATH:/usr/local/go/bin && cd ~/Development/mulga/hive && HIVE_SKIP_BUILD=true ./scripts/start-dev.sh"
remote "$ip" "export PATH=\$PATH:/usr/local/go/bin && cd ~/Development/mulga/hive && ./scripts/start-dev.sh"
echo " node$((i + 1)) ($ip): services started"
) &
PIDS+=($!)
+16 -10
View File
@@ -2,12 +2,12 @@
# Start Hive development environment
# This script starts all required services in the correct order using Hive service commands
# Usage: ./scripts/start-dev.sh [data-dir]
# Usage: ./scripts/start-dev.sh [--build] [data-dir]
# --build: Rebuild all binaries before starting (default: skip build)
# data-dir: Optional data directory path (default: ~/hive)
#
# Environment variables:
# UI=false Skip starting Hive UI (e.g., UI=false ./scripts/start-dev.sh)
# HIVE_SKIP_BUILD=true Skip building binaries before starting
set -e
@@ -15,8 +15,15 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
MULGA_ROOT="$(cd "$PROJECT_ROOT/.." && pwd)"
# Accept optional data directory argument
DATA_DIR="${1:-$HOME/hive}"
# Parse arguments
BUILD=false
DATA_DIR="$HOME/hive"
for arg in "$@"; do
case "$arg" in
--build) BUILD=true ;;
*) DATA_DIR="$arg" ;;
esac
done
# Configuration paths
# Use CONFIG_DIR environment variable if set, otherwise derive from DATA_DIR
@@ -166,8 +173,8 @@ check_service() {
}
# Pre-flight, compile latest
if [ "$HIVE_SKIP_BUILD" != "true" ]; then
# Pre-flight, compile latest (only with --build flag)
if [ "$BUILD" = "true" ]; then
echo "✈️ Pre-flight, compiling latest..."
echo " Building hive..."
@@ -183,7 +190,7 @@ if [ "$HIVE_SKIP_BUILD" != "true" ]; then
echo " ✅ Build complete"
else
echo "✈️ Skipping build (HIVE_SKIP_BUILD=true)"
echo "✈️ Skipping build (pass --build to rebuild)"
fi
# 0️⃣ Verify OVN networking readiness (required — blocks service startup)
@@ -306,9 +313,8 @@ if has_service "viperblock"; then
if [ ! -f "$NBD_PLUGIN_PATH" ]; then
echo " ⚠️ NBD plugin not found at $NBD_PLUGIN_PATH"
echo " Building Viperblock first..."
cd "$MULGA_ROOT/viperblock"
make build
echo " Building Viperblock NBD plugin..."
cd "$MULGA_ROOT/viperblock" && make build
cd "$PROJECT_ROOT"
fi
+1 -1
View File
@@ -187,7 +187,7 @@ start_node_services() {
echo "Starting services for node$node_num at $node_ip..."
# Start all services - each node's config binds to its specific IP
HIVE_SKIP_BUILD=true ./scripts/start-dev.sh "$data_dir"
./scripts/start-dev.sh "$data_dir"
echo "Node$node_num services started"
}
+1 -1
View File
@@ -78,7 +78,7 @@ sudo update-ca-certificates
# Ensure logs directory exists for start-dev.sh
mkdir -p ~/hive/logs
mkdir -p /mnt/ramdisk
HIVE_SKIP_BUILD=true ./scripts/start-dev.sh
./scripts/start-dev.sh
# Wait for health checks on https://localhost:9999 (AWS Gateway)
echo "Waiting for AWS Gateway..."