docs: archive entra materials and simplify deployment docs

This commit is contained in:
defiQUG
2026-04-18 12:05:55 -07:00
parent 0f600e6a31
commit bbb6ce6a6c
256 changed files with 4188 additions and 3881 deletions
@@ -1,7 +1,7 @@
#!/bin/bash
#
# Phase 9: Infrastructure Services Deployment
# Deploy monitoring, logging, and infrastructure services
# Phase 9: Sankofa Edge & Runtime Checks
# Verify the CT and edge services used by the Phoenix-native deployment flow.
#
set -euo pipefail
@@ -10,64 +10,33 @@ SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/config.sh"
log_info "=========================================="
log_info "Phase 9: Infrastructure Services Deployment"
log_info "Phase 9: Sankofa Edge & Runtime Checks"
log_info "=========================================="
# Verify Kubernetes access
if ! kubectl cluster-info &> /dev/null; then
az aks get-credentials --resource-group "${AKS_RESOURCE_GROUP}" \
--name "${AKS_NAME}" \
--overwrite-existing
fi
check_proxmox_access
# 9.1 External Secrets Operator
log_step "9.1 Deploying External Secrets Operator..."
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"
if ! kubectl get crd externalsecrets.external-secrets.io &> /dev/null; then
log_info "Installing External Secrets Operator..."
kubectl apply -f https://external-secrets.io/latest/deploy/ || error_exit "Failed to install"
log_info "Waiting for operator to be ready..."
kubectl wait --for=condition=ready pod \
-l app.kubernetes.io/name=external-secrets \
-n external-secrets-system \
--timeout=300s || log_warning "Operator not ready yet"
else
log_success "External Secrets Operator already installed"
fi
ssh ${SSH_OPTS} "${PROXMOX_SSH_USER}@${ORDER_HAPROXY_HOST}" \
"pct status ${ORDER_HAPROXY_VMID}" \
|| error_exit "The Order HAProxy CT is not available"
# 9.2 Monitoring Stack (Prometheus & Grafana)
log_step "9.2 Deploying monitoring stack..."
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"
if ! command -v helm &> /dev/null; then
log_warning "Helm not found. Install Helm to deploy monitoring stack."
log_info "See: https://helm.sh/docs/intro/install/"
else
if ! helm repo list | grep -q prometheus-community; then
log_info "Adding Prometheus Helm repository..."
helm repo add prometheus-community https://prometheus-community.github.io/helm-charts
helm repo update
fi
if ! helm list -n monitoring | grep -q prometheus; then
log_info "Installing Prometheus stack..."
kubectl create namespace monitoring --dry-run=client -o yaml | kubectl apply -f -
helm install prometheus prometheus-community/kube-prometheus-stack \
--namespace monitoring \
--create-namespace \
|| log_warning "Prometheus installation failed or already exists"
else
log_success "Prometheus already installed"
fi
fi
log_info "Monitoring stack deployment complete"
log_info "Access Grafana: kubectl port-forward svc/prometheus-grafana 3000:80 -n monitoring"
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: Infrastructure Services - COMPLETE"
log_success "Phase 9: Sankofa Edge & Runtime Checks - COMPLETE"
log_success "=========================================="