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.
This commit is contained in:
defiQUG
2025-12-12 14:57:48 -08:00
parent a1466e4005
commit 1fb7266469
1720 changed files with 241279 additions and 16 deletions

View File

@@ -1,17 +1,32 @@
#!/bin/bash
#!/usr/bin/env bash
# Import all existing resources into Terraform state
# Fixes "already exists" errors
set -e
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "$SCRIPT_DIR/../lib/init.sh"
SCRIPT_NAME="import-all-resources.sh"
SCRIPT_DESC="Import existing Azure resources into state; supports old/new region codes"
SCRIPT_USAGE="${SCRIPT_NAME} [--region <code>] [--dry-run] [--help]"
SCRIPT_OPTIONS="--region <code> Region filter (3-char or legacy 2-char)\n--dry-run Print import commands only\n--help Show help"
SCRIPT_REQUIREMENTS="Azure CLI, Terraform (if using terraform import)"
handle_help "${1:-}"
DRY_RUN="${DRY_RUN:-0}"
run() {
if [ "$DRY_RUN" = "1" ]; then
echo "[DRY RUN] $*"; return 0
fi
"$@"
}
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
TERRAFORM_DIR="$PROJECT_ROOT/terraform/well-architected/cloud-sovereignty"
cd "$TERRAFORM_DIR"
echo "=== Importing All Existing Resources ==="
echo ""
# Region code mapping (supports both old 2-char and new 3-char codes for backward compatibility)
# Standard codes are now 3 characters, but we maintain old mappings for existing resources
@@ -92,7 +107,6 @@ declare -A OLD_CODE_TO_REGION=(
SUBSCRIPTION_ID="fc08d829-4f14-413d-ab27-ce024425db0b"
echo "Step 1: Importing West Europe Admin Resources"
echo ""
# Import West Europe resource groups (using new 3-char code)
for rg_type in compute network storage security monitoring identity; do
@@ -113,12 +127,10 @@ for rg_type in compute network storage security monitoring identity; do
resource_id="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${rg_name}"
echo "Importing $rg_name..."
terraform import "module.admin_region[0].azurerm_resource_group.${rg_type}" "$resource_id" 2>&1 | grep -E "Import|Imported|Error" || echo " ⚠️ Already in state or failed"
run terraform import "module.admin_region[0].azurerm_resource_group.${rg_type}" "$resource_id" 2>&1 | grep -E "Import|Imported|Error" || echo " ⚠️ Already in state or failed"
done
echo ""
echo "Step 2: Importing Existing AKS Clusters"
echo ""
# Get all existing clusters
CLUSTERS=$(az aks list --subscription "$SUBSCRIPTION_ID" --query "[?contains(name, 'az-p-')].{name:name, rg:resourceGroup}" -o json)
@@ -145,10 +157,8 @@ echo "$CLUSTERS" | jq -r '.[] | "\(.rg)|\(.name)"' | while IFS='|' read -r rg na
echo "Importing $name ($region)..."
resource_id="/subscriptions/${SUBSCRIPTION_ID}/resourceGroups/${rg}/providers/Microsoft.ContainerService/managedClusters/${name}"
terraform import "module.region_deployment[\"$region\"].azurerm_kubernetes_cluster.main[0]" "$resource_id" 2>&1 | grep -E "Import|Imported|Error" | tail -1 || echo " ⚠️ Import failed or already in state"
run terraform import "module.region_deployment[\"$region\"].azurerm_kubernetes_cluster.main[0]" "$resource_id" 2>&1 | grep -E "Import|Imported|Error" | tail -1 || echo " ⚠️ Import failed or already in state"
done
echo ""
echo "=== ✅ Import Complete ==="
echo ""
echo "Next: Run terraform apply to continue deployment"