Azure Deployment Architecture Report

Indawo LAMP stack → Azure (no Docker), PHP 8.3. VM-based with UAT and QA on the same VM. Ballpark effort (incl. by hour), cost estimate, and service list.

1. Executive summary

This report maps the current Docker-based LAMP stack (PHP, Apache, MySQL, Redis, phpMyAdmin) to Azure for deployment without Docker, using an Azure VM as the host. UAT and QA run on the same VM as separate sites (Apache vhosts / docroots), with separate databases and config per environment.

Scope: One VM for non-production: UAT + QA (same codebase, separate data and config). Production can be a separate VM or App Service later.

2. Current stack (from Docker)

ComponentCurrent (Docker)Notes
WebPHP 5.6 + ApacheUpgrade to PHP 8.3 on Azure
DatabaseMySQL 5.7→ Azure Database for MySQL
Cache/SessionRedis (latest)→ Azure Cache for Redis
DB AdminphpMyAdminOptional: App Service or Azure tools
StorageLocal volumes (www, filesystem)→ VM disk + optional Blob Storage
SSLCustom certs in container→ VM: Apache + cert (Let’s Encrypt or Azure)

3. Recommended Azure services (VM-based, UAT + QA on one VM)

Each Azure service replaces one or more parts of the current Docker Compose stack (webserver, database, redis, phpmyadmin, volumes).

Azure serviceReplaces in DockerPurposeBallpark effort
Azure Virtual Machine (Linux, e.g. Ubuntu 22.04)webserver (PHP + Apache container)Single VM hosting UAT and QA: Apache + PHP 8.3, two vhosts (e.g. uat.indawo.xxx, qa.indawo.xxx), separate docroots and config.2–3 days
Azure Database for MySQL – Flexible Serverdatabase (MySQL container)Managed MySQL. One server with two DBs: indawo_uat and indawo_qa (or MySQL installed on same VM for cost savings).1–2 days
Azure Cache for Redis (optional)redis (Redis container)Session/cache. One cache with key prefix per env (uat_ / qa_) or Redis on VM.0.5–1 day
Azure Managed DiskVolumes: DOCUMENT_ROOT, filesystem, LOG_DIR, etc.OS + data disk for app code, uploads, logs. Separate folders per site: e.g. /var/www/uat, /var/www/qa.included in VM
Azure Blob Storage (optional)Volume filesystem or uploads under docrootFile uploads / backups if you prefer not to keep all files on VM disk.1–2 days
Application Insights or VM extensions— (no direct Docker equivalent)Logs, metrics. Use Azure Monitor VM extension or App Insights SDK in app.0.5 day
Azure Key Vault (optional)Env vars in docker-compose / .envSecrets (DB, Redis). VM managed identity can read from Key Vault.1 day
NSG + public IP or Load BalancerCompose ports: (80, 443, 22) and host networkingNetwork security group for ports 80/443/22; static public IP or DNS for uat/qa hostnames.0.5 day
phpMyAdmin on VM (or Azure Data Studio / MySQL Workbench)phpmyadmin (phpMyAdmin container)DB admin: install phpMyAdmin on the same VM, or use Azure Data Studio / MySQL Workbench to connect to Azure MySQL. No separate Azure service.included in VM

4. Architecture (high-level)

4.1 Architecture diagram

Internet Azure Virtual Machine (Ubuntu 22.04) UAT uat.indawo.xxx Apache + PHP 8.3 QA qa.indawo.xxx Apache + PHP 8.3 Azure MySQL Flexible Server indawo_uat / indawo_qa Azure Cache for Redis uat_ / qa_ prefix Blob Storage (optional) files / backups Key Vault (secrets) Application Insights (monitoring) NSG, Public IP, DNS ports 80, 443, 22

4.2 Single VM – UAT and QA on same VM (text diagram)

