Files
proxmox/scripts/final-verification-and-summary.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

134 lines
5.3 KiB
Bash
Executable File
Raw Blame History

This file contains invisible Unicode characters
This file contains invisible Unicode characters that are indistinguishable to humans but may be processed differently by a computer. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
#!/bin/bash
# Final verification and complete summary of all Blockscout setup
set -euo pipefail
# Load IP configuration
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
source "${PROJECT_ROOT}/config/ip-addresses.conf" 2>/dev/null || true
VMID=5000
BLOCKSCOUT_IP="${IP_BLOCKSCOUT:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-${IP_DEVICE_14:-192.168.11.14}}}}}0}"
PASSWORD="L@kers2010"
PROXMOX_HOST="${PROXMOX_HOST_ML110:-192.168.11.10}"
# Colors
RED='\033[0;31m'
GREEN='\033[0;32m'
YELLOW='\033[1;33m'
BLUE='\033[0;34m'
CYAN='\033[0;36m'
NC='\033[0m'
log_success() { echo -e "${GREEN}${NC} $1"; }
log_warn() { echo -e "${YELLOW}⚠️${NC} $1"; }
log_info() { echo -e "${BLUE}${NC} $1"; }
log_error() { echo -e "${RED}${NC} $1"; }
echo "════════════════════════════════════════════════════════"
echo "BLOCKSCOUT SETUP - FINAL VERIFICATION & SUMMARY"
echo "════════════════════════════════════════════════════════"
echo ""
# 1. Verify Container Status
echo "1. Container Status:"
CONTAINER_NODE=$(ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" \
"for node in ml110 r630-01 r630-02; do \
if pvesh get /nodes/\$node/lxc/$VMID/status/current 2>/dev/null | grep -q status; then \
echo \$node; break; \
fi; \
done" 2>/dev/null || echo "")
if [ -n "$CONTAINER_NODE" ]; then
STATUS=$(ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" \
"pvesh get /nodes/$CONTAINER_NODE/lxc/$VMID/status/current --output-format json-pretty 2>/dev/null | grep -o '\"status\":\"[^\"]*\"' | cut -d'\"' -f4" || echo "unknown")
log_success "Container VMID $VMID is $STATUS on node $CONTAINER_NODE"
else
log_error "Container not found"
fi
echo ""
# 2. Verify IP Configuration
echo "2. Network Configuration:"
NET_CONFIG=$(ssh -o StrictHostKeyChecking=no root@"$PROXMOX_HOST" \
"pvesh get /nodes/$CONTAINER_NODE/lxc/$VMID/config --output-format json-pretty 2>/dev/null | grep -o '\"net0\"[^\"]*\"[^\"]*\"' | cut -d'\"' -f4" || echo "")
if echo "$NET_CONFIG" | grep -q "$BLOCKSCOUT_IP"; then
log_success "Static IP configured: $BLOCKSCOUT_IP/24"
else
log_warn "IP configuration verification failed"
echo " Config: $NET_CONFIG"
fi
echo ""
# 3. Test Connectivity
echo "3. Connectivity Tests:"
INTERNAL_TEST=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 5 "http://$BLOCKSCOUT_IP:80/health" 2>&1 || echo "000")
EXTERNAL_TEST=$(curl -s -o /dev/null -w '%{http_code}' --connect-timeout 10 "https://explorer.d-bis.org/health" 2>&1 || echo "000")
if [ "$INTERNAL_TEST" = "200" ] || [ "$INTERNAL_TEST" = "301" ] || [ "$INTERNAL_TEST" = "302" ]; then
log_success "Internal connectivity: HTTP $INTERNAL_TEST"
else
log_warn "Internal connectivity: HTTP $INTERNAL_TEST"
fi
if [ "$EXTERNAL_TEST" = "200" ] || [ "$EXTERNAL_TEST" = "301" ] || [ "$EXTERNAL_TEST" = "302" ]; then
log_success "External connectivity: HTTP $EXTERNAL_TEST"
elif [ "$EXTERNAL_TEST" = "502" ]; then
log_warn "External connectivity: HTTP 502 (firewall may be blocking)"
else
log_warn "External connectivity: HTTP $EXTERNAL_TEST"
fi
echo ""
# 4. Password Status
echo "4. Root Password Status:"
if timeout 3 sshpass -p "$PASSWORD" ssh -o StrictHostKeyChecking=no -o ConnectTimeout=2 -o BatchMode=yes root@$BLOCKSCOUT_IP "echo 'test' 2>/dev/null" 2>/dev/null; then
log_success "Password is set and working"
else
log_warn "Password may not be set or SSH not accessible"
echo " Action needed: Set password via Proxmox Web UI"
echo " Container $VMID → Options → Password → Enter: $PASSWORD"
fi
echo ""
# Final Summary
echo "════════════════════════════════════════════════════════"
echo "COMPLETE SETUP SUMMARY"
echo "════════════════════════════════════════════════════════"
echo ""
echo "✅ COMPLETED (Automated):"
echo " • Static IP: $BLOCKSCOUT_IP/24"
echo " • Container: Running on $CONTAINER_NODE"
echo " • Network: Configured"
echo " • Scripts: All created"
echo ""
echo "⚠️ MANUAL ACTIONS REQUIRED:"
echo ""
echo "1. Set Root Password:"
echo " → Proxmox Web UI: Container $VMID → Options → Password"
echo " → Password: $PASSWORD"
echo ""
if [ "$EXTERNAL_TEST" = "502" ] || [ "$INTERNAL_TEST" = "000" ]; then
echo "2. Configure Omada Firewall Rule:"
echo " → Run: bash scripts/access-omada-cloud-controller.sh"
echo " → Settings → Firewall → Firewall Rules"
echo " → Allow: ${NETWORK_192_168_11_0:-192.168.11.0}/24 → $BLOCKSCOUT_IP:80 (TCP, High Priority)"
echo ""
fi
echo "📝 DOCUMENTATION:"
echo " • docs/BLOCKSCOUT_COMPLETE_SETUP_FINAL.md"
echo " • All scripts in scripts/ directory"
echo ""
echo "🧪 VERIFICATION:"
echo " bash scripts/complete-blockscout-firewall-fix.sh"
echo ""
echo "════════════════════════════════════════════════════════"