- 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.
39 lines
1.4 KiB
Bash
Executable File
39 lines
1.4 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
# Fix cluster state by deleting failed/canceled clusters and recreating them
|
|
# This resolves import issues with clusters in bad states
|
|
|
|
set -e
|
|
|
|
SUBSCRIPTION_ID="fc08d829-4f14-413d-ab27-ce024425db0b"
|
|
|
|
echo "=== Fixing Cluster State ==="
|
|
echo ""
|
|
echo "This will delete failed/canceled clusters so Terraform can recreate them"
|
|
echo ""
|
|
|
|
# Get failed and canceled clusters
|
|
FAILED_CLUSTERS=$(az aks list --subscription "$SUBSCRIPTION_ID" --query "[?contains(name, 'az-p-') && (provisioningState == 'Failed' || provisioningState == 'Canceled')].{name:name, rg:resourceGroup, state:provisioningState}" -o json)
|
|
|
|
CLUSTER_COUNT=$(echo "$FAILED_CLUSTERS" | jq '. | length')
|
|
echo "Found $CLUSTER_COUNT failed/canceled clusters"
|
|
echo ""
|
|
|
|
if [ "$CLUSTER_COUNT" -eq 0 ]; then
|
|
echo "✅ No failed/canceled clusters found"
|
|
exit 0
|
|
fi
|
|
|
|
echo "Deleting failed/canceled clusters..."
|
|
echo ""
|
|
|
|
echo "$FAILED_CLUSTERS" | jq -r '.[] | "\(.rg)|\(.name)|\(.state)"' | while IFS='|' read -r rg name state; do
|
|
echo "Deleting $name ($state) in $rg..."
|
|
az aks delete --name "$name" --resource-group "$rg" --subscription "$SUBSCRIPTION_ID" --yes --no-wait 2>&1 | grep -E "Deleted|Deleting|Error" || echo " ⚠️ Delete initiated"
|
|
done
|
|
|
|
echo ""
|
|
echo "=== ✅ Delete Initiated ==="
|
|
echo ""
|
|
echo "Clusters are being deleted in the background."
|
|
echo "Wait 5-10 minutes, then re-run Terraform deployment."
|