Files
smom-dbis-138/scripts/deployment/fix-aks-deployment.sh
defiQUG 1fb7266469 Add Oracle Aggregator and CCIP Integration
- Introduced Aggregator.sol for Chainlink-compatible oracle functionality, including round-based updates and access control.
- Added OracleWithCCIP.sol to extend Aggregator with CCIP cross-chain messaging capabilities.
- Created .gitmodules to include OpenZeppelin contracts as a submodule.
- Developed a comprehensive deployment guide in NEXT_STEPS_COMPLETE_GUIDE.md for Phase 2 and smart contract deployment.
- Implemented Vite configuration for the orchestration portal, supporting both Vue and React frameworks.
- Added server-side logic for the Multi-Cloud Orchestration Portal, including API endpoints for environment management and monitoring.
- Created scripts for resource import and usage validation across non-US regions.
- Added tests for CCIP error handling and integration to ensure robust functionality.
- Included various new files and directories for the orchestration portal and deployment scripts.
2025-12-12 14:57:48 -08:00

64 lines
2.1 KiB
Bash
Executable File

#!/usr/bin/env bash
# Fix AKS Deployment Issues
set -e
cd "$(dirname "$0")/../.."
# Color codes
echo "==================================================================="
echo " FIXING AKS DEPLOYMENT CONFIGURATION"
echo "==================================================================="
# Check if cluster exists in old subscription
OLD_SUB="6d3c4263-bba9-497c-8843-eae6c4e87192"
NEW_SUB="fc08d829-4f14-413d-ab27-ce024425db0b"
RG_NAME="az-p-we-rg-comp-001"
CLUSTER_NAME="az-p-we-aks-main"
log_info "Checking for existing cluster..."
# Try old subscription
az account set --subscription "$OLD_SUB" 2>/dev/null || true
if az aks show --resource-group "$RG_NAME" --name "$CLUSTER_NAME" &> /dev/null 2>&1; then
log_warn "⚠️ Cluster exists in old subscription: $OLD_SUB"
echo " Options:"
echo " 1. Import cluster to new subscription (complex)"
echo " 2. Create new cluster in new subscription (recommended)"
echo " 3. Use existing cluster from old subscription"
log_warn "⚠️ For now, we'll create a new cluster in the new subscription"
fi
# Switch to new subscription
az account set --subscription "$NEW_SUB"
log_success "✅ Using subscription: $NEW_SUB"
# Check if cluster exists in new subscription
if az aks show --resource-group "$RG_NAME" --name "$CLUSTER_NAME" &> /dev/null 2>&1; then
log_success "✅ Cluster exists in new subscription"
else
log_warn "⚠️ Cluster does not exist in new subscription"
echo " Will be created by Terraform"
fi
log_info "Checking Terraform state..."
cd terraform
# Check if cluster is in state
if terraform state list 2>/dev/null | grep -q "module.aks.azurerm_kubernetes_cluster.main"; then
log_warn "⚠️ Cluster found in Terraform state"
echo " May need to remove from state if it's in wrong subscription"
echo " Run: terraform state rm module.aks.azurerm_kubernetes_cluster.main"
else
log_success "✅ Cluster not in Terraform state (will be created)"
fi
cd ..
log_info "Next Steps:"
echo "1. Fix auto-scaling configuration in Terraform"
echo "2. Remove cluster from state if needed"
echo "3. Apply Terraform to create cluster in new subscription"