┌─────────────────────────────────────────────────────────────────────────────┐ │ Azure VM – UAT + QA on one VM (Apache vhosts, PHP 8.3) │ ├─────────────────────────────────────────────────────────────────────────────┤ │ Internet │ │ │ │ │ ▼ │ │ ┌─────────────────────────────────────────────────────────────────────────┐ │ │ │ Azure Virtual Machine (e.g. Ubuntu 22.04 LTS) │ │ │ │ ┌─────────────────────────────┐ ┌─────────────────────────────┐ │ │ │ │ │ Apache vhost: UAT │ │ Apache vhost: QA │ │ │ │ │ │ uat.indawo.xxx → /var/www/ │ │ qa.indawo.xxx → /var/www/ │ │ │ │ │ │ uat │ │ qa │ │ │ │ │ │ PHP 8.3 │ │ PHP 8.3 │ │ │ │ │ └──────────────┬───────────────┘ └──────────────┬───────────────┘ │ │ │ │ │ │ │ │ │ │ Optional on VM: MySQL, Redis, phpMyAdmin (or use Azure managed below) │ │ │ └─────────────────┼───────────────────────────────┼───────────────────────┘ │ │ │ │ │ │ │ ┌───────────────────────────┼───────────────┐ │ │ ▼ ▼ ▼ ▼ │ │ ┌─────────────────┐ ┌─────────────────┐ ┌─────────────────┐ │ │ │ Azure MySQL │ │ Azure Cache │ │ Blob Storage │ (optional) │ │ │ Flexible Server │ │ for Redis │ │ │ │ │ │ DB: indawo_uat │ │ prefix uat_/ │ │ │ │ │ │ DB: indawo_qa │ │ prefix qa_/ │ │ │ │ │ └─────────────────┘ └─────────────────┘ └─────────────────┘ │ │ Optional: Key Vault, Application Insights / Azure Monitor │ └─────────────────────────────────────────────────────────────────────────────┘

4.3 UAT and QA on the same VM – how it works

Recommendation: Keep UAT and QA on this single VM with separate vhosts and DBs; add a separate Production VM or App Service when you go live.

5. Ballpark effort summary (VM, UAT + QA)

PhaseTasksEffort
PHP 8.3 + app compatibilityCode/dep updates, testing (current stack is PHP 5.6)1–3 weeks
Azure subscription & networkingResource group, VNet, NSG, public IP or DNS0.5–1 day
Azure VM + LAMPCreate Linux VM, install Apache, PHP 8.3, optional MySQL/Redis on VM2–3 days
UAT + QA vhostsTwo Apache vhosts, docroots, SSL (e.g. Let’s Encrypt), env config per site1–1.5 days
Azure MySQL Flexible ServerCreate server, DBs indawo_uat & indawo_qa, firewall, migrate1–2 days
RedisAzure Cache for Redis or Redis on VM; app config with prefix/DB index per env0.5–1 day
Blob Storage (optional)Account, container(s), app integration for uploads1–2 days
Secrets & configKey Vault (optional), .env or env vars per vhost0.5–1 day
CI/CDDeploy UAT and QA to VM (e.g. GitHub Actions + SSH or Azure DevOps)1–2 days
Monitoring & docsAzure Monitor / Log Analytics, runbook, README/CHANGELOG0.5–1 day

Total ballpark (excluding PHP 8.3 app migration): ~8–12 days (one engineer). Including PHP 5.6 → 8.3: ~3–5 weeks depending on app size and breaking changes.

5.1 Effort by hour (setup only, one engineer)

Assumption: 1 day = 8 hours. Use for planning and internal cost (e.g. hourly rate × hours).

