Skip to content

Commit 6257f9b

Browse files
committed
closes #80. Provide support for ACA and AKS deployment
1 parent ba29dc5 commit 6257f9b

File tree

7 files changed

+29
-26
lines changed

7 files changed

+29
-26
lines changed

README.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@ products:
1212
- active-directory
1313
- azure-cognitive-search
1414
- azure-app-service
15-
- aks
16-
- aca
15+
- azure-container-apps
16+
- azure-kubernetes-service
1717
- azure-sdks
1818
- github
1919
- document-intelligence
2020
- azure-monitor
2121
- azure-pipelines
2222
urlFragment: azure-search-openai-demo-java
23-
name: ChatGPT + Enterprise data (Java)
23+
name: ChatGPT + Enterprise data (Java) on App Service, Azure Container Apps, and Azure Kubernetes Service
2424
description: A Java sample app that chats with your data using OpenAI and AI Search.
2525
---
2626
<!-- YAML front-matter schema: https://review.learn.microsoft.com/en-us/help/contribute/samples/process/onboarding?branch=main#supported-metadata-fields-for-readmemd -->

deploy/aks/azure.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,19 @@ hooks:
5959
run: ./scripts/easyauth.ps1
6060
interactive: true
6161
continueOnError: false
62+
posix:
63+
shell: sh
64+
run: ./scripts/easyauth.sh
65+
interactive: true
66+
continueOnError: false
6267
postdown:
6368
windows:
6469
shell: pwsh
6570
run: ./scripts/easyauth-down.ps1
6671
interactive: true
72+
continueOnError: false
73+
posix:
74+
shell: sh
75+
run: ./scripts/easyauth-down.sh
76+
interactive: true
6777
continueOnError: false

