Skip to content

Commit 3ba223d

Browse files
Merge pull request #876 from microsoft/dev
fix: dev to main - Add location parameter to AI search service and update package versions, improvements to local development setup
2 parents 7dd0eb2 + 8024e5f commit 3ba223d

12 files changed

Lines changed: 160 additions & 30 deletions

File tree

documents/LocalDevelopmentSetup.md

Lines changed: 49 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -293,6 +293,46 @@ Create `.vscode/settings.json` and copy the following JSON:
293293

294294
---
295295

296+
### Running with Automated Script
297+
298+
For convenience, you can use the provided startup scripts that handle environment setup and start both backend and frontend services automatically. This is the quickest way to get up and running locally.
299+
300+
> **Note**: You must complete **Step 1 (Prerequisites)** and **Step 2 (Development Tools Setup)** before using the automated scripts.
301+
302+
#### Windows (Command Prompt or PowerShell):
303+
304+
```cmd
305+
cd src
306+
.\start.cmd
307+
```
308+
309+
#### macOS/Linux/WSL:
310+
311+
```bash
312+
cd src
313+
chmod +x start.sh
314+
./start.sh
315+
```
316+
317+
### What the Scripts Do
318+
319+
The startup scripts automatically handle:
320+
- Environment variable configuration
321+
- Azure authentication
322+
- Azure RBAC role assignments (Cosmos DB, SQL Server, AI Foundry, AI Search)
323+
- Python virtual environment setup
324+
- Backend dependency installation
325+
- Frontend dependency installation
326+
- Starting both backend and frontend servers
327+
328+
> **Note**: The script includes a 30-second wait for the backend to initialize before starting the frontend. If you see connection errors initially, wait a moment and reload the page.
329+
330+
---
331+
332+
## Running Backend and Frontend Manually
333+
334+
If you prefer more control over the setup process, follow the steps below to configure and run each service individually.
335+
296336
## Step 3: Azure Authentication Setup
297337

