Some checks failed
API CI / API Lint (push) Successful in 47s
API CI / API Type Check (push) Failing after 47s
API CI / API Test (push) Successful in 1m0s
API CI / API Build (push) Failing after 50s
API CI / Build Docker Image (push) Has been skipped
Build Crossplane Provider / build (push) Failing after 5m51s
CD Pipeline / Deploy to Staging (push) Failing after 29s
CI Pipeline / Lint and Type Check (push) Failing after 36s
CI Pipeline / Build (push) Has been skipped
CI Pipeline / Test Backend (push) Failing after 1m33s
CI Pipeline / Test Frontend (push) Failing after 30s
CI Pipeline / Security Scan (push) Failing after 1m16s
Crossplane Provider CI / Go Test (push) Failing after 3m23s
Crossplane Provider CI / Go Lint (push) Failing after 7m27s
Crossplane Provider CI / Go Build (push) Failing after 3m27s
Deploy to Staging / Deploy to Staging (push) Failing after 30s
Portal CI / Portal Lint (push) Failing after 21s
Portal CI / Portal Type Check (push) Failing after 21s
Portal CI / Portal Test (push) Failing after 21s
Portal CI / Portal Build (push) Failing after 22s
Test Suite / frontend-tests (push) Failing after 30s
Test Suite / api-tests (push) Failing after 49s
Test Suite / blockchain-tests (push) Failing after 30s
Type Check / type-check (map[directory:. name:root]) (push) Failing after 23s
Type Check / type-check (map[directory:api name:api]) (push) Failing after 21s
Type Check / type-check (map[directory:portal name:portal]) (push) Failing after 19s
Validate Configuration Files / validate (push) Failing after 1m52s
CD Pipeline / Deploy to Production (push) Has been skipped
Co-authored-by: Cursor <cursoragent@cursor.com>
138 lines
3.6 KiB
Bash
Executable File
138 lines
3.6 KiB
Bash
Executable File
#!/bin/bash
|
|
# Deploy All Production VMs
|
|
# Deploys all VMs in the correct order according to the deployment plan
|
|
|
|
set -e
|
|
|
|
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
|
PROJECT_ROOT="$(cd "$SCRIPT_DIR/.." && pwd)"
|
|
|
|
GREEN='\033[0;32m'
|
|
YELLOW='\033[1;33m'
|
|
RED='\033[0;31m'
|
|
BLUE='\033[0;34m'
|
|
NC='\033[0m'
|
|
|
|
echo "=========================================="
|
|
echo "VM Deployment Script"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Check if kubectl is available
|
|
if ! command -v kubectl &> /dev/null; then
|
|
echo -e "${RED}Error: kubectl not found${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
# Check if we can connect to cluster
|
|
if ! kubectl cluster-info &> /dev/null; then
|
|
echo -e "${RED}Error: Cannot connect to Kubernetes cluster${NC}"
|
|
exit 1
|
|
fi
|
|
|
|
# Function to deploy and wait
|
|
deploy_vm() {
|
|
local file=$1
|
|
local name=$(basename "$file" .yaml)
|
|
|
|
echo -e "${BLUE}Deploying $name...${NC}"
|
|
if kubectl apply -f "$file" &>/dev/null; then
|
|
echo -e "${GREEN}✓${NC} $name deployed"
|
|
return 0
|
|
else
|
|
echo -e "${RED}✗${NC} $name deployment failed"
|
|
return 1
|
|
fi
|
|
}
|
|
|
|
# Phase 1: Core Infrastructure
|
|
echo "=========================================="
|
|
echo "Phase 1: Core Infrastructure"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
deploy_vm "$PROJECT_ROOT/examples/production/nginx-proxy-vm.yaml"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/phoenix/dns-primary.yaml"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/cloudflare-tunnel-vm.yaml"
|
|
|
|
echo ""
|
|
sleep 2
|
|
|
|
# Phase 2: Phoenix Infrastructure
|
|
echo "=========================================="
|
|
echo "Phase 2: Phoenix Infrastructure"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
PHOENIX_VMS=(
|
|
"examples/production/phoenix/git-server.yaml"
|
|
"examples/production/phoenix/email-server.yaml"
|
|
"examples/production/phoenix/devops-runner.yaml"
|
|
"examples/production/phoenix/codespaces-ide.yaml"
|
|
"examples/production/phoenix/as4-gateway.yaml"
|
|
"examples/production/phoenix/business-integration-gateway.yaml"
|
|
"examples/production/phoenix/financial-messaging-gateway.yaml"
|
|
)
|
|
|
|
for vm in "${PHOENIX_VMS[@]}"; do
|
|
deploy_vm "$PROJECT_ROOT/$vm"
|
|
done
|
|
|
|
echo ""
|
|
sleep 2
|
|
|
|
# Phase 3: Blockchain Infrastructure
|
|
echo "=========================================="
|
|
echo "Phase 3: Blockchain Infrastructure"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Validators
|
|
echo -e "${BLUE}Deploying Validators...${NC}"
|
|
for i in {1..4}; do
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/validator-0$i.yaml"
|
|
done
|
|
|
|
echo ""
|
|
|
|
# Sentries
|
|
echo -e "${BLUE}Deploying Sentries...${NC}"
|
|
for i in {1..4}; do
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/sentry-0$i.yaml"
|
|
done
|
|
|
|
echo ""
|
|
|
|
# RPC Nodes
|
|
echo -e "${BLUE}Deploying RPC Nodes...${NC}"
|
|
for i in {1..4}; do
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/rpc-node-0$i.yaml"
|
|
done
|
|
|
|
echo ""
|
|
|
|
# Services
|
|
echo -e "${BLUE}Deploying Services...${NC}"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/management.yaml"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/monitoring.yaml"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/services.yaml"
|
|
deploy_vm "$PROJECT_ROOT/examples/production/smom-dbis-138/blockscout.yaml"
|
|
|
|
echo ""
|
|
echo "=========================================="
|
|
echo "Deployment Complete"
|
|
echo "=========================================="
|
|
echo ""
|
|
|
|
# Show status
|
|
echo "VM Status:"
|
|
kubectl get proxmoxvm -A --sort-by=.metadata.name 2>&1 | head -35
|
|
|
|
echo ""
|
|
echo "To monitor deployment:"
|
|
echo " kubectl get proxmoxvm -A -w"
|
|
echo ""
|
|
echo "To check provider logs:"
|
|
echo " kubectl logs -n crossplane-system -l app=crossplane-provider-proxmox -f"
|
|
|