Files
proxmox/scripts/besu-deploy-allowlist.sh.bak
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

73 lines
2.6 KiB
Bash
Executable File

#!/bin/bash
# Deploy corrected allowlist files to all Proxmox containers
# Usage: bash besu-deploy-allowlist.sh <static-nodes.json> <permissions-nodes.toml> [proxmox-host]
set -euo pipefail
PROXMOX_HOST="${3:-192.168.11.10}"
STATIC_NODES_FILE="${1:-static-nodes.json}"
PERMISSIONS_TOML_FILE="${2:-permissions-nodes.toml}"
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
if [[ ! -f "$STATIC_NODES_FILE" ]] || [[ ! -f "$PERMISSIONS_TOML_FILE" ]]; then
echo "ERROR: Files not found:" >&2
[[ ! -f "$STATIC_NODES_FILE" ]] && echo " - $STATIC_NODES_FILE" >&2
[[ ! -f "$PERMISSIONS_TOML_FILE" ]] && echo " - $PERMISSIONS_TOML_FILE" >&2
exit 1
fi
# Validate files first
echo "Validating files before deployment..."
if ! bash "${SCRIPT_DIR}/besu-validate-allowlist.sh" "$STATIC_NODES_FILE" "$PERMISSIONS_TOML_FILE"; then
echo "ERROR: Validation failed. Fix files before deploying." >&2
exit 1
fi
echo ""
echo "Deploying to Proxmox host: $PROXMOX_HOST"
# Copy files to host
scp -o StrictHostKeyChecking=accept-new \
"$STATIC_NODES_FILE" \
"$PERMISSIONS_TOML_FILE" \
"root@${PROXMOX_HOST}:/tmp/"
# Deploy to all containers
# Updated VMIDs for RPC nodes:
# Core/Public/Private: 2500→2101, 2501→2201, 2502→2301
# Tenant RPCs: 2503→2303, 2504→2304, 2505→2305, 2506→2306, 2507→2307, 2508→2308
# Thirdweb RPCs: 2400→2401, 2401→2402, 2402→2403
for vmid in 1000 1001 1002 1003 1004 1500 1501 1502 1503 2101 2201 2301 2303 2304 2305 2306 2307 2308 2401 2402 2403; do
echo "Deploying to container $vmid..."
ssh -o StrictHostKeyChecking=accept-new "root@${PROXMOX_HOST}" << DEPLOY_SCRIPT
if ! pct status $vmid 2>/dev/null | grep -q running; then
echo " Container $vmid not running, skipping"
exit 0
fi
pct push $vmid /tmp/$(basename $STATIC_NODES_FILE) /etc/besu/static-nodes.json
pct push $vmid /tmp/$(basename $PERMISSIONS_TOML_FILE) /etc/besu/permissions-nodes.toml
pct exec $vmid -- chown besu:besu /etc/besu/static-nodes.json /etc/besu/permissions-nodes.toml
if pct exec $vmid -- test -f /etc/besu/static-nodes.json && \
pct exec $vmid -- test -f /etc/besu/permissions-nodes.toml; then
echo " ✓ Container $vmid: Files deployed"
else
echo " ✗ Container $vmid: Deployment failed"
fi
DEPLOY_SCRIPT
done
# Cleanup
ssh -o StrictHostKeyChecking=accept-new "root@${PROXMOX_HOST}" \
"rm -f /tmp/$(basename $STATIC_NODES_FILE) /tmp/$(basename $PERMISSIONS_TOML_FILE)"
echo ""
echo "✓ Deployment complete"
echo ""
echo "Next steps:"
echo "1. Restart Besu services on all containers"
echo "2. Run verification: bash ${SCRIPT_DIR}/besu-verify-peers.sh <rpc-url>"