Skip to content

Commit 9a38b71

Browse files
Merge remote-tracking branch 'origin/dev' into psl-wafstandardization
2 parents 542140d + 564228f commit 9a38b71

File tree

9 files changed

+385
-15
lines changed

9 files changed

+385
-15
lines changed

.devcontainer/setup_env.sh

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,5 +7,3 @@ git pull
77
sudo chmod +x ./infra/scripts/checkquota_km.sh
88
sudo chmod +x ./infra/scripts/quota_check_params.sh
99
sudo chmod +x ./infra/scripts/run_process_data_scripts.sh
10-
sudo chmod +x ./infra/scripts/docker-build.sh
11-
sudo chmod +x ./infra/scripts/docker-build.ps1

.github/workflows/deploy-KMGeneric.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ on:
1414
env:
1515
GPT_MIN_CAPACITY: 150
1616
TEXT_EMBEDDING_MIN_CAPACITY: 80
17-
BRANCH_NAME: ${{ github.head_ref || github.ref_name }}
17+
BRANCH_NAME: ${{ github.event.workflow_run.head_branch || github.head_ref || github.ref_name }}
1818
jobs:
1919
deploy:
2020
runs-on: ubuntu-latest
@@ -112,15 +112,15 @@ jobs:
112112
echo "Generated SOLUTION_PREFIX: ${UNIQUE_SOLUTION_PREFIX}"
113113
- name: Determine Tag Name Based on Branch
114114
id: determine_tag
115-
run: echo "tagname=${{ github.ref_name == 'main' && 'latest_fdp' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || github.head_ref || 'default' }}" >> $GITHUB_OUTPUT
115+
run: echo "tagname=${{ github.ref_name == 'main' && 'latest_fdp' || github.ref_name == 'dev' && 'dev' || github.ref_name == 'demo' && 'demo' || github.ref_name == 'dependabotchanges' && 'dependabotchanges' || 'latest_fdp' }}" >> $GITHUB_OUTPUT
116116
- name: Deploy Bicep Template
117117
id: deploy
118118
run: |
119119
set -e
120120
az deployment group create \
121121
--resource-group ${{ env.RESOURCE_GROUP_NAME }} \
122122
--template-file infra/main.bicep \
123-
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 azureAiServiceLocation="${{ env.AZURE_LOCATION }}"
123+
--parameters solutionName=${{env.SOLUTION_PREFIX}} contentUnderstandingLocation="swedencentral" secondaryLocation="${{ env.AZURE_LOCATION }}" imageTag=${{ steps.determine_tag.outputs.tagname }} gptDeploymentCapacity=150 azureAiServiceLocation="${{ env.AZURE_LOCATION }}" createdBy="Pipeline" tags="{'SecurityControl':'Ignore'}"
124124
125125
126126

documents/DeploymentGuide.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,9 @@ Once you've opened the project in [Codespaces](#github-codespaces), [Dev Contain
224224
225225
6. If you are done trying out the application, you can delete the resources by running `azd down`.
226226
227+
### 🛠️ Troubleshooting
228+
If you encounter any issues during the deployment process, please refer [troubleshooting](../documents/TroubleShootingSteps.md) document for detailed steps and solutions
229+
227230
## Post Deployment Steps
228231
229232
1. **Add App Authentication**

documents/Images/AzureHomePage.png

67.1 KB
Loading
54.6 KB
Loading

documents/TroubleShootingSteps.md

Lines changed: 354 additions & 0 deletions
Large diffs are not rendered by default.

infra/deploy_app_service.bicep

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,6 @@
11
// ========== Key Vault ========== //
22
targetScope = 'resourceGroup'
33

4-
@minLength(3)
5-
@maxLength(16)
64
@description('Required. Contains Solution Name.')
75
param solutionName string
86

infra/main.bicep

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -139,6 +139,9 @@ param existingLogAnalyticsWorkspaceId string = ''
139139
@description('Optional. Use this parameter to use an existing AI project resource ID')
140140
param existingAiFoundryAiProjectResourceId string = ''
141141

142+
@description('Optional. created by user name')
143+
param createdBy string = empty(deployer().userPrincipalName) ? '' : split(deployer().userPrincipalName, '@')[0]
144+
142145
@maxLength(5)
143146
@description('Optional. A unique text value for the solution. This is used to ensure resource names are unique for global resources. Defaults to a 5-character substring of the unique string generated from the subscription ID, resource group name, and solution name.')
144147
param solutionUniqueText string = substring(uniqueString(subscription().id, resourceGroup().name, solutionName), 0, 5)
@@ -196,11 +199,18 @@ var logAnalyticsWorkspaceResourceId = useExistingLogAnalytics
196199
resource resourceGroupTags 'Microsoft.Resources/tags@2021-04-01' = {
197200
name: 'default'
198201
properties: {
199-
tags: {
200-
...tags
201-
TemplateName: 'KM Generic'
202-
SecurityControl: 'Ignore'
203-
}
202+
tags: union(
203+
reference(
204+
resourceGroup().id,
205+
'2021-04-01',
206+
'Full'
207+
).tags ?? {},
208+
{
209+
TemplateName: 'KM Generic'
210+
CreatedBy: createdBy
211+
},
212+
tags
213+
)
204214
}
205215
}
206216

infra/main.json

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"_generator": {
66
"name": "bicep",
77
"version": "0.37.4.10188",
8-
"templateHash": "7263803858241829495"
8+
"templateHash": "4854945365103887323"
99
}
1010
},
1111
"parameters": {
@@ -166,6 +166,13 @@
166166
"metadata": {
167167
"description": "Optional. A unique text value for the solution. This is used to ensure resource names are unique for global resources. Defaults to a 5-character substring of the unique string generated from the subscription ID, resource group name, and solution name."
168168
}
169+
},
170+
"createdBy": {
171+
"type": "string",
172+
"defaultValue": "[if(empty(deployer().userPrincipalName), '', split(deployer().userPrincipalName, '@')[0])]",
173+
"metadata": {
174+
"description": "Optional created by user name"
175+
}
169176
}
170177
},
171178
"variables": {
@@ -180,7 +187,7 @@
180187
"apiVersion": "2021-04-01",
181188
"name": "default",
182189
"properties": {
183-
"tags": "[shallowMerge(createArray(parameters('tags'), createObject('TemplateName', 'KM Generic')))]"
190+
"tags": "[union(coalesce(reference(resourceGroup().id, '2021-04-01', 'Full').tags, createObject()), createObject('TemplateName', 'KM Generic', 'CreatedBy', parameters('createdBy')), parameters('tags'))]"
184191
}
185192
},
186193
{
@@ -2258,7 +2265,7 @@
22582265
"value": "[format('cosmos-{0}', variables('solutionSuffix'))]"
22592266
},
22602267
"solutionLocation": {
2261-
"value": "[parameters('secondaryLocation')]"
2268+
"value": "[variables('solutionLocation')]"
22622269
},
22632270
"keyVaultName": {
22642271
"value": "[reference(extensionResourceId(format('/subscriptions/{0}/resourceGroups/{1}', subscription().subscriptionId, resourceGroup().name), 'Microsoft.Resources/deployments', 'deploy_keyvault'), '2022-09-01').outputs.keyvaultName.value]"

0 commit comments

Comments
 (0)