Appearance
Environments Overview
Microtec ERP operates across five isolated Azure environments. Each environment has its own VNet, Azure Container Apps environment, Key Vault, ACR, and domain. There is no VNet peering between environments — full isolation is enforced at the network layer.
Environment Comparison Table
| Environment | VNet CIDR | Key Vault | Domain | Auto-deploy | Purpose |
|---|---|---|---|---|---|
| dev | 10.0.0.0/16 | mic-erp-be-dev-skv | microtec-test.com | Yes | Development and feature testing |
| stage | 10.1.0.0/16 | mic-erp-stg-kv | microtecstage.com | Yes | Integration and QA |
| preprod | 10.6.0.0/16 | mic-erp-be-preprod-skv | (preprod domain) | Yes | Pre-production validation |
| uat | 10.5.0.0/16 | mic-erp-uat-kv | microtec-uat.com | Yes | User acceptance testing |
| production | 10.2.0.0/16 | (production KV) | onlinemicrotec.com.sa | Approval required | Live customer environment |
Critical: The preprod VNet is 10.6.0.0/16, not 10.3.0.0/16. Some older documents incorrectly show 10.3 — always use 10.6 for preprod. See preprod.md for details.
Deployment Flow
Developer pushes code
│
▼
┌──────────────┐
│ dev env │ ← Auto-deploy on merge to main/master
│ microtec-test│
└──────┬───────┘
│
▼
┌──────────────┐
│ stage env │ ← Auto-deploy on merge to stage branch
│microtecstage │
└──────┬───────┘
│
▼
┌──────────────┐
│ preprod env │ ← Auto-deploy on merge to preprod branch
│ (validation) │
└──────┬───────┘
│
▼
┌──────────────┐
│ uat env │ ← Auto-deploy on merge to uat branch
│microtec-qual │
└──────┬───────┘
│ Manual approval gate
▼
┌──────────────┐
│ production │ ← Approval required; deployment window enforced
│onlinemicrotec│
└──────────────┘Branch → Environment Mapping
The pipeline uses a condition-based branch mapping defined in Devops/azure/templates/containerBackend/deploy/deploy-services.yml:
| Branch Pattern | Environment | Notes |
|---|---|---|
main, master, production | Production | Requires approval |
stage, staging | Stage | Auto-deploy |
PreProd, preprod | PreProd | Auto-deploy |
uat | UAT | Auto-deploy |
| All others | Dev | Auto-deploy |
Resource Naming by Environment
All resources follow the naming convention from MEMORY.md:
| Resource Type | Pattern | Dev Example | Prod Example |
|---|---|---|---|
| Resource Group (BE) | mic-erp-be-{env}-{purpose}-rg | mic-erp-be-dev-network-rg | mic-erp-be-production-network-rg |
| Resource Group (FE) | mic-erp-fr-{env}-{purpose}-rg | mic-erp-fr-dev-app-rg | mic-erp-fr-production-app-rg |
| ACR | micerpbe{env}acr (no dashes) | micerpbedevacr | micerpbeproductionacr |
| Storage (FE) | micerpfr{env}sa (no dashes) | micerpfrdevsa | micerpfrproductionsa |
| Key Vault | Inconsistent — use actual live names | mic-erp-be-dev-skv | See production.md |
Warning: ACR and Storage Account names are alphanumeric only (Azure restriction). Use the formula
replace('mic-erp-be-{env}-acr', '-', '').
Infrastructure per Environment
Each environment provisions:
| Resource | Count | Notes |
|---|---|---|
| Virtual Network | 1 | /16 CIDR, 4 subnets |
| Azure Container Apps Environment (Public) | 1 | Gateway + Keycloak |
| Azure Container Apps Environment (Private) | 1 | All other services, VNet-internal |
| Azure Container Registry | 1 | Per-environment, no cross-env access |
| Azure Key Vault | 1 | See table above for actual names |
| Azure Service Bus | 1 | Standard tier (dev/stage), Premium (prod) |
| Redis Cache | 1 | Standard (dev/stage), Premium (prod) |
| Application Insights | 1 | Log Analytics workspace |
| Private DNS Zones | 12 | See networking docs |
Shared Resources (Cross-Environment)
Some resources are shared across environments and must not be modified per-environment:
| Resource | RG | Notes |
|---|---|---|
| SQL Server VM | mic-backend-shared-sql-rg | Hosts all tenant databases; do NOT rename this RG |
| Build Agents | mic-build-agents-rg | eg-build-01, 02, 05 — see MEMORY.md |
Key Vault Name Inconsistency
Note: Key Vault names in this platform are inconsistent across environments (they were not always renamed when the naming convention changed). Always use the actual live names, not a formula:
| Environment | Key Vault Name |
|---|---|
| dev | mic-erp-be-dev-skv |
| stage | mic-erp-stg-kv |
| preprod | mic-erp-be-preprod-skv |
| uat | mic-erp-uat-kv |
| production | See production.md |