Skip to content

Stage Environment

The stage environment is the primary integration and QA environment. It is the first environment that requires all DevSecOps pipeline stages to pass before deployment and is the target for OWASP ZAP DAST scanning.


Environment Snapshot

PropertyValue
Environment namestage
VNet CIDR10.1.0.0/16
Domainmicrotecstage.com
Key Vaultmic-erp-stg-kv
ACRmicerpbestageacr
Branch triggerstage or staging
Approval gateNone (auto-deploys on branch push)
SLABusiness hours (8 AM – 8 PM GST)

Subnets

SubnetCIDRHosts
Public (CAE)10.1.1.0/24Gateway, Keycloak
Private (CAE)10.1.2.0/23All backend microservices
App Service10.1.4.0/24App Service integration
Function Apps10.1.5.0/24Function App integration
Private Endpoints10.1.6.0/24PaaS private endpoints (SQL, Redis, etc.)

Key Infrastructure Resources

Container App Environments

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

Redis

Stage uses a dedicated Azure Managed Redis instance with SSL enforced:

PropertyValue
Hostnamemic-erp-be-stage-redis.uksouth.redis.azure.net
Port10000 (SSL)
TLSRequired (ssl=True)
SKUBalanced_B0
PasswordKV secret: mic-erp-stg-kvRedisConfiguration--Password

Connection string format used in app configuration:

mic-erp-be-stage-redis.uksouth.redis.azure.net:10000,password=<from-kv>,ssl=True,abortConnect=False

Redis Port 10000 Not 6379

Azure Managed Redis uses port 10000 (not the default 6379) for SSL connections. Ensure ssl=True and port 10000 are set in all configuration. Connections on port 6380 (non-SSL) are blocked by NSG.

SQL

Stage microservices connect to the shared SQL VM (20.50.120.95) using a separate stage login. Each tenant database is prefixed to avoid collision with dev databases.


Configuration

Key Vault Secrets

Key Vault name: mic-erp-stg-kv

KV Secret NameDescription
ConnectionStrings--DefaultConnectionAdmin DB connection string
RedisConfiguration--PasswordRedis SSL password
AzureServiceBus--ConnectionStringAzure Service Bus connection string
Jwt--SecretJWT signing key
XApiKeyInternal service-to-service API key
Attachment--StorageAccountKeyBlob storage for file attachments

Domain and TLS

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

Who Uses Stage

RoleUsage
QA engineersFull regression testing, test case execution
Product ownersFeature acceptance and sprint demos
Security teamDAST scan target, penetration testing
Integration partnersThird-party integration testing (Zatca, payment gateways)
DevOps engineersPre-production infrastructure validation

Pipeline Stages Required

Stage is the first environment where all 16 DevSecOps pipeline stages must pass:

Dev deployments skip stages E through N.


DAST Target

Stage is the only environment where automated OWASP ZAP scanning runs as part of the CI/CD pipeline:

  • Passive scan: Runs on every stage deployment (all branches deploying to stage)
  • Active scan: Runs only on stage branch deployments

See ZAP DAST documentation for configuration details.


Monitoring

ToolDetails
Application Insightsmic-erp-be-stage-ai
OpenTelemetryOTLP http://otel.microtecstage.com:4317

Log level is Information (same as production). Debug logging can be temporarily enabled per-service via the Container App environment variable override in the Azure Portal.

Seq Not Available in Stage

Seq structured log streaming is only available in the local dev environment. Stage and above send telemetry to Application Insights via OpenTelemetry.


Reset Procedures

Restart All Services

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

Flush Stage Redis (with caution)

bash
REDIS_PWD=$(az keyvault secret show \
  --vault-name mic-erp-stg-kv \
  --name "RedisConfiguration--Password" \
  --query value -o tsv)

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

Coordinate Redis Flushes

Stage may have active QA sessions running. Coordinate with the QA team before flushing Redis to avoid disrupting regression test runs.

Internal Documentation — Microtec Platform Team