feat: comprehensive project structure improvements and Cloud for Sovereignty landing zone
- Add Cloud for Sovereignty landing zone architecture and deployment - Implement complete legal document management system - Reorganize documentation with improved navigation - Add infrastructure improvements (Dockerfiles, K8s, monitoring) - Add operational improvements (graceful shutdown, rate limiting, caching) - Create comprehensive project structure documentation - Add Azure deployment automation scripts - Improve repository navigation and organization
This commit is contained in:
59
infra/scripts/azure-deploy.sh
Executable file
59
infra/scripts/azure-deploy.sh
Executable file
@@ -0,0 +1,59 @@
|
||||
#!/bin/bash
|
||||
# Complete Azure deployment script
|
||||
# Uses environment variables from .env file
|
||||
|
||||
set -e
|
||||
|
||||
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
|
||||
PROJECT_ROOT="$(cd "$SCRIPT_DIR/../.." && pwd)"
|
||||
TERRAFORM_DIR="$PROJECT_ROOT/infra/terraform"
|
||||
|
||||
echo "🚀 Starting Azure deployment..."
|
||||
|
||||
# Load environment variables
|
||||
source "$SCRIPT_DIR/azure-load-env.sh"
|
||||
|
||||
# Change to Terraform directory
|
||||
cd "$TERRAFORM_DIR"
|
||||
|
||||
# Initialize Terraform
|
||||
echo "📦 Initializing Terraform..."
|
||||
terraform init
|
||||
|
||||
# Validate configuration
|
||||
echo "✅ Validating Terraform configuration..."
|
||||
terraform validate
|
||||
|
||||
# Plan deployment
|
||||
echo "📋 Planning deployment..."
|
||||
terraform plan -out=tfplan
|
||||
|
||||
# Ask for confirmation
|
||||
read -p "Do you want to apply these changes? (yes/no): " -r
|
||||
if [[ ! $REPLY =~ ^[Yy][Ee][Ss]$ ]]; then
|
||||
echo "Deployment cancelled."
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Apply changes
|
||||
echo "🔨 Applying Terraform configuration..."
|
||||
terraform apply tfplan
|
||||
|
||||
# Get outputs
|
||||
echo ""
|
||||
echo "📊 Deployment outputs:"
|
||||
terraform output
|
||||
|
||||
# Save kubeconfig if AKS was created
|
||||
if terraform output -raw aks_kube_config > /dev/null 2>&1; then
|
||||
KUBECONFIG_FILE="$PROJECT_ROOT/.kube/config"
|
||||
mkdir -p "$(dirname "$KUBECONFIG_FILE")"
|
||||
terraform output -raw aks_kube_config > "$KUBECONFIG_FILE"
|
||||
echo ""
|
||||
echo "✅ Kubernetes config saved to: $KUBECONFIG_FILE"
|
||||
echo " You can now use: kubectl --kubeconfig=$KUBECONFIG_FILE get nodes"
|
||||
fi
|
||||
|
||||
echo ""
|
||||
echo "✅ Azure deployment complete!"
|
||||
|
||||
Reference in New Issue
Block a user