PhaseHours (min)Hours (max)Notes
PHP 8.3 + app compatibility401201–3 weeks; depends on codebase size
Azure subscription & networking48Resource group, VNet, NSG, DNS
Azure VM + LAMP1624Create VM, Apache, PHP 8.3, optional MySQL/Redis on VM
UAT + QA vhosts812Two vhosts, SSL, env config per site
Azure MySQL Flexible Server816Server, two DBs, firewall, data migrate
Redis48Azure Cache or on-VM; app config
Blob Storage (optional)816Account, containers, app integration
Secrets & config48Key Vault or .env per vhost
CI/CD816GitHub Actions / Azure DevOps to VM
Monitoring & docs48Azure Monitor, runbook, README/CHANGELOG
Subtotal (excl. PHP 8.3 migration)64–116 hrs~8–14.5 days
Total (incl. PHP 8.3 migration)104–236 hrs~13–30 days (3–6 weeks)

Use your team’s hourly rate × hours for labour cost (e.g. 80 hrs × $X/hr).

6. Cost estimate (monthly, Azure list price)

Ballpark monthly cost in USD and ZAR (list price, one region e.g. East US / West Europe). Actual cost depends on region, SKU, reservation, and usage. Use Azure Pricing Calculator for your scenario.

ZAR converted at 1 USD ≈ 18.50 ZAR (indicative; check current rate for billing).

ResourceSKU / sizeLow (USD/mo)Mid (USD/mo)Low (ZAR/mo)Mid (ZAR/mo)Notes
Azure VM (Linux)B2s or B1ms~15~50~278~925B1ms for light UAT/QA; B2s for more headroom
Managed Disk (OS + data)64–128 GB SSD~8~25~148~463Included in some VM offers; data disk extra
Azure MySQL Flexible ServerBurstable B1ms or B2s~15~45~278~833Or run MySQL on VM to save
Azure Cache for RedisBasic C0 or on VM0~200~370On VM = R0 extra; Basic C0 if managed
Static public IP1 standard static IP~4~5~74~93Optional if using dynamic + DNS
Bandwidth (egress)First 5 GB free; then per GB~0~15~0~278Depends on traffic
Key Vault (optional)Standard, low transaction~0~2~0~37Minimal operations
Blob Storage (optional)LRS, < 10 GB~0~5~0~93If used for uploads/backups
Application Insights / Log AnalyticsFirst 5 GB free; pay per GB~0~10~0~185Light usage often within free tier
Total (VM + managed MySQL + Redis)~45~175~833~3 238Typical UAT/QA range
Total (all on VM: MySQL + Redis on same VM)~30~95~555~1 758Lower cost; you manage MySQL/Redis

Summary (USD): Expect roughly ~$30–95/mo if MySQL and Redis run on the same VM, or ~$45–175/mo with Azure Database for MySQL and Azure Cache for Redis.

Summary (ZAR): Roughly ~R555–R1 758/mo (all on VM) or ~R833–R3 238/mo (managed MySQL + Redis). Add reserved instances or savings plans to reduce cost; ZAR will vary with exchange rate.

7. PHP 8.3 migration note

Current Docker setup uses PHP 5.6. Moving to Azure with “latest PHP” implies PHP 8.3. This typically requires:

Estimate 1–3 weeks for PHP 8.3 migration unless the codebase is already compatible.

8. Next steps

  1. Confirm PHP 8.3 compatibility plan and timeline.
  2. Create Azure resource group, VNet, NSG (ports 22, 80, 443).
  3. Create Linux VM (e.g. Ubuntu 22.04); install Apache, PHP 8.3, and optional MySQL/Redis on VM, or plan for Azure MySQL + Azure Redis.
  4. Configure two Apache vhosts: UAT and QA (separate docroots /var/www/uat, /var/www/qa; SSL via Let’s Encrypt or Azure).
  5. Create Azure MySQL Flexible Server with databases indawo_uat and indawo_qa; migrate schema and data; allow VM IP in firewall.
  6. Configure Redis (on VM or Azure Cache) with per-env prefix or DB index; wire connection into each site’s config.
  7. Set up deployment (e.g. GitHub Actions SSH or Azure DevOps) to deploy code to both docroots (or one and symlink/copy).
  8. Enable Azure Monitor / Log Analytics and optional Key Vault; document runbook and update README/CHANGELOG.