This directory contains automation scripts to help deploy and manage the Three Horizons Platform infrastructure and applications.
Complete end-to-end deployment script for Red Hat Developer Hub on AKS or ARO.
Features:
- Validates prerequisites and Azure environment
- Deploys complete infrastructure using Bicep templates
- Installs and configures Developer Hub
- Sets up ingress, SSL certificates, and DNS
- Configures all necessary integrations
Usage:
# Deploy to development on AKS
./deploy-developer-hub.sh -e dev -p aks -l centralus
# Deploy to production on ARO
./deploy-developer-hub.sh -e prod -p aro -l eastus
# Deploy only Developer Hub (infrastructure already exists)
./deploy-developer-hub.sh --skip-infra
# Dry run to see what would be deployed
./deploy-developer-hub.sh --dry-runOptions:
-e, --environment: Environment (dev/test/prod)-p, --platform: Platform (aks/aro)-l, --location: Azure region-n, --name: Base name for resources--skip-infra: Skip infrastructure deployment--skip-validation: Skip prerequisite validation--dry-run: Show what would be deployed
Validates Azure environment readiness before deployment.
Checks:
- Required tools installation and versions
- Azure authentication and permissions
- Location availability and services
- Resource provider registration
- Quota availability
- Network configuration
- Cost estimation
Usage:
# Validate default location (centralus)
./validate-deployment.sh
# Validate specific location
./validate-deployment.sh eastusOutput:
- Detailed validation report
- Warnings for non-critical issues
- Errors that must be fixed
- Cost estimates
- Next steps
Post-deployment configuration for Developer Hub integrations.
Configures:
- GitHub OAuth authentication
- GitHub integration token
- Software catalog import
- Azure integration
- Template configuration
- TechDocs storage
Usage:
# Run after Developer Hub deployment
./configure-integrations.shInteractive prompts for:
- GitHub OAuth credentials
- GitHub Personal Access Token
- Azure Service Principal creation
- Storage account configuration
Updates all references from old "templates" directory to new "resources" directory.
Usage:
python update_templates_to_resources.pyConverts ARM templates to Bicep format.
Features:
- Validates Bicep installation
- Converts JSON ARM templates to Bicep
- Shows conversion warnings
- Optional validation after conversion
Usage:
# Convert single ARM template
./arm-to-bicep.sh template.json
# Result: creates template.bicep# Check prerequisites
./validate-deployment.sh centralus
# Review validation results and fix any errors# Deploy complete platform with Developer Hub
./deploy-developer-hub.sh -e dev -p aks -l centralus
# Save the PostgreSQL password shown!# Configure integrations
./configure-integrations.sh
# Follow prompts to set up:
# - GitHub OAuth App
# - GitHub Personal Access Token
# - Azure integration-
GitHub Personal Access Token
- Scopes:
repo,workflow,read:org,read:user - Used for: Repository access, catalog import
- Scopes:
-
GitHub OAuth App
- Create at: GitHub Settings > Developer settings > OAuth Apps
- Callback URL:
https://<devhub-url>/api/auth/github/handler/frame
-
Azure Subscription
- Role: Contributor or Owner
- Resource providers must be registered
-
Service Principal (created by script)
- For Developer Hub Azure integration
- Contributor role on subscription
After successful deployment, you'll receive:
-
deployment-info.json
- Resource group names
- Cluster details
- Service URLs
- Resource identifiers
-
devhub-config-summary.txt
- Developer Hub URL
- Configuration status
- Troubleshooting commands
- Next steps
-
Authentication Errors
az login az account set --subscription <subscription-id>
-
Quota Exceeded
# Check quotas az vm list-usage --location centralus -o table -
Developer Hub Not Accessible
# Check pod status kubectl get pods -n rhdh # Check logs kubectl logs -n rhdh -l app=developer-hub
-
SSL Certificate Issues
# Check cert-manager kubectl get certificates -n rhdh kubectl describe certificate developer-hub-tls -n rhdh
# Get cluster credentials
az aks get-credentials --resource-group <rg> --name <cluster>
# Check Developer Hub status
kubectl get all -n rhdh
# View Developer Hub logs
kubectl logs -n rhdh deployment/developer-hub -f
# Restart Developer Hub
kubectl rollout restart deployment/developer-hub -n rhdh
# Check ingress IP
kubectl get svc -n ingress-nginx- Red Hat Developer Hub Documentation
- Backstage.io Documentation
- Azure Kubernetes Service Documentation
- Azure Red Hat OpenShift Documentation
When adding new scripts:
- Follow the existing naming convention
- Add comprehensive help/usage information
- Include error handling and validation
- Update this README with documentation
- Test on both AKS and ARO platforms