Skip to content

HCW Azure Migration — Task Tracker

Historical record

Retained as evidence of how the Azure platform was built. Not an active runbook for starting a new migration.

Repo 1: Personal-Site_HCW (Frontend)

Completed

  • Create staticwebapp.config.json (Azure Static Web Apps hosting config)
  • Create src/lib/azureConfig.js (Cosmos DB client-side SDK)
  • Update src/lib/functionsBase.js — add VITE_BACKEND_PROVIDER toggle
  • Update .env.example — add Azure env vars
  • Add deploy-azure-frontend.yml workflow

Auth Update (Entra ID MSAL)

  • Create src/lib/msalConfig.js to replace firebaseConfig.js
  • Add @azure/msal-browser and @azure/msal-react to package.json
  • Add VITE_ENTRA_CLIENT_ID and VITE_ENTRA_TENANT_ID to .env.example

Cleanup (after full migration)

  • Archive firebase.json config
  • Archive .firebaserc
  • Archive .github/workflows/deploy-frontend.yml (Firebase version)
  • Archive .github/workflows/deploy-functions.yml (Firebase version)
  • Remove firebase module from package.json dependencies

Repo 2: HCW-HybridCloudWorks (New Azure Platform Repo)

Repo Setup

  • Create HCW-HybridCloudWorks repo on GitHub
  • Initialize with README, .gitignore
  • Set up branch protection rules

Infrastructure (infra/)

  • Create Terraform Azure modules
  • Add terraform.tfvars.example
  • NEW: Add Azure OpenAI Cognitive Services resource to main.tf
  • Create deploy-infra.yml workflow
  • terraform init + terraform plan

Azure Functions (functions/)

  • Create project scaffold (package.json, host.json)
  • Port cosmos-client.js data access layer
  • Port blob-storage.js helpers
  • Port auth-middleware.js (Firebase Auth validation - needs rewrite for Entra ID JWT)
  • Create Key Vault helper (key-vault.js)
  • NEW: Add @azure/openai to package.json and create openai-client.js helper
  • Port CMS HTTP triggers from cms-functions.js
  • Port Labs HTTP triggers from labs-functions.js
  • Port scheduler triggers (9 timers)
  • Port Cosmos DB change feed triggers
  • Create deploy-functions.yml workflow

Data Migration (scripts/)

  • Create migrate-firestore-to-cosmos.mjs
  • Create migrate-storage-to-blob.sh (stub)
  • Create verify-migration.mjs (stub)
  • Create migrate-data.yml workflow

VPS Agent (vps-agent/)

  • Create vps-agent directory and basic scaffolding
  • Fork labs/vps-agent with Cosmos DB SDK
  • Update package.json (@azure/cosmos replaces firebase-admin)
  • Update .env.example for Azure auth
  • Update README runbook

Documentation (docs/)

  • Create architecture.md
  • Create migration-runbook.md
  • Create cost-analysis.md

Secrets & CI/CD

  • Create secret-sync-keyvault.yml workflow
  • Add AZURE_CREDENTIALS to GitHub Secrets
  • Add COSMOS_ENDPOINT, COSMOS_KEY to GitHub Secrets