Skip to content

Commit cd284d7

Browse files
authored
End to end walkthrough cleanup (#42)
1 parent 5512fbf commit cd284d7

File tree

9 files changed

+307
-41
lines changed

9 files changed

+307
-41
lines changed

README.md

Lines changed: 11 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ Follow these instructions to deploy this example to your Azure subscription, try
6161

6262
If you're executing this from WSL, be sure the Azure CLI is installed in WSL and is not using the version installed in Windows. `which az` should show `/usr/bin/az`.
6363

64-
- The [az Bicep tools installed](https://learn.microsoft.com/azure/azure-resource-manager/bicep/install)
65-
6664
### 1. :rocket: Deploy the infrastructure
6765

6866
The following steps are required to deploy the infrastructure from the command line.
@@ -98,7 +96,7 @@ The following steps are required to deploy the infrastructure from the command l
9896
1. Create a resource group and deploy the infrastructure.
9997

10098
*There is an optional tracking ID on this deployment. To opt out of its use, add the following parameter to the deployment code below: `-p telemetryOptOut true`.*
101-
99+
102100
```bash
103101
RESOURCE_GROUP=rg-chat-basic-${LOCATION}
104102
az group create -l $LOCATION -n $RESOURCE_GROUP
@@ -150,11 +148,9 @@ Here you'll test your flow by invoking it directly from the Azure AI Foundry por
150148

151149
1. Click **Start compute session**.
152150

153-
1. :clock8: Wait for that button to change to *Compute session running*. This may take about five minutes.
154-
155-
If you get an error related to pip and dependency resolver, this is because of the temporary workaround you followed in the prior steps, this is safe to ignore.
151+
1. :clock8: Wait for that button to change to *Compute session running*. This may take about six minutes.
156152

157-
*Do not advance until the serverless compute is running.*
153+
*Do not advance until the serverless compute session is running.*
158154

159155
1. Click the enabled **Chat** button on the UI.
160156

@@ -174,7 +170,7 @@ Here you'll take your tested flow and deploy it to a managed online endpoint.
174170

175171
- **Deployment name**: ept-chat-deployment
176172
- **Virtual machine**: Choose a small virtual machine size from which you have quota. 'Standard_D2as_v4' is plenty for this sample.
177-
- **Instance count**: 3. This is the recommended minimum count.
173+
- **Instance count**: 3. *This is the recommended minimum count.*
178174
- **Inferencing data collection**: Enabled
179175

180176
1. Set the following Advanced settings, and click **Next**.
@@ -196,7 +192,7 @@ Here you'll take your tested flow and deploy it to a managed online endpoint.
196192

197193
1. :clock9: Wait for the deployment to finish creating.
198194

199-
The deployment can take over ten minutes to create. To check on the process, navigate to the **Deployments** screen using the link in the left navigation. Eventually 'ept-chat-deployment' will be on this list and then eventually the deployment will be listed with a State of 'Succeeded'. Use the **Refresh** button as needed.
195+
The deployment can take over ten minutes to create. To check on the process, navigate to the deployments screen using **Models + endpoints** the link in the left navigation. Eventually 'ept-chat-deployment' will be on this list and the deployment will be listed with a State of 'Succeeded'. Use the **Refresh** button as needed.
200196

201197
*Do not advance until this deployment is complete.*
202198

@@ -215,12 +211,12 @@ Workloads build chat functionality into an application. Those interfaces usually
215211
```bash
216212
APPSERVICE_NAME=app-$BASE_NAME
217213

218-
az webapp deploy -g $RESOURCE_GROUP -n $APPSERVICE_NAME --type zip --src-url https://raw.githubusercontent.com/Azure-Samples/openai-end-to-end-basic/main/website/chatui.zip
214+
az webapp deploy -g $RESOURCE_GROUP -n $APPSERVICE_NAME --type zip --src-url https://github.com/Azure-Samples/openai-end-to-end-basic/raw/refs/heads/main/website/chatui.zip
219215
```
220216

221-
> Sometimes the prior deployment will fail with a `GatewayTimeout`. If you receive that error, you're safe to simply execute the command again.
217+
> Sometimes the prior command will fail with a `GatewayTimeout`. If you receive that error, you're safe to simply execute the command again.
222218
223-
## :checkered_flag: Try it out. Test the deployed application.
219+
## :checkered_flag: Try it out. Test the deployed application
224220

225221
After the deployment is complete, you can try the deployed application by navigating to the Web App's URL in a web browser.
226222

@@ -230,15 +226,16 @@ You can also execute the following from your workstation. Unfortunately, this co
230226
az webapp browse -g $RESOURCE_GROUP -n $APPSERVICE_NAME
231227
```
232228

233-
Once you're there, ask your solution a question. Like before, you question should ideally involve recent data or events, something that would only be known by the RAG process including content from Wikipedia.
229+
Once you're there, ask your solution a question. Like before, you question should ideally involve recent data or events, something that would only be known by the RAG process including context from Wikipedia.
234230

235231
## :broom: Clean up resources
236232

237-
Most Azure resources deployed in the prior steps will incur ongoing charges unless removed. Additionally, a few of the resources deployed go into a soft delete status which may restrict the ability to redeploy another resource with the same name and may not release quota, so it is best to purge any soft deleted resources once you are done exploring. Use the following commands to delete the deployed resources and resource group and to purge each of the resources with soft delete.
233+
Most Azure resources deployed in the prior steps will incur ongoing charges unless removed. Additionally, a few of the resources deployed go into a soft delete status which will restrict the ability to redeploy another resource with the same name and might not release quota. It's best to purge any soft deleted resources once you are done exploring. Use the following commands to delete the deployed resources and resource group and to purge each of the resources with soft delete.
238234

239235
> **Note:** This will completely delete any data you may have included in this example and it will be unrecoverable.
240236
241237
```bash
238+
# These deletes and purges take about 30 minutes to run.
242239
az group delete -n $RESOURCE_GROUP -y
243240

244241
# Purge the soft delete resources

infra-as-code/bicep/acr.bicep

Lines changed: 13 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ resource logWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' exis
2525
name: logWorkspaceName
2626
}
2727

28-
resource acrResource 'Microsoft.ContainerRegistry/registries@2023-01-01-preview' = {
28+
resource acrResource 'Microsoft.ContainerRegistry/registries@2024-11-01-preview' = {
2929
name: acrName
3030
location: location
3131
sku: {
@@ -41,18 +41,28 @@ resource acrResource 'Microsoft.ContainerRegistry/registries@2023-01-01-preview'
4141
networkRuleBypassOptions: 'None'
4242
publicNetworkAccess: 'Enabled'
4343
zoneRedundancy: 'Disabled'
44+
dataEndpointEnabled: true
45+
metadataSearch: 'Disabled'
4446
}
4547
}
4648

4749
//ACR diagnostic settings
4850
resource acrResourceDiagSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
49-
name: '${acrResource.name}-diagnosticSettings'
51+
name: 'default'
5052
scope: acrResource
5153
properties: {
5254
workspaceId: logWorkspace.id
5355
logs: [
5456
{
55-
categoryGroup: 'allLogs'
57+
category: 'ContainerRegistryRepositoryEvents'
58+
enabled: true
59+
retentionPolicy: {
60+
enabled: false
61+
days: 0
62+
}
63+
}
64+
{
65+
category: 'ContainerRegistryLoginEvents'
5666
enabled: true
5767
retentionPolicy: {
5868
enabled: false

infra-as-code/bicep/keyvault.bicep

Lines changed: 16 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ resource logWorkspace 'Microsoft.OperationalInsights/workspaces@2022-10-01' exis
2121
name: logWorkspaceName
2222
}
2323

24-
resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
24+
resource keyVault 'Microsoft.KeyVault/vaults@2024-11-01' = {
2525
name: keyVaultName
2626
location: location
2727
properties: {
@@ -32,13 +32,18 @@ resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
3232
networkAcls: {
3333
defaultAction: 'Allow' // Production readiness change: This sample uses identity as the perimeter. Production scenarios should layer in network perimeter control as well.
3434
bypass: 'AzureServices' // Required for AppGW communication if firewall is enabled in the future.
35+
ipRules: []
36+
virtualNetworkRules: []
3537
}
3638

3739
tenantId: subscription().tenantId
3840

3941
enableRbacAuthorization: true // Using RBAC
4042
enabledForDeployment: true // VMs can retrieve certificates
4143
enabledForTemplateDeployment: true // ARM can retrieve values
44+
accessPolicies: [] // Using RBAC
45+
publicNetworkAccess: 'Enabled' // Production readiness change: This sample uses identity as the perimeter. Production scenarios should layer in network perimeter control as well.
46+
enabledForDiskEncryption: false
4247

4348
enableSoftDelete: true
4449
softDeleteRetentionInDays: 7
@@ -48,13 +53,21 @@ resource keyVault 'Microsoft.KeyVault/vaults@2019-09-01' = {
4853

4954
//Key Vault diagnostic settings
5055
resource keyVaultDiagSettings 'Microsoft.Insights/diagnosticSettings@2021-05-01-preview' = {
51-
name: '${keyVault.name}-diagnosticSettings'
56+
name: 'default'
5257
scope: keyVault
5358
properties: {
5459
workspaceId: logWorkspace.id
5560
logs: [
5661
{
57-
categoryGroup: 'allLogs'
62+
category: 'AuditEvent'
63+
enabled: true
64+
retentionPolicy: {
65+
enabled: false
66+
days: 0
67+
}
68+
}
69+
{
70+
category: 'AzurePolicyEvaluationDetails'
5871
enabled: true
5972
retentionPolicy: {
6073
enabled: false

0 commit comments

Comments
 (0)