Some checks failed
Deploy to Phoenix / deploy (push) Has been cancelled
- 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>
85 lines
3.8 KiB
Bash
Executable File
85 lines
3.8 KiB
Bash
Executable File
#!/bin/bash
|
|
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
|
|
|
|
|
|
# Comprehensive Service Verification and Testing
|
|
NODE_IP="${PROXMOX_HOST_R630_01}"
|
|
|
|
log_info() { echo -e "\033[0;32m[INFO]\033[0m $1"; }
|
|
log_success() { echo -e "\033[0;32m[✓]\033[0m $1"; }
|
|
log_error() { echo -e "\033[0;31m[✗]\033[0m $1"; }
|
|
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo "Comprehensive Service Verification"
|
|
echo "═══════════════════════════════════════════════════════════"
|
|
echo ""
|
|
|
|
# Verify PostgreSQL
|
|
echo "=== PostgreSQL Services ==="
|
|
for vmid in 10000 10001 10100 10101; do
|
|
status=$(ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- systemctl is-active postgresql@15-main 2>/dev/null && echo 'active' || \
|
|
pct enter $vmid -- docker ps 2>/dev/null | grep -q postgres && echo 'docker-active' || echo 'inactive'")
|
|
if [ "$status" = "active" ] || [ "$status" = "docker-active" ]; then
|
|
log_success "CT $vmid: $status"
|
|
# Test connection
|
|
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- bash -c 'PGPASSWORD=postgres psql -h localhost -U postgres -c \"SELECT version();\" 2>/dev/null | head -1' || echo 'Connection test pending'"
|
|
else
|
|
log_error "CT $vmid: $status"
|
|
fi
|
|
done
|
|
|
|
# Verify Redis
|
|
echo ""
|
|
echo "=== Redis Services ==="
|
|
for vmid in 10020 10120; do
|
|
status=$(ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- systemctl is-active redis-server 2>/dev/null && echo 'active' || \
|
|
pct enter $vmid -- docker ps 2>/dev/null | grep -q redis && echo 'docker-active' || echo 'inactive'")
|
|
if [ "$status" = "active" ] || [ "$status" = "docker-active" ]; then
|
|
log_success "CT $vmid: $status"
|
|
# Test connection
|
|
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- redis-cli ping 2>/dev/null || echo 'Connection test pending'"
|
|
else
|
|
log_error "CT $vmid: $status"
|
|
fi
|
|
done
|
|
|
|
# Verify Node.js
|
|
echo ""
|
|
echo "=== Node.js Runtime ==="
|
|
for vmid in 10030 10040 10050 10060 10070 10080 10090 10091 10092 10130 10150 10151; do
|
|
status=$(ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- bash -c 'node --version 2>/dev/null || /opt/bin/node --version 2>/dev/null || /usr/local/bin/node --version 2>/dev/null && echo \"installed\" || echo \"not installed\"'")
|
|
if [ "$status" != "not installed" ]; then
|
|
log_success "CT $vmid: $status"
|
|
else
|
|
log_error "CT $vmid: $status"
|
|
fi
|
|
done
|
|
|
|
# Test inter-service connectivity
|
|
echo ""
|
|
echo "=== Inter-Service Connectivity ==="
|
|
log_info "Testing database connectivity from application containers..."
|
|
for vmid in 10030 10150; do
|
|
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- bash -c 'timeout 5 bash -c \"</dev/tcp/${ORDER_POSTGRES_PRIMARY:-192.168.11.44}/5432\" 2>/dev/null && echo \"CT $vmid: Can reach PostgreSQL\" || echo \"CT $vmid: Cannot reach PostgreSQL\"'"
|
|
done
|
|
|
|
log_info "Testing Redis connectivity..."
|
|
for vmid in 10030 10150; do
|
|
ssh -o ConnectTimeout=5 -o StrictHostKeyChecking=no root@${NODE_IP} \
|
|
"pct enter $vmid -- bash -c 'timeout 5 bash -c \"</dev/tcp/${ORDER_REDIS_IP:-192.168.11.38}/6379\" 2>/dev/null && echo \"CT $vmid: Can reach Redis\" || echo \"CT $vmid: Cannot reach Redis\"'"
|
|
done
|
|
|
|
echo ""
|
|
echo "Verification complete!"
|