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— addVITE_BACKEND_PROVIDERtoggle - Update
.env.example— add Azure env vars - Add
deploy-azure-frontend.ymlworkflow
Auth Update (Entra ID MSAL)¶
- Create
src/lib/msalConfig.jsto replacefirebaseConfig.js - Add
@azure/msal-browserand@azure/msal-reactto package.json - Add
VITE_ENTRA_CLIENT_IDandVITE_ENTRA_TENANT_IDto.env.example
Cleanup (after full migration)¶
- Archive
firebase.jsonconfig - Archive
.firebaserc - Archive
.github/workflows/deploy-frontend.yml(Firebase version) - Archive
.github/workflows/deploy-functions.yml(Firebase version) - Remove
firebasemodule from package.json dependencies
Repo 2: HCW-HybridCloudWorks (New Azure Platform Repo)¶
Repo Setup¶
- Create
HCW-HybridCloudWorksrepo 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.ymlworkflow -
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/openaito package.json and createopenai-client.jshelper - 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.ymlworkflow
Data Migration (scripts/)¶
- Create
migrate-firestore-to-cosmos.mjs - Create
migrate-storage-to-blob.sh(stub) - Create
verify-migration.mjs(stub) - Create
migrate-data.ymlworkflow
VPS Agent (vps-agent/)¶
- Create vps-agent directory and basic scaffolding
- Fork
labs/vps-agentwith 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.ymlworkflow - Add AZURE_CREDENTIALS to GitHub Secrets
- Add COSMOS_ENDPOINT, COSMOS_KEY to GitHub Secrets