feat: migrate from SWA to ACA#36
Conversation
… TypeScript types
…lidation for required variables
…tainer names for testing
…es for improved clarity and compatibility
…efore setting context
…s and removing redundant comments
…ror messages and checks
…or messages and streamlined variable usage
…dation for subscription ID
There was a problem hiding this comment.
Pull Request Overview
This PR migrates the project deployment from SWA to ACA by integrating Azure OpenAI services, enhancing the deployment process, and updating the infrastructure using Bicep templates.
- Introduces new Azure resource definitions and retrieves OpenAI secrets in azure.yaml.
- Adds a new GitHub workflow for deploying to Azure Container Apps and updates the CI workflow dependency installation command.
- Updates import paths in the application code to reflect the new module location.
Reviewed Changes
Copilot reviewed 32 out of 47 changed files in this pull request and generated 1 comment.
| File | Description |
|---|---|
| azure.yaml | Adds infrastructure configuration using Bicep templates and secret retrieval steps. |
| .github/workflows/azure-dev.yml | Introduces a workflow for deploying to Azure Container Apps with enhanced subscription checks. |
| .github/workflows/ci.yml | Modifies dependency installation and removes the installation of Azure Functions Core Tools. |
| app/routes/generate.tsx | Updates the import path to reflect the module relocation of azureOpenAIService. |
Files not reviewed (15)
- .env.example: Language not supported
- Dockerfile: Language not supported
- deploy-to-aca.sh: Language not supported
- infra/abbreviations.json: Language not supported
- infra/app/containerapp.bicep: Language not supported
- infra/core/ai/openai.bicep: Language not supported
- infra/core/host/container-apps-environment.bicep: Language not supported
- infra/core/monitoring/app-insights.bicep: Language not supported
- infra/core/monitoring/log-analytics.bicep: Language not supported
- infra/core/registry/container-registry.bicep: Language not supported
- infra/core/security/keyvault.bicep: Language not supported
- infra/core/security/managed-identity.bicep: Language not supported
- infra/main.bicep: Language not supported
- infra/main.parameters.json: Language not supported
- package.json: Language not supported
- Deleted unused Bicep modules for container apps environment, Application Insights, Log Analytics, and Key Vault. - Consolidated monitoring resources into a shared module for better management. - Introduced new shared modules for Cognitive Services, Key Vault secrets, and dashboards. - Updated main Bicep file to reflect changes in resource management and dependencies. - Added support for conditional resource creation and improved parameter handling for Azure OpenAI resources. - Enhanced Key Vault integration for storing sensitive information securely. - Implemented role assignments for Azure resources to manage access control effectively.
|
This pull request sets up GitHub code scanning for this repository. Once the scans have completed and the checks have passed, the analysis results for this pull request branch will appear on this overview. Once you merge this pull request, the 'Security' tab will show more code scanning analysis results (for example, for the default branch). Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results. For more information about GitHub code scanning, check out the documentation. |
| } | ||
| properties: { | ||
| customSubDomainName: customSubDomainName | ||
| publicNetworkAccess: publicNetworkAccess |
Check failure
Code scanning / templateanalyzer
Restrict Cognitive Service endpoints.
| } | ||
| properties: { | ||
| customSubDomainName: customSubDomainName | ||
| publicNetworkAccess: publicNetworkAccess |
Check failure
Code scanning / templateanalyzer
Use Cognitive Service Private Endpoints.
| properties: { | ||
| customSubDomainName: customSubDomainName | ||
| publicNetworkAccess: publicNetworkAccess | ||
| networkAcls: networkAcls |
Check failure
Code scanning / templateanalyzer
Restrict Cognitive Service endpoints.
| customSubDomainName: customSubDomainName | ||
| publicNetworkAccess: publicNetworkAccess | ||
| networkAcls: networkAcls | ||
| disableLocalAuth: disableLocalAuth |
Check failure
Code scanning / templateanalyzer
Use identity-based authentication for Cognitive Services accounts.
| name: name | ||
| location: location | ||
| tags: tags | ||
| properties: { |
Check failure
Code scanning / templateanalyzer
Configure Azure Key Vault firewall.
| tenantId: subscription().tenantId | ||
| sku: { family: 'A', name: 'standard' } | ||
| enabledForTemplateDeployment: true | ||
| enableRbacAuthorization: false |
Check warning
Code scanning / templateanalyzer
Use Azure role-based access control.
| tags: tags | ||
| sku: sku | ||
| properties: { | ||
| adminUserEnabled: adminUserEnabled |
Check failure
Code scanning / templateanalyzer
Disable ACR admin user.
There was a problem hiding this comment.
Copilot reviewed 40 out of 55 changed files in this pull request and generated no comments.
Files not reviewed (15)
- .devcontainer/devcontainer.json: Language not supported
- .dockerignore: Language not supported
- .env.example: Language not supported
- Dockerfile: Language not supported
- deploy-to-aca.sh: Language not supported
- infra/abbreviations.json: Language not supported
- infra/app/microblog-app.bicep: Language not supported
- infra/main.bicep: Language not supported
- infra/main.parameters.json: Language not supported
- infra/modules/fetch-container-image.bicep: Language not supported
- infra/shared/apps-env.bicep: Language not supported
- infra/shared/cognitiveservices.bicep: Language not supported
- infra/shared/dashboard-web.bicep: Language not supported
- infra/shared/keyvault-secret.bicep: Language not supported
- infra/shared/keyvault.bicep: Language not supported
Purpose
This pull request includes several changes to enhance the development environment, add deployment automation, and improve infrastructure management. The most important changes include updates to the development container configuration, the addition of environment variables, new GitHub workflows for deployment and validation, and the creation of a Dockerfile for building and running the application.
Development Environment Updates:
.devcontainer/devcontainer.json: Added Docker-in-Docker and PowerShell features, removed GitHub CLI feature, and set minimal host requirements. [1] [2]Environment Variables:
.env.example: Added environment variables for Azure OpenAI settings and optional Azure configurations.Deployment Automation:
.github/workflows/azure-dev.yml: Added a workflow for deploying to Azure Container Apps, including steps for provisioning infrastructure and deploying the application.deploy-to-aca.sh: Added a script for deploying the application to Azure Container Apps, including building the Docker image and configuring autoscaling.Infrastructure Management:
infra/app/microblog-app.bicep: Added a Bicep template for deploying the application infrastructure, including managed identities, container apps, and environment variables.infra/abbreviations.json: Added abbreviations for various Azure resources to streamline Bicep template writing.Dockerfile:
Dockerfile: Created a multi-stage Dockerfile to build and run the application, optimizing for both development and production environments.Does this introduce a breaking change?
Pull Request Type
What kind of change does this Pull Request introduce?
How to Test
What to Check
Verify that the following are valid
Other Information