Skip to content

Commit e914960

Browse files
authored
Update README.md with azd up descrip (#602)
1 parent 2ba024a commit e914960

File tree

1 file changed

+14
-1
lines changed

1 file changed

+14
-1
lines changed

README.md

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,20 @@ The ask tab uses the approach programmed in [retrievethenread.py](https://github
299299
There are also two other /ask approaches with a slightly different approach, but they aren't currently working due to [langchain compatibility issues](https://github.com/Azure-Samples/azure-search-openai-demo/issues/541).
300300
</details>
301301

302+
<details>
303+
<summary>What does the `azd up` command do?</summary>
304+
305+
The `azd up` command comes from the [Azure Developer CLI](https://learn.microsoft.com/en-us/azure/developer/azure-developer-cli/overview), and takes care of both provisioning the Azure resources and deploying code to the selected Azure hosts.
306+
307+
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.
308+
309+
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 Cognitive Search index.
310+
311+
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.
312+
313+
Related commands are `azd provision` for just provisioning (if infra files change) and `azd deploy` for just deploying updated app code.
314+
</details>
315+
302316
<details>
303317
<summary>How can we view logs from the App Service app?</summary>
304318

@@ -328,7 +342,6 @@ logging.info("System message: %s", system_message)
328342
```
329343

330344
If you're having troubles finding the logs in App Service, see this blog post on [tips for debugging App Service app deployments](http://blog.pamelafox.org/2023/06/tips-for-debugging-flask-deployments-to.html) or watch [this video about viewing App Service logs](https://www.youtube.com/watch?v=f0-aYuvws54).
331-
332345
</details>
333346

334347
### Troubleshooting

0 commit comments

Comments
 (0)