Files
the_order/scripts/deploy/phase9-infrastructure-services.sh
T

43 lines
1.4 KiB
Bash
Executable File

#!/bin/bash
#
# Phase 9: Sankofa Edge & Runtime Checks
# Verify the CT and edge services used by the Phoenix-native deployment flow.
#
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/config.sh"
log_info "=========================================="
log_info "Phase 9: Sankofa Edge & Runtime Checks"
log_info "=========================================="
check_proxmox_access
log_step "9.1 Verifying CT availability..."
ssh ${SSH_OPTS} "${PROXMOX_SSH_USER}@${ORDER_PORTAL_PUBLIC_HOST}" \
"pct status ${ORDER_PORTAL_PUBLIC_VMID}" \
|| error_exit "The Order public CT is not available"
ssh ${SSH_OPTS} "${PROXMOX_SSH_USER}@${ORDER_HAPROXY_HOST}" \
"pct status ${ORDER_HAPROXY_VMID}" \
|| error_exit "The Order HAProxy CT is not available"
log_step "9.2 Verifying edge health..."
curl -fsS -H "Host: the-order.sankofa.nexus" "http://${ORDER_HAPROXY_IP}/api/health" >/dev/null \
&& log_success "Order HAProxy health check passed" \
|| log_warning "Order HAProxy health check failed"
log_step "9.3 Verifying Phoenix health..."
curl -fsS "${SANKOFA_PHOENIX_URL}/health" >/dev/null \
&& log_success "Phoenix public health check passed" \
|| log_warning "Phoenix public health check failed"
# Save state
save_state "phase9" "complete"
log_success "=========================================="
log_success "Phase 9: Sankofa Edge & Runtime Checks - COMPLETE"
log_success "=========================================="