298338
Before configuring services, authenticate with Azure:
@@ -385,13 +425,17 @@ az role assignment create \
385425
```
386426

387427
#### Cosmos DB Access
388-
389428
```bash
429+
# Get your principal ID
430+
PRINCIPAL_ID=$(az ad signed-in-user show --query id -o tsv)
431+
390432
# Assign Cosmos DB Built-in Data Contributor role
391-
az role assignment create \
392-
--role "Cosmos DB Built-in Data Contributor" \
393-
--assignee $PRINCIPAL_ID \
394-
--scope "/subscriptions/<subscription-id>/resourceGroups/<resource-group>/providers/Microsoft.DocumentDB/databaseAccounts/<cosmos-account-name>"
433+
az cosmosdb sql role assignment create \
434+
--resource-group <resource-group-name> \
435+
--account-name <cosmos-db-account-name> \
436+
--role-definition-name "Cosmos DB Built-in Data Contributor" \
437+
--principal-id $PRINCIPAL_ID \
438+
--scope /subscriptions/<subscription-id>/resourceGroups/<resource-group-name>/providers/Microsoft.DocumentDB/databaseAccounts/<cosmos-db-account-name>
395439
```
396440

397441
#### Azure Storage Access

infra/main.bicep

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -780,6 +780,7 @@ module searchServiceUpdate 'br/public:avm/res/search/search-service:0.12.0' = {
780780
params: {
781781
// Required parameters
782782
name: aiSearchName
783+
location: location
783784
enableTelemetry: enableTelemetry
784785
diagnosticSettings: enableMonitoring ? [
785786
{

infra/main.json

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
"_generator": {
77
"name": "bicep",
88
"version": "0.41.2.15936",
9-
"templateHash": "9287430903779325833"
9+
"templateHash": "949305639975172329"
1010
}
1111
},
1212
"parameters": {
@@ -28296,9 +28296,9 @@
2829628296
},
2829728297
"dependsOn": [
2829828298
"aiFoundryAiServices",
28299-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
28300-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
2830128299
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').cognitiveServices)]",
28300+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').openAI)]",
28301+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').aiServices)]",
2830228302
"virtualNetwork"
2830328303
]
2830428304
},
@@ -31613,6 +31613,9 @@
3161331613
"name": {
3161431614
"value": "[variables('aiSearchName')]"
3161531615
},
31616+
"location": {
31617+
"value": "[parameters('location')]"
31618+
},
3161631619
"enableTelemetry": {
3161731620
"value": "[parameters('enableTelemetry')]"
3161831621
},
@@ -41904,9 +41907,9 @@
4190441907
}
4190541908
},
4190641909
"dependsOn": [
41907-
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]",
4190841910
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageFile)]",
4190941911
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageQueue)]",
41912+
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageDfs)]",
4191041913
"[format('avmPrivateDnsZones[{0}]', variables('dnsZoneIndex').storageBlob)]",
4191141914
"userAssignedIdentity",
4191241915
"virtualNetwork"

infra/main_custom.bicep

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -781,6 +781,7 @@ module searchServiceUpdate 'br/public:avm/res/search/search-service:0.12.0' = {
781781
params: {
782782
// Required parameters
783783
name: aiSearchName
784+
location: location
784785
enableTelemetry: enableTelemetry
785786
diagnosticSettings: enableMonitoring ? [
786787
{
@@ -856,6 +857,9 @@ module searchServiceUpdate 'br/public:avm/res/search/search-service:0.12.0' = {
856857
]
857858
: []
858859
}
860+
dependsOn: [
861+
searchService
862+
]
859863
}
860864

861865
// ========== Search Service to AI Services Role Assignment ========== //
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,3 @@
1-
aiohttp==3.13.3
1+
aiohttp==3.13.4
22
azure-identity==1.25.2
33
azure-ai-projects==2.0.0b3

infra/scripts/index_scripts/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ azure-ai-agents==1.2.0b5
55
azure-ai-inference==1.0.0b9
66
agent-framework-core==1.0.0rc2
77
agent-framework-azure-ai==1.0.0rc2
8-
pypdf==6.6.2
8+
pypdf==6.10.0
99
tiktoken==0.12.0
1010
azure-identity==1.25.2
1111
azure-ai-textanalytics==5.3.0

infra/scripts/run_create_agents_scripts.sh

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -330,6 +330,8 @@ titleAgentName=""
330330
while IFS='=' read -r key value; do
331331
# Skip empty lines or lines without '='
332332
[ -z "$key" ] && continue
333+
# Strip trailing carriage return if present (Windows line endings)
334+
value="${value%$'\r'}"
333335
case "$key" in
334336
conversationAgentName)
335337
conversationAgentName="$value"

src/App/package-lock.json

Lines changed: 3 additions & 3 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/App/package.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
"d3-color": "$d3-color",
7171
"nth-check": "$nth-check",
7272
"flatted": "^3.4.2",
73+
"lodash": "4.18.1",
7374
"node-forge": "^1.4.0",
7475
"react-scripts": {
7576
"picomatch": "^4.0.4"

src/api/requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,9 +7,9 @@ pydantic[email]==2.11.10
77

88
# Azure SDK Core
99
azure-core==1.38.0
10-
requests==2.32.5
11-
types-requests==2.32.4.20260107
12-
aiohttp==3.13.3
10+
requests==2.33.0
11+
types-requests==2.33.0.20260408
12+
aiohttp==3.13.4
1313

1414
# Azure Services
1515
azure-identity==1.25.2
@@ -35,6 +35,6 @@ opentelemetry-instrumentation==0.60b0
3535
azure-monitor-opentelemetry==1.8.3
3636

3737
# Development tools
38-
pytest==9.0.2
38+
pytest==9.0.3
3939
pytest-cov==7.0.0
4040
pytest-asyncio==1.3.0

0 commit comments

Comments
 (0)