Skip to content

Development Environment

The development environment is the first environment in the Microtec deployment pipeline. It receives automatic deployments on every merge to the default branch and is used for integration testing, exploratory development, and developer-facing demos.


Environment Snapshot

PropertyValue
Environment namedev
VNet CIDR10.0.0.0/16
Domainmicrotec-test.com
Key Vaultmic-erp-be-dev-skv
ACRmicerpbedevacr
Branch triggerAny branch (auto-deploys on push)
Approval gateNone
SLABest-effort (no uptime commitment)

Subnets

SubnetCIDRHosts
Public (CAE)10.0.1.0/24Gateway, Keycloak
Private (CAE)10.0.2.0/23All backend microservices
App Service10.0.4.0/24App Service integration
Function Apps10.0.5.0/24Function App integration
Private Endpoints10.0.6.0/24PaaS private endpoints (SQL, Redis, etc.)

Who Uses Dev

RoleUsage
Backend developersTest API changes immediately after merge
Frontend developersPoint Angular apps at gateway.microtec-test.com
QA engineersEarly feature verification before stage
DevOps engineersInfrastructure change validation
Product managersSprint demo environment

Dev Is Not Stable

Dev receives multiple deployments per day. Services may be briefly unavailable during rolling restarts. Do not use dev for any customer-facing demos — use stage or UAT instead.


Key Infrastructure Resources

Container App Environment

CAENameApps
Publicmic-erp-be-dev-cae-publicGateway, Keycloak
Privatemic-erp-be-dev-cae-privateAll other microservices

Networking

  • VNet: mic-erp-be-dev-vnet (10.0.0.0/16)
  • NSG: mic-erp-be-dev-public-nsg, mic-erp-be-dev-private-nsg
  • Private DNS zones: privatelink.database.windows.net, privatelink.redis.cache.windows.net

Storage and Registry

ResourceName
Container Registrymicerpbedevacr.azurecr.io
Key Vaultmic-erp-be-dev-skv
Redismic-erp-be-dev-redis.uksouth.redis.azure.net:10000 (Azure Managed Redis, Balanced_B0)

SQL

Dev microservices share the cross-environment SQL VM (mic-backend-shared-sql-rg, 20.50.120.95). Each tenant gets its own database following the {TenantId}_DB naming pattern.


Configuration

Key Vault Secrets

All environment-specific secrets are stored in mic-erp-be-dev-skv. Secret names use double-dash (--) in place of double-colon (::) to satisfy Azure Key Vault naming rules:

KV Secret NameMaps To (appsettings)
ConnectionStrings--DefaultConnectionConnectionStrings:DefaultConnection
RedisConfiguration--PasswordRedisConfiguration:Password
AzureServiceBus--ConnectionStringAzureServiceBus:ConnectionString
Jwt--SecretJwt:Secret
XApiKeyXApiKey

Domain and TLS

All dev services are accessible via *.microtec-test.com:

ServiceURL
API Gatewayhttps://gateway.microtec-test.com
Keycloakhttps://auth.microtec-test.com
Business Owner Portalhttps://bo.microtec-test.com
ERP Frontendhttps://erp.microtec-test.com

TLS certificates are issued and auto-renewed via Azure Front Door managed certificates.


ACR Image Pull

Container App Environments pull images from micerpbedevacr using a user-assigned managed identity:

Identity: mic-erp-be-dev-acr-pull-id
Role: AcrPull on micerpbedevacr

The pipeline pushes images tagged $(Build.BuildId) and also updates the latest tag.


Reset Procedures

Restart All Services

Use the Azure CLI to restart all Container Apps in the private CAE:

bash
az containerapp list \
  --resource-group mic-erp-be-dev-apps-private-rg \
  --query "[].name" -o tsv | \
xargs -I{} az containerapp restart \
  --name {} \
  --resource-group mic-erp-be-dev-apps-private-rg

Redeploy a Specific Service

Trigger a manual pipeline run for a single service:

bash
# Using Azure DevOps CLI
az pipelines run \
  --name "mic-erp-backend-deploy" \
  --branch main \
  --variables "serviceName=accounting" "targetEnv=dev"

Flush Redis Cache

bash
# Connect via Azure CLI with Key Vault secret
REDIS_PWD=$(az keyvault secret show \
  --vault-name mic-erp-be-dev-skv \
  --name "RedisConfiguration--Password" \
  --query value -o tsv)

redis-cli \
  -h mic-erp-be-dev-redis.uksouth.redis.azure.net \
  -p 10000 \
  -a "${REDIS_PWD}" \
  --tls FLUSHALL

FLUSHALL Clears All Cache Data

FLUSHALL removes ALL keys including DataProtection keys. After flushing, users will be logged out and existing session tokens will be invalidated. Only run this during off-hours or when directed by a service owner.

Reset Dev Tenant Database

bash
# SSH into SQL VM
ssh -i ~/.ssh/mic-shared-sql sqladmin@20.50.120.95

# Drop and recreate a tenant DB (replace <TenantId>)
sqlcmd -S localhost -Q "
  DROP DATABASE IF EXISTS [<TenantId>_DB];
  CREATE DATABASE [<TenantId>_DB];
"

After recreation, trigger the EF Core migration pipeline step to re-apply all migrations.


Monitoring

Dev environment telemetry is sent to:

ToolDetails
Seqhttp://seq.microtec-test.com:1234 (internal)
Application Insightsmic-erp-be-dev-ai workspace
OpenTelemetryOTLP endpoint http://otel-collector.microtec-test.com:4317

Dev Log Verbosity

Dev is configured with Serilog:MinimumLevel:Default = Debug to maximise diagnostic information. Stage and above use Information level.

Internal Documentation — Microtec Platform Team