docs/aca/README-ACA.md

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,21 +28,18 @@ For detailed instructions, see [Getting Started](#getting-started) below.
2828
## Table of contents
2929

3030
<!-- TOC -->
31-
32-
* [Open this project](#open-this-project)
33-
* [Features](#features)
3431
* [Getting Started](#getting-started)
32+
* [Run in GitHub Codespaces or VS Code Dev Containers](#run-in-github-codespaces-or-vs-code-dev-containers)
3533
* [Prerequisites](#prerequisites)
3634
* [Starting from scratch](#starting-from-scratch)
3735
* [Deploying with existing Azure resources](#deploying-with-existing-azure-resources)
3836
* [Existing resource group](#existing-resource-group)
3937
* [Existing OpenAI resource](#existing-openai-resource)
40-
* [Existing Azure Azure AI Search resource](#existing-azure-cognitive-search-resource)
38+
* [Existing Azure Azure AI Search resource](#existing-azure-ai-search-resource)
4139
* [Other existing Azure resources](#other-existing-azure-resources)
4240
* [Provision remaining resources](#provision-remaining-resources)
43-
* [Deploying again](#deploying-again)
41+
* [Deploying again](#redeploying)
4442
* [Running locally](#running-locally)
45-
* [To Run in GitHub Codespaces or VS Code Dev Containers](#to-run-in-github-codespaces-or-vs-code-dev-containers)
4643
* [UI Navigation](#ui-navigation)
4744
* [Enabling optional features](#enabling-optional-features)
4845
* [Enabling Application Insights](#enabling-application-insights)

docs/aks/README-AKS.md

Lines changed: 8 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -22,21 +22,18 @@ For detailed instructions, see [Getting Started](#getting-started) below.
2222
## Table of contents
2323

2424
<!-- TOC -->
25-
26-
- [Open this project](#open-this-project)
27-
- [Features](#features)
2825
- [Getting Started](#getting-started)
26+
* [Run in GitHub Codespaces or VS Code Dev Containers](#run-in-github-codespaces-or-vs-code-dev-containers)
2927
- [Prerequisites](#prerequisites)
3028
- [Starting from scratch](#starting-from-scratch)
3129
- [Deploying with existing Azure resources](#deploying-with-existing-azure-resources)
3230
- [Existing resource group](#existing-resource-group)
3331
- [Existing OpenAI resource](#existing-openai-resource)
34-
- [Existing Azure Azure AI Search resource](#existing-azure-cognitive-search-resource)
32+
- [Existing Azure Azure AI Search resource](#existing-azure-ai-search-resource)
3533
- [Other existing Azure resources](#other-existing-azure-resources)
3634
- [Provision remaining resources](#provision-remaining-resources)
37-
- [Deploying again](#deploying-again)
35+
- [Deploying again](#redeploying)
3836
- [Running locally](#running-locally)
39-
- [To Run in GitHub Codespaces or VS Code Dev Containers](#to-run-in-github-codespaces-or-vs-code-dev-containers)
4037
- [UI Navigation](#ui-navigation)
4138
- [Enabling optional features](#enabling-optional-features)
4239
- [Enabling Application Insights](#enabling-application-insights)
@@ -58,7 +55,7 @@ For detailed instructions, see [Getting Started](#getting-started) below.
5855
> **IMPORTANT:** In order to deploy and run this example, you'll need an **Azure subscription with access enabled for the Azure OpenAI Service**. You can request access [here](https://aka.ms/oaiapply). You can also visit [here](https://azure.microsoft.com/free/) to get some free Azure credits to get you started.
5956
6057
> [!CAUTION]
61-
> At time of writing AZD has introduced a bug in AKS deployment since 1.6.1. version.Monitor this [issue](https://github.com/Azure/azure-dev/issues/3486) to check in which version it will be fixed. In the meantime consider to use azd 1.5.1 to run the aks deployment. You can download it from [here](https://github.com/Azure/azure-dev/releases/download/azure-dev-cli_1.5.1/azd-windows-amd64.msi) or visit the azd [release page](https://github.com/Azure/azure-dev/releases) to download specific os bundle
58+
> Be sure to use AZD version > 1.7.0
6259
6360
### Run in GitHub Codespaces or VS Code Dev Containers
6461

@@ -73,7 +70,7 @@ All prerequisites are already installed in the container. You can skip to the [S
7370

7471
- [Java 17](https://learn.microsoft.com/en-us/java/openjdk/download#openjdk-17)
7572
- [Maven 3.8.x](https://maven.apache.org/download.cgi)
76-
- [Azure Developer CLI](https://aka.ms/azure-dev/install)
73+
- [Azure Developer CLI 1.7.0](https://aka.ms/azure-dev/install)
7774
- [Node.js](https://nodejs.org/en/download/)
7875
- [Git](https://git-scm.com/downloads)
7976
- [Powershell 7+ (pwsh)](https://github.com/powershell/powershell) - For Windows users only.
@@ -108,11 +105,11 @@ Once you have the project available locally, run the following commands if you d
108105
- This will provision Azure resources and deploy this sample to those resources, including building the search index based on the files found in the `./data` folder.
109106
- For the target location, the regions that currently support the models used in this sample are **East US**, **France Central**, **South Central US**, **UK South**, and **West Europe**. For an up-to-date list of regions and models, check [here](https://learn.microsoft.com/en-us/azure/ai-services/openai/concepts/models)
110107

111-
3. After the application has been successfully deployed you will see a frontend app URL printed to the console. Click that URL to interact with the application in your browser.
108+
3. After the application has been successfully deployed you will see a backend app load balancer IP printed to the console. Click that URL to interact with the application in your browser.
112109

113110
It will look like the following:
114111

115-
!['Output from running azd up'](docs/endpoint.png)
112+
!['Output from running azd up'](aks-deploy-success.png)
116113

117114
> NOTE: It may take a minute for the application to be fully deployed.
118115
@@ -246,7 +243,7 @@ To see the performance data, go to the Application Insights resource in your res
246243
To inspect the performance of chat requests, use the "Drill into Samples" button to see end-to-end traces of all the API calls made for any chat request.
247244
Under "Trace & Events" panel you can review custom Java informational logs to better understand content of OpenAI requests and responses.
248245
249-
![Tracing screenshot](docs/transaction-tracing.png)
246+
![Tracing screenshot](aks-transaction-tracing.png)
250247
251248
To see any exceptions and server errors, navigate to the "Investigate -> Failures" blade and use the filtering tools to locate a specific exception. You can see Java stack traces on the right-hand side.
252249

docs/aks/aks-deploy-success.png

45 KB
Loading

docs/aks/aks-transaction-tracing.png

104 KB
Loading

docs/app-service/README-App-Service.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -23,19 +23,18 @@ For detailed instructions, see [Getting Started](#getting-started) below.
2323

2424
<!-- TOC -->
2525

26-
* [Open this project](#open-this-project)
2726
* [Getting Started](#getting-started)
27+
* [Run in GitHub Codespaces or VS Code Dev Containers](#run-in-github-codespaces-or-vs-code-dev-containers)
2828
* [Prerequisites](#prerequisites)
2929
* [Starting from scratch](#starting-from-scratch)
3030
* [Deploying with existing Azure resources](#deploying-with-existing-azure-resources)
3131
* [Existing resource group](#existing-resource-group)
3232
* [Existing OpenAI resource](#existing-openai-resource)
33-
* [Existing Azure Azure AI Search resource](#existing-azure-cognitive-search-resource)
33+
* [Existing Azure Azure AI Search resource](#existing-azure-ai-search-resource)
3434
* [Other existing Azure resources](#other-existing-azure-resources)
3535
* [Provision remaining resources](#provision-remaining-resources)
36-
* [Deploying again](#deploying-again)
36+
* [Deploying again](#redeploying)
3737
* [Running locally](#running-locally)
38-
* [To Run in GitHub Codespaces or VS Code Dev Containers](#to-run-in-github-codespaces-or-vs-code-dev-containers)
3938
* [UI Navigation](#ui-navigation)
4039
* [Enabling optional features](#enabling-optional-features)
4140
* [Enabling Application Insights](#enabling-application-insights)
@@ -141,7 +140,7 @@ You can also use existing Form Recognizer and Storage Accounts. See `./infra/mai
141140
142141
#### Provision remaining resources
143142
144-
Now you can run `azd up`, following the steps in [Deploying from scratch](#deploying-from-scratch) above.
143+
Now you can run `azd up`, following the steps in [Starting from scratch](#starting-from-scratch) above.
145144
That will both provision resources and deploy the code.
146145
147146
@@ -280,7 +279,7 @@ Once saved, you will see dev and prod environment got automatically created unde
280279
281280
Connect Azure Devops to Azure:
282281
1. Add a Service Connection following this [guide](https://learn.microsoft.com/en-us/azure/devops/pipelines/library/connect-to-azure?view=azure-devops) to allow Azure Devops pipeline to connect to your Azure resources /App Service.
283-
2. Modify `.azdo/pipelines/app-ci.yaml` '<azureSubscriptionServiceConnection>' and replace it with the name of the Service Connection.
282+
2. Modify `.azdo/pipelines/app-ci.yaml` '&lt;azureSubscriptionServiceConnection&gt;' and replace it with the name of the Service Connection.
284283
![location1](pipeline-azure-service-connection1.png)
285284
![location2](pipeline-azure-service-connection2.png)
286285

0 commit comments

Comments
 (0)