Files
the_order/scripts/deploy/phase5-container-registry.sh
defiQUG 8649ad4124 feat: implement naming convention, deployment automation, and infrastructure updates
- Add comprehensive naming convention (provider-region-resource-env-purpose)
- Implement Terraform locals for centralized naming
- Update all Terraform resources to use new naming convention
- Create deployment automation framework (18 phase scripts)
- Add Azure setup scripts (provider registration, quota checks)
- Update deployment scripts config with naming functions
- Create complete deployment documentation (guide, steps, quick reference)
- Add frontend portal implementations (public and internal)
- Add UI component library (18 components)
- Enhance Entra VerifiedID integration with file utilities
- Add API client package for all services
- Create comprehensive documentation (naming, deployment, next steps)

Infrastructure:
- Resource groups, storage accounts with new naming
- Terraform configuration updates
- Outputs with naming convention examples

Deployment:
- Automated deployment scripts for all 15 phases
- State management and logging
- Error handling and validation

Documentation:
- Naming convention guide and implementation summary
- Complete deployment guide (296 steps)
- Next steps and quick start guides
- Azure prerequisites and setup completion docs

Note: ESLint warnings present - will be addressed in follow-up commit
2025-11-12 08:22:51 -08:00

65 lines
1.7 KiB
Bash
Executable File

#!/bin/bash
#
# Phase 5: Container Registry Setup
# Configure Azure Container Registry and attach to AKS
#
set -euo pipefail
SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
source "${SCRIPT_DIR}/config.sh"
log_info "=========================================="
log_info "Phase 5: Container Registry Setup"
log_info "=========================================="
# 5.1 Verify ACR exists
log_step "5.1 Verifying Azure Container Registry..."
ACR_EXISTS=$(az acr show \
--name "${ACR_NAME}" \
--resource-group "${AKS_RESOURCE_GROUP}" \
--query name -o tsv 2>/dev/null || echo "")
if [ -z "${ACR_EXISTS}" ]; then
log_warning "ACR ${ACR_NAME} not found"
log_info "ACR should be created by Terraform"
log_info "Skipping ACR configuration"
exit 0
fi
log_success "ACR found: ${ACR_NAME}"
# 5.2 Configure ACR access
log_step "5.2 Configuring ACR access..."
# Enable admin user (or use managed identity)
az acr update --name "${ACR_NAME}" --admin-enabled true \
|| log_warning "Failed to enable admin user (may already be enabled)"
# 5.3 Attach ACR to AKS
log_step "5.3 Attaching ACR to AKS..."
az aks update \
--name "${AKS_NAME}" \
--resource-group "${AKS_RESOURCE_GROUP}" \
--attach-acr "${ACR_NAME}" \
|| log_warning "Failed to attach ACR (may already be attached)"
log_success "ACR attached to AKS"
# 5.4 Test ACR access
log_step "5.4 Testing ACR access..."
az acr login --name "${ACR_NAME}" || error_exit "Failed to login to ACR"
log_success "ACR access verified"
# Save state
save_state "phase5" "complete"
log_success "=========================================="
log_success "Phase 5: Container Registry - COMPLETE"
log_success "=========================================="