Skip to content

Commit b6e2607

Browse files
authored
Update doc on free deployment with video and other tips (#1204)
* Some clarifications on readme * Update with location
1 parent d868563 commit b6e2607

File tree

2 files changed

+30
-15
lines changed

2 files changed

+30
-15
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ The repo includes sample data so it's ready to try end to end. In this sample ap
7575

7676
**IMPORTANT:** In order to deploy and run this example, you'll need:
7777

78-
* **Azure account**. If you're new to Azure, [get an Azure account for free](https://azure.microsoft.com/free/cognitive-search/) and you'll get some free Azure credits to get started.
78+
* **Azure account**. If you're new to Azure, [get an Azure account for free](https://azure.microsoft.com/free/cognitive-search/) and you'll get some free Azure credits to get started. See [guide to deploying with the free trial](docs/deploy_lowcost.md).
7979
* **Azure subscription with access enabled for the Azure OpenAI service**. You can request access with [this form](https://aka.ms/oaiapply). If your access request to Azure OpenAI service doesn't match the [acceptance criteria](https://learn.microsoft.com/legal/cognitive-services/openai/limited-access?context=%2Fazure%2Fcognitive-services%2Fopenai%2Fcontext%2Fcontext), you can use [OpenAI public API](https://platform.openai.com/docs/api-reference/introduction) instead. Learn [how to switch to an OpenAI instance](#openaicom-openai).
8080
* **Azure account permissions**:
8181
* Your Azure account must have `Microsoft.Authorization/roleAssignments/write` permissions, such as [Role Based Access Control Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview), [User Access Administrator](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#user-access-administrator), or [Owner](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#owner). If you don't have subscription-level permissions, you must be granted [RBAC](https://learn.microsoft.com/azure/role-based-access-control/built-in-roles#role-based-access-control-administrator-preview) for an existing resource group and [deploy to that existing group](#existing-resource-group).
@@ -198,7 +198,7 @@ When you run `azd up` after and are prompted to select a value for `openAiResour
198198
1. Run `azd env set AZURE_SEARCH_SERVICE_RESOURCE_GROUP {Name of existing resource group with ACS service}`
199199
1. If that resource group is in a different location than the one you'll pick for the `azd up` step,
200200
then run `azd env set AZURE_SEARCH_SERVICE_LOCATION {Location of existing service}`
201-
1. If the search service's SKU is not standard, then run `azd env set AZURE_SEARCH_SERVICE_SKU {Name of SKU}`. The free tier won't work as it doesn't support managed identity. If your existing search service is using the free tier, you will need to deploy a new service since [search SKUs cannot be changed](https://learn.microsoft.com/azure/search/search-sku-tier#tier-upgrade-or-downgrade). ([See other possible SKU values](https://learn.microsoft.com/azure/templates/microsoft.search/searchservices?pivots=deployment-language-bicep#sku))
201+
1. If the search service's SKU is not standard, then run `azd env set AZURE_SEARCH_SERVICE_SKU {Name of SKU}`. If you specify the free tier, then your app will no longer be able to use semantic ranker, and it will use keys instead of managed identity for accessing the search service. Be advised that [search SKUs cannot be changed](https://learn.microsoft.com/azure/search/search-sku-tier#tier-upgrade-or-downgrade). ([See other possible SKU values](https://learn.microsoft.com/azure/templates/microsoft.search/searchservices?pivots=deployment-language-bicep#sku))
202202
1. If you have an existing index that is set up with all the expected fields, then run `azd env set AZURE_SEARCH_INDEX {Name of existing index}`. Otherwise, the `azd up` command will create a new index.
203203

204204
You can also customize the search service (new or existing) for non-English searches:

docs/deploy_lowcost.md

Lines changed: 28 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -4,15 +4,26 @@ This AI RAG chat application is designed to be easily deployed using the Azure D
44

55
However, if your goal is to minimize costs while prototyping your application, follow these steps below _before_ deploying the application.
66

7-
1. Use the free tier of App Service:
7+
[📺 Live stream: Deploying from a free account](https://www.youtube.com/watch?v=nlIyos0RXHw)
8+
9+
1. Create a new azd environment for the free resource group:
10+
11+
```shell
12+
azd env new
13+
```
14+
15+
Enter a name that will be used for the resource group.
16+
This will create a new folder in the `.azure` folder, and set it as the active environment for any calls to `azd` going forward.
17+
18+
2. Use the free tier of App Service:
819

920
```shell
1021
azd env set AZURE_APP_SERVICE_SKU F1
1122
```
1223

1324
Limitation: You are only allowed a certain number of free App Service instances per region. If you have exceeded your limit in a region, you will get an error during the provisioning stage. If that happens, you can run `azd down`, then `azd env new` to create a new environment with a new region.
1425

15-
2. Use the free tier of Azure AI Search:
26+
3. Use the free tier of Azure AI Search:
1627

1728
```shell
1829
azd env set AZURE_SEARCH_SERVICE_SKU free
@@ -27,7 +38,7 @@ However, if your goal is to minimize costs while prototyping your application, f
2738
3. The free tier does not support Managed Identity (keyless API access),
2839
so the Bicep will use Azure Key Vault to securely store the key instead.
2940

30-
3. Use the free tier of Azure Document Intelligence (used in analyzing PDFs):
41+
4. Use the free tier of Azure Document Intelligence (used in analyzing PDFs):
3142

3243
```shell
3344
azd env set AZURE_FORMRECOGNIZER_SKU F0
@@ -43,7 +54,7 @@ However, if your goal is to minimize costs while prototyping your application, f
4354
azd env set USE_LOCAL_PDF_PARSER true
4455
```
4556
46-
3. Turn off Azure Monitor (Application Insights):
57+
5. Turn off Azure Monitor (Application Insights):
4758
4859
```shell
4960
azd env set AZURE_USE_APPLICATION_INSIGHTS false
@@ -52,7 +63,18 @@ However, if your goal is to minimize costs while prototyping your application, f
5263
Application Insights is quite inexpensive already, so turning this off may not be worth the costs saved,
5364
but it is an option for those who want to minimize costs.
5465
55-
4. Disable vector search:
66+
6. Use OpenAI.com instead of Azure OpenAI: This is only a necessary step for Azure free/student accounts, as they do not currently have access to Azure OpenAI.
67+
68+
```shell
69+
azd env set OPENAI_HOST openai
70+
azd env set OPENAI_ORGANIZATION {Your OpenAI organization}
71+
azd env set OPENAI_API_KEY {Your OpenAI API key}
72+
```
73+
74+
Both Azure OpenAI and openai.com OpenAI accounts will incur costs, based on tokens used,
75+
but the costs are fairly low for the amount of sample data (less than $10).
76+
77+
6. Disable vector search:
5678
5779
```shell
5880
azd env set USE_VECTORS false
@@ -64,14 +86,7 @@ However, if your goal is to minimize costs while prototyping your application, f
6486
so the benefits of vector search would typically outweigh the costs, but it is possible to disable vector support.
6587
If you do so, the application will fall back to a keyword search, which is less accurate.
6688
67-
5. Once you've made the desired customizations, follow the steps in [to run `azd up`](../README.md#deploying-from-scratch).
68-
69-
## Deploying from an Azure free account
70-
71-
There are additional limitations for Azure free accounts (as opposed to "Pay-as-you-go" accounts which have billing enabled).
72-
73-
As of January 2024, Azure free accounts cannot sign up for Azure OpenAI access.
74-
You can instead sign up for an openai.com account. Follow these [directions to specify your OpenAI host and key](../README.md#openaicom-openai).
89+
7. Once you've made the desired customizations, follow the steps in [to run `azd up`](../README.md#deploying-from-scratch). We recommend using "eastus" as the region, for availability reasons.
7590

7691
## Reducing costs locally
7792

0 commit comments

Comments
 (0)