Azure bicep#21
Merged
Merged
Conversation
Include the agentbase-azure folder in agentbase.code-workspace and set "powershell.cwd" to that folder (while preserving Python and TypeScript settings). Also reformat the workspace file. Add ".workitems/" to .gitignore to ignore Azure Board workitem artifacts.
Add end-to-end Azure deployment assets for the Agentbase core platform. This introduces a Bicep composition root and modules under infra/ (compute, DBs, ACR, Key Vault, networking, monitoring, storage, RBAC) plus per-environment parameter files. Add a multi-stage Azure DevOps pipeline (azure-pipelines/agentbase-deploy.yml) and a reusable deploy stage template with build/push, KV seeding, app updates and health checks (templates/, scripts/health-check.sh, scripts/seed-keyvault.sh). Include documentation (docs/azure/*) covering architecture, pipeline runbook and cost guidance. Also make small application updates in packages/core (package.json, app.module.ts, data-source.ts, uploads.service.ts, tsconfig.json) to enable PostgreSQL TLS, Azure Blob uploads via DefaultAzureCredential, and multer types to ensure the app builds in CI.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adds an Azure deployment stack for the Agentbase platform: Bicep IaC for all required Azure resources plus an Azure DevOps multi-stage pipeline to validate, deploy, and verify staging/prod environments. It also makes minimal core-service runtime changes to support Azure Blob Storage uploads and Postgres TLS.
Changes:
- Introduces a reusable Azure DevOps pipeline (
Validate → Deploy staging → approval → Deploy prod) with scripts for Key Vault seeding and endpoint health checks. - Adds Bicep modules and a composition root (
infra/main.bicep) to provision App Service (3 containers), ACR, Key Vault, Blob Storage, Postgres Flexible Server, Cosmos (Mongo), Redis, monitoring, and (prod) private networking. - Updates core service configuration for Azure (Blob upload backend + optional Postgres TLS) and adds Azure SDK dependencies/docs.
Reviewed changes
Copilot reviewed 29 out of 30 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/core/tsconfig.json | Adds multer types to fix core build typing. |
| packages/core/src/modules/uploads/uploads.service.ts | Adds Azure Blob upload backend and selection logic. |
| packages/core/src/data-source.ts | Adds optional Postgres TLS config for TypeORM CLI datasource. |
| packages/core/src/app.module.ts | Adds optional Postgres TLS config for runtime TypeORM connection. |
| packages/core/package.json | Adds Azure Identity + Blob Storage SDK dependencies. |
| infra/modules/storage-account.bicep | Provisions a Storage Account + uploads container for Blob storage. |
| infra/modules/redis-cache.bicep | Provisions Azure Cache for Redis (Basic C0) with TLS-only config. |
| infra/modules/rbac.bicep | Defines least-privilege role assignments for managed identities. |
| infra/modules/postgres-flexible.bicep | Provisions Azure Database for PostgreSQL Flexible Server + DB. |
| infra/modules/networking.bicep | Provisions VNet + private endpoints + private DNS zones (prod). |
| infra/modules/monitoring.bicep | Provisions Log Analytics + Application Insights. |
| infra/modules/key-vault.bicep | Provisions Key Vault with RBAC authorization. |
| infra/modules/cosmos-mongo.bicep | Provisions Cosmos DB (Mongo API) serverless + DB. |
| infra/modules/container-registry.bicep | Provisions Azure Container Registry (Basic). |
| infra/modules/app-service-plan.bicep | Provisions Linux App Service Plan with parameterized SKU. |
| infra/modules/app-service-container.bicep | Provisions container-based Web Apps with managed identity and base settings. |
| infra/main.parameters.staging.json | Staging parameters (B2, no private networking, marketplace URL). |
| infra/main.parameters.prod.json | Prod parameters (P1v2, private networking, marketplace URL). |
| infra/main.bicep | Composition root wiring all modules + app settings + outputs for pipeline. |
| docs/azure/README.md | Entry-point documentation and quick start for Azure deployment. |
| docs/azure/pipeline.md | Runbook for Azure DevOps pipeline setup, execution, rollback, teardown. |
| docs/azure/cost.md | SKU rationale and estimated monthly costs with cost levers. |
| docs/azure/architecture.md | Architecture description with diagrams, security model, and wiring notes. |
| azure-pipelines/templates/deploy-env.yml | Reusable deployment stage template for an environment. |
| azure-pipelines/scripts/seed-keyvault.sh | Idempotent Key Vault seeding script (generated + supplied secrets). |
| azure-pipelines/scripts/health-check.sh | Endpoint polling script for post-deploy verification. |
| azure-pipelines/agentbase-deploy.yml | Azure DevOps pipeline definition (Validate + Deploy stages). |
| agentbase.code-workspace | Adds agentbase-azure folder + PowerShell working directory setting. |
| .gitignore | Ignores Azure Boards workitems folder. |
| .gitattributes | Normalizes LF line endings for scripts/YAML/Bicep to avoid agent issues. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot Autofix powered by AI <175728472+Copilot@users.noreply.github.com>
Copilot stopped work on behalf of
dewitt4 due to an error
June 9, 2026 20:21
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request introduces a comprehensive Azure deployment pipeline and associated infrastructure scripts and documentation for the Agentbase platform. The changes establish an automated, multi-stage CI/CD workflow for deploying the core, frontend, and AI service components to Azure, including infrastructure provisioning, secret management, and health checks. Additionally, documentation and configuration files have been updated or added to support Azure deployments and development workflows.
CI/CD Pipeline and Infrastructure Automation
azure-pipelines/agentbase-deploy.yml, a multi-stage Azure DevOps pipeline for validating, deploying, and (optionally) tearing down Agentbase environments (staging and production), with clear prerequisites and environment gating.azure-pipelines/templates/deploy-env.yml, a reusable deployment stage that provisions infrastructure, builds and pushes Docker images, seeds Azure Key Vault secrets, updates web apps, and verifies endpoint health for each environment.Deployment and Secret Management Scripts
azure-pipelines/scripts/seed-keyvault.sh, an idempotent script to populate Azure Key Vault with all required secrets, handling both generated and user-supplied values safely.azure-pipelines/scripts/health-check.sh, a robust script to poll service endpoints until healthy, used for post-deployment verification in the pipeline.Documentation and Configuration
docs/azure/README.mdwith a clear overview of the Azure deployment architecture, pipeline runbook, cost analysis, and quick start instructions..gitattributesto normalize line endings for scripts and YAML files, ensuring cross-platform compatibility and preventing issues on Linux build agents.agentbase.code-workspaceto include the Azure project and set PowerShell's working directory for improved local development experience.