⚠️ For local/lab testing only. This bypasses Azure DevOps pipelines and deploys everything directly from your machine using Terraform, Docker, and kubectl. For the full pipeline-based tutorial, follow the numbered labs instead.
Ensure the following tools are installed:
| Tool | Minimum Version |
|---|---|
| Azure CLI | Latest |
| Terraform | >= 1.14.0 |
| Docker Desktop | Latest |
| kubectl | Latest |
Log in to Azure before running:
az login
az account set --subscription "<your-subscription-id>"The deploy script uses these environment variables (defaults shown):
export PROJECT_NAME="devopsjourneyapr2026" # Prefix for all Azure resources
export LOCATION="uksouth" # Azure regionAKS version note: The deployment targets Kubernetes
1.33. Verify it is available in your chosen region:az aks get-versions --location uksouth --query "values[].version" -o table
Terraform state note: The
admin_object_idinlabs/2-AzureDevOps-Terraform-Pipeline/vars/production.tfvarsmust be set to your Azure AD group or user object ID before deploying. See Lab 1 — Step 3.
Run from the repository root:
# Clone the repository
git clone https://github.com/thomast1906/DevOps-Journey-Using-Azure-DevOps.git
cd DevOps-Journey-Using-Azure-DevOps
# Deploy everything (infrastructure + app)
./scripts/deploy-all.sh
# Clean up all resources when done
./scripts/cleanup-all.shThe deploy script will:
- Check all prerequisites (az, terraform, docker, kubectl)
- Verify Azure authentication
- Create Terraform remote state storage (
devops-journey-rg-apr2026) - Create an Azure AD group for AKS admins
- Run
terraform init / plan / applyfor all infrastructure (ACR, VNet, Log Analytics, AKS, Key Vault, App Insights) in a single apply - Fetch AKS credentials (
kubectlcontext configured automatically) - Build and push the Python/Flask Docker image to ACR
- Update
app.yamlwith the correct image reference - Deploy the application to Kubernetes and wait for rollout
- Print the LoadBalancer URL when ready
| Resource | Name |
|---|---|
| Resource Group | devopsjourneyapr2026-rg |
| AKS Cluster | devopsjourneyapr2026aks (K8s 1.33) |
| ACR | devopsjourneyapr2026acr |
| Key Vault | devopsjourneyapr2026kv |
| App Insights | Workspace-based, connection string |
| Log Analytics | devopsjourneyapr2026 workspace |
| VNet | devopsjourney-vnet (192.168.0.0/16) |
| App | Python 3.13 / Flask 3.1.3 on port 5000 |
| Component | Version |
|---|---|
| Terraform | >= 1.14.0, < 2.0.0 |
| Azure Provider (azurerm) | >= 4.68.0, < 5.0.0 |
| AKS Kubernetes | 1.33 |
| Python base image | 3.13-slim |
| Flask | 3.1.3 |
| azure-monitor-opentelemetry | 1.8.7 |