Skip to content

feat: add Azure Container Registry module, enhance deployment scripts and update model configuration.#469

Open
VishalSh-Microsoft wants to merge 1 commit into
microsoft:mainfrom
VishalSh-Microsoft:psl-acrchanges-codmod-vs7
Open

feat: add Azure Container Registry module, enhance deployment scripts and update model configuration.#469
VishalSh-Microsoft wants to merge 1 commit into
microsoft:mainfrom
VishalSh-Microsoft:psl-acrchanges-codmod-vs7

Conversation

@VishalSh-Microsoft

Copy link
Copy Markdown
Contributor

Purpose

This pull request introduces significant improvements to the deployment and management of Azure Container Registry (ACR) resources, particularly enhancing support for both public and private (WAF) networking scenarios. It refactors the ACR provisioning into a dedicated Bicep module, updates documentation to reflect the new default GPT model (gpt-5.1), and enhances the build and push script for container images to handle WAF/private networking deployments more robustly.

Key changes include:

Infrastructure improvements (ACR and networking)

  • Refactored ACR provisioning into a new module (modules/containerRegistry.bicep), supporting both public and private (WAF) deployments, private endpoints, and role assignments. This makes the infrastructure more modular and maintainable. [1] [2]
  • Updated the main Bicep file to use the new ACR module, added private DNS zone for ACR, and updated DNS zone indexing accordingly. [1] [2] [3]

Build and deployment automation

  • Enhanced the build_and_push_images.ps1 script to:
    • Support both azd environment and explicit resource group discovery.
    • Automatically relax and restore ACR network restrictions for WAF/private deployments, ensuring smooth image builds and deployments.
    • Improve error handling and output for better troubleshooting.

Documentation updates

  • Updated all relevant documentation and parameter files to set gpt-5.1 as the default/allowed GPT model, replacing gpt-4o. [1] [2] [3] [4] [5] [6]

Most important changes:

Infrastructure and Networking

  • Added a new containerRegistry.bicep module to manage ACR with both public and private networking, private endpoints, and role assignments.
  • Updated infra/main.bicep to use the new module, added ACR private DNS zone, and updated DNS zone index. [1] [2] [3]

Build and Deployment Automation

  • Refactored build_and_push_images.ps1 to support WAF/private ACR deployments by temporarily relaxing network rules during builds and restoring them afterward, and improved overall robustness and error handling.

Documentation and Parameters

  • Updated all references and documentation to make gpt-5.1 the default/allowed GPT model, replacing gpt-4o. [1] [2] [3] [4] [5] [6]

These changes significantly improve the flexibility, security, and maintainability of the deployment process and documentation.

Does this introduce a breaking change?

  • Yes
  • No

Golden Path Validation

  • I have tested the primary workflows (the "golden path") to ensure they function correctly without errors.

Deployment Validation

  • I have validated the deployment process successfully and all services are running as expected with this change.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR modularizes Azure Container Registry (ACR) provisioning to better support both public and WAF/private networking deployments, enhances the image build/push automation to handle private ACR scenarios more robustly, and updates configuration/docs to use gpt-5.1 as the default GPT model.

Changes:

  • Introduces a dedicated infra/modules/containerRegistry.bicep module and wires it into infra/main.bicep, including an ACR private DNS zone entry and updated DNS zone indexing.
  • Refactors the build-and-push scripts (Bash + PowerShell) to support both azd-output mode and explicit resource-group discovery, and to temporarily relax/restore ACR network restrictions for WAF/private deployments.
  • Updates sample env/config and documentation/quota scripts to default to gpt-5.1 instead of gpt-4o.

Reviewed changes

Copilot reviewed 11 out of 12 changed files in this pull request and generated 7 comments.

Show a summary per file
File Description
src/backend/.env.sample Updates default agent model deployment values to gpt-5.1.
scripts/quota_check_params.sh Updates default model/capacity pair to gpt-5.1:150.
scripts/checkquota.sh Updates the GlobalStandard quota key to gpt-5.1.
scripts/build_and_push_images.sh Adds RG discovery + WAF/private ACR “relax/restore” flow and connectivity checks.
scripts/build_and_push_images.ps1 Adds RG discovery + WAF/private ACR “relax/restore” flow and connectivity checks.
infra/modules/containerRegistry.bicep New module implementing ACR + optional private endpoint + role assignments + telemetry.
infra/main.json Regenerated ARM template reflecting the new ACR module + DNS zone/index updates.
infra/main.bicep Switches ACR provisioning to the new module and adds privatelink.azurecr.io + index updates.
docs/quota_check.md Updates documentation examples to reference gpt-5.1.
docs/EXAMPLE-CustomizingAzdParameters.md Updates example to use AZURE_ENV_GPT_MODEL_NAME and gpt-5.1.
docs/CustomizingAzdParameters.md Updates model name description to reflect gpt-5.1 default.
docs/AzureGPTQuotaSettings.md Updates guidance to include GPT-5.1.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread infra/main.bicep
Comment thread infra/modules/containerRegistry.bicep
Comment thread infra/modules/containerRegistry.bicep
Comment thread scripts/build_and_push_images.sh
Comment thread scripts/build_and_push_images.ps1
Comment thread scripts/build_and_push_images.ps1
Comment thread docs/EXAMPLE-CustomizingAzdParameters.md
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants