You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
>[!Alert] After you sign in to the VM, you may see a window that asks you to protect your files and memories by backing up your PC. If you see this window, select **Opt-out of backup**. Then, on the **Backup is recommended** page, select **Skip for now**.
@@ -51,17 +50,14 @@ Your lab environment comes pre-configured with the necessary software:
51
50
- Azure Developer CLI (AZD) for simplified deployment workflows
52
51
- Docker for the Durable Task emulator and Azurite support
53
52
54
-
55
-
> [+hint] Ignore any blue "Sign in required" notification stating...
56
-
>> "Your device is having problems with your work or school account" or an "Activate Windows" watermark at the bottom right of the screen. Simply select "Not now" on any prompts and continue with the lab. These notifications will not affect your lab experience.
3.[]**Azure AI Foundry:** (*https://ai.azure.com*).
64
57
58
+
> [!note]
59
+
> When you open the Azure Portal and Azure Foundry tabs, you may see login pages. Don't worry about signing in yet - you'll receive the Azure credentials in **Step 4** when you begin the resource provisioning process. For now, you can leave these tabs open in the background.
60
+
65
61
===
66
62
67
63
## **2** - Clone the repository and launch VS Code
@@ -117,72 +113,64 @@ After signing into GitHub, go back to VS Code and complete the Copilot setup:
> [+hint] (Optional) MCP Server Access Restriction Workaround
122
-
>
123
-
> If your organization has disabled MCP server functionality via GitHub policy settings in the admin console, you may not be able to test the MCP tools in later exercises. This restriction affects how GitHub Copilot can connect to external MCP endpoints.
124
-
>
125
-
> **Workarounds:**
126
-
> - Use a GitHub account that is not managed by your organization
127
-
> - Use the MCP Inspector tool (instructions will be provided in the optional section later in the lab)
128
-
>
129
-
> This will only affect the MCP tool testing portions - all other parts of the lab will work normally regardless of policy settings.
130
-
131
116
===
132
117
133
118
## **4** - Start resource provisioning with azd (runs in background)
134
119
135
120
Now, you'll use the Azure Developer CLI (azd) to *start* provisioning all the necessary Azure resources for Snippy. This process takes several minutes (5-10) and will run in the background while you work on the coding exercises.
136
121
137
-
1.[]**Login to azd:**
138
-
Open your terminal inside VS Code (*View → Terminal*) and log in to Azure (ensure you are in the *snippy* root directory):
122
+
1.[] Open your terminal inside VS Code (*View → Terminal*) and log in to Azure (ensure you are in the *snippy* root directory):
Follow the prompts to authenticate in your browser. Close the browser tab after successful login and return to VS Code.
139
+
Return to VS Code after login.
152
140
153
-
3.[]**Set up the azd Environment:**
141
+
4.[]**Set up the azd Environment:**
154
142
155
143
An azd environment stores configuration details like subscription ID and location. Create a new environment for this lab (this will be unique to each lab environment):
156
144
157
-
`azd env new snippymcplab-@lab.labinstance.id --subscription @lab.cloudsubscription.id`
145
+
`azd env new snippymcplab-@lab.labinstance.id --subscription @lab.cloudsubscription.id`
158
146
159
-
4.[]**Set the name suffix for Azure resources:**
147
+
5.[]**Set the name suffix for Azure resources:**
160
148
161
149
The name suffix will be added at the end of the resources deployed to Azure.
162
150
163
-
`azd env set NAME_SUFFIX @lab.labInstance.id`
151
+
`azd env set NAME_SUFFIX @lab.labInstance.id`
164
152
165
-
5.[]**Provision and Deploy Resources:**
153
+
6.[]**Provision and Deploy Resources:**
166
154
167
155
Run the following command. This reads the infrastructure definition (*infra* folder, *main.bicep*) and begins creating the resources in Azure.
168
156
169
-
**Do not wait for it to complete.**
170
-
171
-
It will run in the background. Proceed immediately to the next step while it runs.
157
+
`azd provision`
172
158
173
-
Run `azd provision` to provision all the Azure resources needed to run snippy.
174
-
175
-
If prompted, select a location from the terminal to deploy the Azure resources.
159
+
If prompted, select a location from the terminal to deploy the Azure resources.
176
160
161
+
**Do not wait for it to complete.**
162
+
163
+
It will run in the background. Proceed immediately to the next step while it runs.
164
+
177
165
> [!knowledge] This command provisions Azure resources such as:
178
166
> * Azure Function App (using the scalable Flex Consumption plan)
179
167
> * Azure Storage Account (for Functions operations and state)
180
168
> * Azure Cosmos DB for NoSQL (pre-configured for vector search)
181
169
> * Azure AI Services (with *gpt-4o-mini* and *text-embedding-3-small* models deployed)
182
-
> * Azure AI Foundry resources (Project, for AI Agents Service)
> * Managed Identity (for secure access to Azure resources)
186
174
187
175
> [!hint] These resources are created within a new resource group named **rg-snippymcplab-@lab.labinstance.id**. You will deploy your application code to the Function App later using *azd deploy*.
188
176
@@ -267,7 +255,7 @@ Azure Functions provides a serverless platform for building AI-integrated micros
267
255
268
256
### 5.3 Review: Embeddings Input Binding
269
257
270
-
1. [] Look at the decorator chain above *http_save_snippet* (line 105) and*mcp_save_snippet* (line 174)
258
+
1. [] Look at the decorator chain above *http_save_snippet* (line 104) and*mcp_save_snippet* (line 180)
271
259
272
260
2. [] **Examine the embeddings input binding:**
273
261
@@ -513,7 +501,13 @@ Let's first install the Python packages required by the Function App:
5. [] (Optional) If forany reason the *local.settings.json*file wasn't properly generated or is missing values, you can manually run the generation script:
504
+
5. [] **Only needed if settings are missing**
505
+
506
+
If forany reason the *local.settings.json*file wasn't properly generated or is missing values, you can manually run the generation script from the root directory:
507
+
508
+
```powershell
509
+
cd $HOME\snippy\ # Or C:\Users\LabUser\snippy\
510
+
```
517
511
518
512
```powershell
519
513
# From the snippy root directory
@@ -536,17 +530,17 @@ The agent-framework-azurefunctions library requires the Durable Task emulator to
536
530
537
531
2. [] Start the Docker Compose services in detached mode:
538
532
539
-
`docker compose up -d`
533
+
If prompted to allow network access, select **Allow** to continue.
540
534
541
-
This starts the Durable Task emulator container which the agents will use for state persistence.
535
+
`docker compose up -d`
542
536
543
-
If prompted to allow network access, select **Allow** to continue.
537
+
This starts the Durable Task emulator container which the agents will use for state persistence.
544
538
545
539
3. [] Verify the container is running:
546
540
547
541
`docker compose ps`
548
542
549
-
You should see the durable task emulator service running.
543
+
You should see the durable task emulator service runningas well as azurite.
550
544
551
545
552
546
> [!note]
@@ -564,7 +558,14 @@ Now that *local.settings.json* points to your actual Azure resources provisioned
564
558
565
559
`az login --use-device-code`
566
560
567
-
>[!note] This command will output a URLand a device code. Copy the code, **Ctrl+Click** the URL to open it, then paste the code when prompted to complete authentication.
561
+
> [!note]
562
+
> This command will output a URLand a device code.
563
+
>
564
+
> Copy the code - highlight, then **Ctrl+C**
565
+
>
566
+
> Open the URL- mouseover, then **Ctrl+Click**
567
+
>
568
+
> Paste the code when prompted to complete authentication.
568
569
569
570
2. [] Go back to the VS Code terminal and enter `1` to pick the subscription.
570
571
@@ -614,6 +615,7 @@ Now that *local.settings.json* points to your actual Azure resources provisioned
- [] In Copilot Chat, lets try explicity using the server and enter `#local-snippy get the snippet named ai-agents-service-usage`, then select **Enter** or **Send**.
699
+
- [] In Copilot Chat, enter
700
+
701
+
`#local-snippy get the snippet named ai-agents-service-usage`
702
+
703
+
select **Enter**or**Send**.
691
704
- [] Copilot will suggest using the **get_snippet** tool - Select **Allow**.
@@ -756,7 +772,10 @@ Now you'll test the `generate_comprehensive_documentation` tool, which orchestra
756
772
- All focused on MCP tools and vector search capabilities as requested
757
773
758
774
6. [] **Review the Completed Orchestration in the Dashboard**:
759
-
- Return to the Durable Task Scheduler UI at `http://localhost:8082/`
775
+
- Return to the Durable Task Scheduler UI at
776
+
777
+
`http://localhost:8082/`
778
+
760
779
- Find your completed orchestration instance in the list (it should show **Completed** status)
761
780
- Click on the orchestration to view its detailed execution history:
762
781
-**Timeline view**: See the sequence of all agent calls and their durations
@@ -786,7 +805,9 @@ Now you'll test the `generate_comprehensive_documentation` tool, which orchestra
786
805
787
806
You've implemented the code and verified it works locally against your provisioned cloud resources. Now, deploy the application code to the Azure Function App created by *azd provision*.
788
807
789
-
1. [] Go back to the Terminal and stop the local Functions host if it's still running (**Ctrl+C** in the *func start* terminal - wait a few seconds).
808
+
1. [] Go back to the Terminal and stop the local Functions host (View-> Terminal)
809
+
810
+
If it's still running - **Ctrl+C** in the *func start* terminal - wait a few seconds.
790
811
791
812
2. [] Ensure your terminal isin the root *snippy* directory (the one containing *azure.yaml*).
792
813
@@ -807,7 +828,7 @@ You've implemented the code and verified it works locally against your provision
807
828
* Deploys the code to the Azure Function App provisioned earlier.
808
829
* Configures the application settings in the deployed Function App based on your *.azure/snippy-mcp-lab-@lab.labinstance.id/.env*file, ensuring it can connect to OpenAI, Cosmos DB, etc., in the cloud.
809
830
810
-
4. [] Wait for the deployment to complete successfully. AZD will output the endpoints for your deployed application, including the Function App's base URL (e.g., *https://func-api-...azurewebsites.net*). Make a note of this URL.
831
+
4. [] Wait for the deployment to complete successfully. AZD will output the endpoints for your deployed application, including the Function App's base URL (e.g., *https://func-api-...azurewebsites.net*).
0 commit comments