Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
47c7ca0
fix: merging dev changes to main (#787)
Priyanka-Microsoft Dec 8, 2025
2630f16
Added banner for archival
Rafi-Microsoft Dec 9, 2025
cc21292
Merge pull request #788 from microsoft/psl-ca-retire
Prajwal-Microsoft Dec 9, 2025
6b8ca0c
ci: update deployment workflows to deplot and test both waf and non waf
Harsh-Microsoft Dec 12, 2025
026e796
ci: add workflow dispatch input for deployment type selection
Harsh-Microsoft Dec 12, 2025
cb212eb
ci: update deployment workflow to manage public network access for WAF
Harsh-Microsoft Dec 12, 2025
f23b1c6
ci: add checkout step to deployment workflow
Harsh-Microsoft Dec 12, 2025
fd9f573
ci: increase sleep duration for network changes
Harsh-Microsoft Dec 12, 2025
283e31a
ci: update deployment type logic to set WAF for even days
Harsh-Microsoft Dec 12, 2025
f4ac515
ci: update environment variable for AI service location in deployment…
Harsh-Microsoft Dec 12, 2025
f428000
Merge pull request #790 from microsoft/hb-psl-update-e2eworkflow
Prajwal-Microsoft Dec 12, 2025
a71fff8
ci: update environment variable for AI service location in deployment…
Vamshi-Microsoft Jan 14, 2026
a9b9e3b
Merge pull request #796 from microsoft/pipeline-fix
Prajwal-Microsoft Jan 16, 2026
ae19f00
Update devcontainer to use custom Dockerfile
Roopan-Microsoft Feb 5, 2026
7150e3d
Add Dockerfile for Python 3.11 devcontainer
Roopan-Microsoft Feb 5, 2026
0968b82
Update Python base image version in Dockerfile
Roopan-Microsoft Feb 5, 2026
8fee13f
Merge pull request #800 from microsoft/codespaceissuefix
Prajwal-Microsoft Feb 5, 2026
6d37f00
docs: Update README with AI and Data playbook links
Prajwal-Microsoft Feb 19, 2026
dccc5ac
Merge pull request #804 from microsoft/cross-link-references
Prajwal-Microsoft Feb 19, 2026
30e8fcf
deleting the create-release.yml (codfish) due to security issue
AbdulMujeeb-2000 Jun 26, 2026
561a458
Merge pull request #813 from AbdulMujeeb-2000/main
Prajwal1-Microsoft Jun 26, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .devcontainer/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
FROM mcr.microsoft.com/devcontainers/python:1-3.11-bullseye

# Remove Yarn repository to avoid GPG key expiration issue
RUN rm -f /etc/apt/sources.list.d/yarn.list
6 changes: 4 additions & 2 deletions .devcontainer/devcontainer.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,9 @@
{
"name": "Python 3",
// Or use a Dockerfile or Docker Compose file. More info: https://containers.dev/guide/dockerfile
"image": "mcr.microsoft.com/devcontainers/python:1-3.11-bullseye",
"build": {
"dockerfile": "Dockerfile"
},
"features": {
"ghcr.io/devcontainers/features/azure-cli:1": {
"installBicep": true,
Expand Down Expand Up @@ -37,4 +39,4 @@
"hostRequirements": {
"memory": "4gb"
}
}
}
640 changes: 386 additions & 254 deletions .github/workflows/CAdeploy.yml

Large diffs are not rendered by default.

65 changes: 0 additions & 65 deletions .github/workflows/Create-Release.yml

This file was deleted.

16 changes: 15 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
<hr>
<h3 align="center">
<b>⚠️ This repository is no longer maintained ⚠️</b>
</h3>
<hr>

# Build your own copilot solution accelerator

This solution accelerator is a powerful tool that helps you create your own copilots. The accelerator can be used by any customer looking for reusable architecture and code snippets to build custom copilots with their own enterprise data.
Expand Down Expand Up @@ -192,9 +198,17 @@ Check out similar solution accelerators
| [Content&nbsp;processing](https://github.com/microsoft/content-processing-solution-accelerator) | Programmatically extract data and apply schemas to unstructured documents across text-based and multi-modal content using Azure AI Foundry, Azure OpenAI, Azure AI Content Understanding, and Azure Cosmos DB. |



<br/>

💡 Want to get familiar with Microsoft's AI and Data Engineering best practices? Check out our playbooks to learn more

| Playbook | Description |
|:---|:---|
| [AI&nbsp;playbook](https://learn.microsoft.com/en-us/ai/playbook/) | The Artificial Intelligence (AI) Playbook provides enterprise software engineers with solutions, capabilities, and code developed to solve real-world AI problems. |
| [Data&nbsp;playbook](https://learn.microsoft.com/en-us/data-engineering/playbook/understanding-data-playbook) | The data playbook provides enterprise software engineers with solutions which contain code developed to solve real-world problems. Everything in the playbook is developed with, and validated by, some of Microsoft's largest and most influential customers and partners. |

<br/>

### Version history

An updated version of the **Build Your Own Copilot** solution accelerator was published on `04/24/2025`. If you deployed the accelerator prior to that date, please note the following changes:
Expand Down
3 changes: 2 additions & 1 deletion docs/CustomizingAzdParameters.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,8 @@ By default this template will use the environment name as the prefix to prevent
| Name | Type | Default Value | Purpose |
| -----------------------------| ------- | ------------------- | ---------------------------------------------------------------------------------------------------- |
| `AZURE_ENV_NAME` | string | `azdtemp` | Used as a prefix for all resource names to ensure uniqueness across environments. |
| `AZURE_ENV_COSMOS_LOCATION` | string | `eastus2` | Location of the Cosmos DB instance. Choose from (allowed values: `swedencentral`, `australiaeast`). |
| `AZURE_ENV_COSMOS_LOCATION` | string | `Same as resource group location` | Primary location for the Cosmos DB instance. When enabling redundancy, verify the region supports zone redundancy. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_COSMOS_SECONDARY_LOCATION` | string | `canadacentral` | Secondary failover location for Cosmos DB when enableRedundancy is true. [Check supported regions](https://learn.microsoft.com/en-us/azure/reliability/regions-list). |
| `AZURE_ENV_MODEL_DEPLOYMENT_TYPE` | string | `GlobalStandard` | Change the Model Deployment Type (allowed values: Standard, GlobalStandard). |
| `AZURE_ENV_MODEL_NAME` | string | `gpt-4o-mini` | Set the GPT model name (allowed values: `gpt-4o`). |
| `AZURE_ENV_MODEL_VERSION` | string | `2025-01-01-preview` | Set the Azure OpenAI API version (allowed values: 2024-08-06). |
Expand Down
3 changes: 2 additions & 1 deletion docs/DeploymentGuide.md
Original file line number Diff line number Diff line change
Expand Up @@ -236,7 +236,8 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
5. Once the deployment is complete, please follow the [Import Sample Data](#post-deployment-steps) instructions under **Post Deployment Steps** to load the sample data correctly.
6. Open the [Azure Portal](https://portal.azure.com/), go to the deployed resource group, find the App Service and get the app URL from `Default domain`.
7. Test the app locally with the sample question with any selected client: _Show latest asset value by asset type?_. For more sample questions you can test in the application, see [Sample Questions](SampleQuestions.md).
8. You can now delete the resources by running `azd down`, if you are done trying out the application.
8. You can now delete the resources by running `azd down`, if you are done trying out the application.
> **Note:** If you deployed with `enableRedundancy=true` and Log Analytics workspace replication is enabled, you must first disable replication before running `azd down`, else resource group delete will fail. Follow the steps in [Handling Log Analytics Workspace Deletion with Replication Enabled](./LogAnalyticsReplicationDisable.md), wait until replication returns `false`, then run `azd down`.

### Publishing Local Build Container to Azure Container Registry

Expand Down
28 changes: 28 additions & 0 deletions docs/LogAnalyticsReplicationDisable.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,28 @@
# 🛠 Handling Log Analytics Workspace Deletion with Replication Enabled

If redundancy (replication) is enabled for your Log Analytics workspace, you must disable it before deleting the workspace or resource group. Otherwise, deletion will fail.

## ✅ Steps to Disable Replication Before Deletion
Run the following Azure CLI command. Note: This operation may take about 5 minutes to complete.

```bash
az resource update --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --set properties.replication.enabled=false
```

Replace:
- `{subscriptionId}` → Your Azure subscription ID
- `{resourceGroupName}` → The name of your resource group
- `{logAnalyticsName}` → The name of your Log Analytics workspace

Optional: Verify replication is disabled (should output `false`):
```bash
az resource show --ids "/subscriptions/{subscriptionId}/resourceGroups/{resourceGroupName}/providers/Microsoft.OperationalInsights/workspaces/{logAnalyticsName}" --query properties.replication.enabled -o tsv
```

## ✅ After Disabling Replication
You can safely delete:
- The Log Analytics workspace (manual)
- The resource group (manual), or
- All provisioned resources via `azd down`

Return to: [Deployment Guide](./DeploymentGuide.md)
78 changes: 38 additions & 40 deletions infra/main.bicep
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,10 @@ param solutionName string = 'clientadvisor'
param existingLogAnalyticsWorkspaceId string = ''

@description('Optional. CosmosDB Location')
param cosmosLocation string = 'eastus2'
param cosmosLocation string = resourceGroup().location

@description('Optional. Secondary CosmosDB Location for high availability and failover scenarios. Not all Azure regions support zone redundancy for Cosmos DB. See https://learn.microsoft.com/azure/cosmos-db/high-availability#azure-regions-and-zone-redundancy for supported regions.')
param secondaryCosmosLocation string = 'canadacentral'

@minLength(1)
@description('Optional. GPT model deployment type:')
Expand Down Expand Up @@ -231,30 +234,13 @@ var replicaLocation = replicaRegionPairs[resourceGroup().location]
@description('Optional. The tags to apply to all deployed Azure resources.')
param tags resourceInput<'Microsoft.Resources/resourceGroups@2025-04-01'>.tags = {}

// Region pairs list based on article in [Azure Database for MySQL Flexible Server - Azure Regions](https://learn.microsoft.com/azure/mysql/flexible-server/overview#azure-regions) for supported high availability regions for CosmosDB.
var cosmosDbZoneRedundantHaRegionPairs = {
australiaeast: 'uksouth' //'southeastasia'
centralus: 'eastus2'
eastasia: 'southeastasia'
eastus: 'centralus'
eastus2: 'centralus'
japaneast: 'australiaeast'
northeurope: 'westeurope'
southeastasia: 'eastasia'
uksouth: 'westeurope'
westeurope: 'northeurope'
}

var allTags = union(
{
'azd-env-name': solutionName
},
tags
)

// Paired location calculated based on 'location' parameter. This location will be used by applicable resources if `enableScalability` is set to `true`
var cosmosDbHaLocation = cosmosDbZoneRedundantHaRegionPairs[resourceGroup().location]

// Extracts subscription, resource group, and workspace name from the resource ID when using an existing Log Analytics workspace
var useExistingLogAnalytics = !empty(existingLogAnalyticsWorkspaceId)

Expand Down Expand Up @@ -557,7 +543,7 @@ module keyvault 'br/public:avm/res/key-vault/vault:0.12.1' = {
name: keyVaultName
location: solutionLocation
tags: tags
sku: 'standard'
sku: enableScalability ? 'premium' : 'standard'
publicNetworkAccess: enablePrivateNetworking ? 'Disabled' : 'Enabled'
networkAcls: {
defaultAction: 'Allow'
Expand Down Expand Up @@ -843,12 +829,12 @@ module cosmosDb 'br/public:avm/res/document-db/database-account:0.15.0' = {
{
failoverPriority: 0
isZoneRedundant: true
locationName: solutionLocation
locationName: cosmosLocation
}
{
failoverPriority: 1
isZoneRedundant: true
locationName: cosmosDbHaLocation
locationName: secondaryCosmosLocation
}
]
: [
Expand Down Expand Up @@ -1014,22 +1000,6 @@ module sqlDBModule 'br/public:avm/res/sql/server:0.20.1' = {
]
}
primaryUserAssignedIdentityResourceId: userAssignedIdentity.outputs.resourceId
privateEndpoints: enablePrivateNetworking
? [
{
privateDnsZoneGroup: {
privateDnsZoneGroupConfigs: [
{
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.sqlServer]!.outputs.resourceId
}
]
}
service: 'sqlServer'
subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId
tags: tags
}
]
: []
firewallRules: (!enablePrivateNetworking) ? [
{
endIpAddress: '255.255.255.255'
Expand All @@ -1045,6 +1015,34 @@ module sqlDBModule 'br/public:avm/res/sql/server:0.20.1' = {
tags: tags
}
}
// ========== SQL Server Private Endpoint (separated) ========== //
module sqlDbPrivateEndpoint 'br/public:avm/res/network/private-endpoint:0.11.1' = if (enablePrivateNetworking) {
name: take('avm.res.network.private-endpoint.sql-${solutionSuffix}', 64)
params: {
name: 'pep-sql-${solutionSuffix}'
location: solutionLocation
tags: tags
enableTelemetry: enableTelemetry
subnetResourceId: virtualNetwork!.outputs.pepsSubnetResourceId
customNetworkInterfaceName: 'nic-sql-${solutionSuffix}'
privateLinkServiceConnections: [
{
name: 'pl-sqlserver-${solutionSuffix}'
properties: {
privateLinkServiceId: sqlDBModule.outputs.resourceId
groupIds: ['sqlServer']
}
}
]
privateDnsZoneGroup: {
privateDnsZoneGroupConfigs: [
{
privateDnsZoneResourceId: avmPrivateDnsZones[dnsZoneIndex.sqlServer]!.outputs.resourceId
}
]
}
}
}

// ========== Frontend server farm ========== //
// WAF best practices for Web Application Services: https://learn.microsoft.com/en-us/azure/well-architected/service-guides/app-service-web-apps
Expand All @@ -1062,11 +1060,11 @@ module webServerFarm 'br/public:avm/res/web/serverfarm:0.5.0' = {
// WAF aligned configuration for Monitoring
diagnosticSettings: enableMonitoring ? [{ workspaceResourceId: logAnalyticsWorkspaceResourceId }] : null
// WAF aligned configuration for Scalability
skuName: enableScalability || enableRedundancy ? 'P1v3' : 'B3'
skuName: 'B3'
// skuCapacity: enableScalability ? 3 : 1
skuCapacity: 1 // skuCapacity set to 1 (not 3) due to multiple agents created per type during WAF deployment
// WAF aligned configuration for Redundancy
zoneRedundant: enableRedundancy ? true : false
zoneRedundant: false // zone redundancy requires a minimum of 2 instances; as we are keeping skuCapacity to 1, setting zoneRedundant to false
}
}

Expand Down Expand Up @@ -1218,7 +1216,7 @@ module searchService 'br/public:avm/res/search/search-service:0.11.1' = {
]
partitionCount: 1
replicaCount: 1
sku: 'standard'
sku: enableScalability ? 'standard' : 'basic'
semanticSearch: 'free'
// Use the deployment tags provided to the template
tags: tags
Expand Down
Loading
Loading