Skip to content

Commit 1a7158d

Browse files
authored
New documentation on App Service debugging, and some docs organizational changes (#1261)
* Docs reorg and new doc * Index re-org * Add link to TOC * Update screenshots * Fix en-us references * Add CI * Update section on CICD * Fix some links * Adding learn.com link
1 parent 688e1c4 commit 1a7158d

26 files changed

+829
-133
lines changed

README.md

Lines changed: 36 additions & 117 deletions
Large diffs are not rendered by default.

docs/README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Additional documentation
2+
3+
Consult the main [README](../README.md) for general information about the project.
4+
These are advanced topics that are not necessary for a basic deployment.
5+
6+
* [Deploying with the Azure Developer CLI](azd.md)
7+
* [Deploying from a free account](deploy_lowcost.md)
8+
* [Debugging the app on App Service](appservice.md)
9+
* [Local development](localdev.md)
10+
* [App customization](customization.md)
11+
* [Data ingestion](data_ingestion.md)
12+
* [Productionizing](productionizing.md)
13+
* [Login and access control](login_and_acl.md)
14+
* [Using GPT-4 Turbo with Vision](gpt4v.md)
15+
* [Alternative RAG chat samples](other_samples.md)

docs/appservice.md

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

docs/azd.md

Lines changed: 54 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,54 @@
1+
# Deploying with the Azure Developer CLI
2+
3+
This guide includes advanced topics that are not necessary for a basic deployment. If you are new to the project, please consult the main [README](../README.md#deploying-from-scratch) for steps on deploying the project.
4+
5+
[📺 Watch: Deployment of your chat app](https://www.youtube.com/watch?v=mDFZdmn7nhk)
6+
7+
* [How does `azd up` work?](#how-does-azd-up-work)
8+
* [Configuring continuous deployment](#configuring-continuous-deployment)
9+
* [GitHub actions](#github-actions)
10+
* [Azure DevOps](#azure-devops)
11+
12+
## How does `azd up` work?
13+
14+
The `azd up` command comes from the [Azure Developer CLI](https://learn.microsoft.com/azure/developer/azure-developer-cli/overview), and takes care of both provisioning the Azure resources and deploying code to the selected Azure hosts.
15+
16+
The `azd up` command uses the `azure.yaml` file combined with the infrastructure-as-code `.bicep` files in the `infra/` folder. The `azure.yaml` file for this project declares several "hooks" for the prepackage step and postprovision steps. The `up` command first runs the `prepackage` hook which installs Node dependencies and builds the React.JS-based JavaScript files. It then packages all the code (both frontend and backend) into a zip file which it will deploy later.
17+
18+
Next, it provisions the resources based on `main.bicep` and `main.parameters.json`. At that point, since there is no default value for the OpenAI resource location, it asks you to pick a location from a short list of available regions. Then it will send requests to Azure to provision all the required resources. With everything provisioned, it runs the `postprovision` hook to process the local data and add it to an Azure AI Search index.
19+
20+
Finally, it looks at `azure.yaml` to determine the Azure host (appservice, in this case) and uploads the zip to Azure App Service. The `azd up` command is now complete, but it may take another 5-10 minutes for the App Service app to be fully available and working, especially for the initial deploy.
21+
22+
Related commands are `azd provision` for just provisioning (if infra files change) and `azd deploy` for just deploying updated app code.
23+
24+
## Configuring continuous deployment
25+
26+
This repository includes both a GitHub Actions workflow and an Azure DevOps pipeline for continuous deployment with every push to `main`. The GitHub Actions workflow is the default, but you can switch to Azure DevOps if you prefer.
27+
28+
More details are available in [Learn.com: Configure a pipeline and push updates](https://learn.microsoft.com/azure/developer/azure-developer-cli/configure-devops-pipeline?tabs=GitHub)
29+
30+
### GitHub actions
31+
32+
After you have deployed the app once with `azd up`, you can enable continuous deployment with GitHub Actions.
33+
34+
Run this command to set up a Service Principal account for CI deployment and to store your `azd` environment variables in GitHub Actions secrets:
35+
36+
```shell
37+
azd pipeline config
38+
```
39+
40+
You can trigger the "Deploy" workflow manually from your GitHub actions, or wait for the next push to main.
41+
42+
If you change your `azd` environment variables at any time (via `azd env set` or as a result of provisioning), re-run that command in order to update the GitHub Actions secrets.
43+
44+
### Azure DevOps
45+
46+
After you have deployed the app once with `azd up`, you can enable continuous deployment with Azure DevOps.
47+
48+
Run this command to set up a Service Principal account for CI deployment and to store your `azd` environment variables in GitHub Actions secrets:
49+
50+
```shell
51+
azd pipeline config --provider azdo
52+
```
53+
54+
If you change your `azd` environment variables at any time (via `azd env set` or as a result of provisioning), re-run that command in order to update the GitHub Actions secrets.

docs/customization.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -129,7 +129,7 @@ If the problem is with Azure AI Search (step 2 above), the first step is to chec
129129

130130
You can change many of the search parameters in the "Developer settings" in the frontend and see if results improve for your queries. The most relevant options:
131131

132-
![Screenshot of search options in developer settings](screenshot_searchoptions.png)
132+
![Screenshot of search options in developer settings](images/screenshot_searchoptions.png)
133133

134134
#### Configuring parameters in the Azure Portal
135135

@@ -159,7 +159,7 @@ You can also use the `highlight` parameter to see what text is being matched in
159159
}
160160
```
161161

162-
![Screenshot of search explorer with highlighted results](screenshot_searchindex.png)
162+
![Screenshot of search explorer with highlighted results](images/screenshot_searchindex.png)
163163

164164
The search explorer works well for testing text, but is harder to use with vectors, since you'd also need to compute the vector embedding and send it in. It is probably easier to use the app frontend for testing vectors/hybrid search.
165165

docs/data_ingestion.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,15 +7,15 @@ This guide provides more details for using the `prepdocs` script to index docume
77
- [Indexing additional documents](#indexing-additional-documents)
88
- [Removing documents](#removing-documents)
99
- [Overview of Integrated Vectorization](#overview-of-integrated-vectorization)
10-
- [Indexing additional documents](#indexing-additional-documents-1)
11-
- [Removing documents](#removing-documents-1)
10+
- [Indexing of additional documents](#indexing-of-additional-documents)
11+
- [Removal of documents](#removal-of-documents)
1212
- [Scheduled indexing](#scheduled-indexing)
1313

1414
## Overview of the manual indexing process
1515

1616
The `scripts/prepdocs.py` script is responsible for both uploading and indexing documents. The typical usage is to call it using `scripts/prepdocs.sh` (Mac/Linux) or `scripts/prepdocs.ps1` (Windows), as these scripts will set up a Python virtual environment and pass in the required parameters based on the current `azd` environment. Whenever `azd up` or `azd provision` is run, the script is called automatically.
1717

18-
![Diagram of the indexing process](diagram_prepdocs.png)
18+
![Diagram of the indexing process](images/diagram_prepdocs.png)
1919

2020
The script uses the following steps to index documents:
2121

@@ -64,7 +64,7 @@ To add additional documents to the index, first upload them to your data source
6464
Then navigate to the Azure portal, find the index, and run it.
6565
The Azure AI Search indexer will identify the new documents and ingest them into the index.
6666

67-
### Removing documents
67+
### Removal of documents
6868

6969
To remove documents from the index, remove them from your data source (Blob storage, by default).
7070
Then navigate to the Azure portal, find the index, and run it.

docs/gpt4v.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Enabling GPT-4 Turbo with Vision
1+
# Using GPT-4 Turbo with Vision
22

33
This repository now includes an example of integrating GPT-4 Turbo with Vision with Azure AI Search. This feature enables indexing and searching images and graphs, such as financial documents, in addition to text-based content.
44

@@ -14,7 +14,7 @@ This repository now includes an example of integrating GPT-4 Turbo with Vision w
1414
### Prerequisites
1515

1616
- Create a [Computer Vision account in Azure Portal first](https://ms.portal.azure.com/#create/Microsoft.CognitiveServicesComputerVision), so that you can agree to the Responsible AI terms for that resource. You can delete that account after agreeing.
17-
- The ability to deploy a GPT-4 Turbo with Vision model in the [supported regions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-model-availability). If you're not sure, try to create a deployment from your Azure OpenAI deployments page. You should be able to select:
17+
- The ability to deploy a GPT-4 Turbo with Vision model in the [supported regions](https://learn.microsoft.com/azure/ai-services/openai/concepts/models#gpt-4-and-gpt-4-turbo-preview-model-availability). If you're not sure, try to create a deployment from your Azure OpenAI deployments page. You should be able to select:
1818

1919
| Model | Version |
2020
|--|--|
@@ -25,7 +25,7 @@ This repository now includes an example of integrating GPT-4 Turbo with Vision w
2525
- gpt-35-turbo
2626
- text-embedding-ada-002
2727
- gpt-4v
28-
- [Azure AI Vision](https://learn.microsoft.com/en-us/azure/ai-services/computer-vision/)
28+
- [Azure AI Vision](https://learn.microsoft.com/azure/ai-services/computer-vision/)
2929

3030
### Setup and Usage
3131

@@ -43,7 +43,7 @@ This repository now includes an example of integrating GPT-4 Turbo with Vision w
4343

4444

4545
5. **Web Application Usage:**
46-
![GPT4V configuration screenshot](./gpt4v.png)
46+
![GPT4V configuration screenshot](./images/gpt4v.png)
4747
- Access the developer options in the web app and select "Use GPT-4 Turbo with Vision".
4848
- Sample questions will be updated for testing.
4949
- Interact with the questions to view responses.
File renamed without changes.
File renamed without changes.
File renamed without changes.

0 commit comments

Comments
 (0)