Files
proxmox/scripts/create-alltra-nodes.sh
defiQUG fbda1b4beb
Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
docs: Ledger Live integration, contract deploy learnings, NEXT_STEPS updates
- ADD_CHAIN138_TO_LEDGER_LIVE: Ledger form done; public code review repo bis-innovations/LedgerLive; init/push commands
- CONTRACT_DEPLOYMENT_RUNBOOK: Chain 138 gas price 1 gwei, 36-addr check, TransactionMirror workaround
- CONTRACT_*: AddressMapper, MirrorManager deployed 2026-02-12; 36-address on-chain check
- NEXT_STEPS_FOR_YOU: Ledger done; steps completable now (no LAN); run-completable-tasks-from-anywhere
- MASTER_INDEX, OPERATOR_OPTIONAL, SMART_CONTRACTS_INVENTORY_SIMPLE: updates
- LEDGER_BLOCKCHAIN_INTEGRATION_COMPLETE: bis-innovations/LedgerLive reference

Co-authored-by: Cursor <cursoragent@cursor.com>
2026-02-12 15:46:57 -08:00

56 lines
3.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Create ALLTRA Network Nodes (9 nodes)
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "$PROJECT_ROOT/config/ip-addresses.conf"
TEMPLATE="local:vztmpl/debian-12-standard_12.12-1_amd64.tar.zst"
STORAGE="local-lvm"
NETWORK="vmbr0"
GATEWAY="${NETWORK_GATEWAY:-192.168.11.1}"
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
RED='\033[0;31m'
BLUE='\033[0;34m'
NC='\033[0m'
log() { echo -e "${BLUE}[INFO]${NC} $1"; }
success() { echo -e "${GREEN}[✓]${NC} $1"; }
warn() { echo -e "${YELLOW}[WARN]${NC} $1"; }
error() { echo -e "${RED}[ERROR]${NC} $1"; }
exists() {
local vmid=$1
local host=$2
ssh -o StrictHostKeyChecking=no root@${host} "pct list 2>/dev/null | grep -q '^[[:space:]]*$vmid[[:space:]]' && echo 'yes' || echo 'no'"
}
create() {
local vmid=$1 hostname=$2 ip=$3 mem=$4 cores=$5 disk=$6 desc="$7" host=$8
if [[ "$(exists $vmid $host)" == "yes" ]]; then
warn "Container $vmid already exists, skipping..."
return 0
fi
log "Creating $vmid: $hostname ($ip) on $host..."
ssh -o StrictHostKeyChecking=no root@${host} "pct create $vmid $TEMPLATE --hostname $hostname --memory $((mem * 1024)) --cores $cores --rootfs $STORAGE:${disk} --net0 name=eth0,bridge=$NETWORK,ip=$ip/24,gw=$GATEWAY --description \"$desc\" --start 1 --onboot 1 --unprivileged 0 2>&1 | grep -v 'WARNING: Ignoring duplicate' || true"
if [[ "$(exists $vmid $host)" == "yes" ]]; then
success "Container $vmid created successfully"
return 0
else
error "Failed to create container $vmid"
return 1
fi
}
log "Creating ALLTRA Network nodes..."
create 1505 "besu-sentry-alltra-1" "${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}}}3" 4 2 100 "Besu Sentry ALLTRA 1" "${PROXMOX_HOST_ML110}" &
create 1506 "besu-sentry-alltra-2" "${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-${IP_SERVICE_21:-192.168.11.21}}}}}4" 4 2 100 "Besu Sentry ALLTRA 2" "${PROXMOX_HOST_ML110}" &
create 2500 "besu-rpc-alltra-1" "${IP_SERVICE_172:-${IP_SERVICE_172:-192.168.11.172}}" 16 4 200 "Besu RPC ALLTRA 1" "${PROXMOX_HOST_R630_01}" &
create 2501 "besu-rpc-alltra-2" "${IP_SERVICE_173:-${IP_SERVICE_173:-192.168.11.173}}" 16 4 200 "Besu RPC ALLTRA 2" "${PROXMOX_HOST_R630_01}" &
create 2502 "besu-rpc-alltra-3" "${IP_SERVICE_174:-${IP_SERVICE_174:-192.168.11.174}}" 16 4 200 "Besu RPC ALLTRA 3" "${PROXMOX_HOST_R630_01}" &
wait
create 6202 "firefly-alltra-1" "${IP_FIREFLY_ALLTRA_1:-192.168.11.175}" 4 2 50 "Firefly ALLTRA 1" "${PROXMOX_HOST_R630_02}" &
create 6203 "firefly-alltra-2" "${IP_FIREFLY_ALLTRA_2:-192.168.11.176}" 4 2 50 "Firefly ALLTRA 2" "${PROXMOX_HOST_R630_02}" &
create 5201 "cacti-alltra-1" "${IP_CACTI_ALLTRA:-192.168.11.177}" 4 2 50 "Cacti ALLTRA" "${PROXMOX_HOST_R630_01}" &
create 6001 "fabric-alltra-1" "${IP_FABRIC_ALLTRA:-192.168.11.178}" 8 4 100 "Fabric ALLTRA" "${PROXMOX_HOST_R630_01}" &
create 6401 "indy-alltra-1" "${IP_INDY_ALLTRA:-192.168.11.179}" 8 4 100 "Indy ALLTRA" "${PROXMOX_HOST_R630_01}" &
wait
log "ALLTRA node creation complete!"
success "Created 9 ALLTRA network nodes"