Skip to content

Commit e3d2236

Browse files
rotycenhsonwan2020
andauthored
Remaining train the trainer tasks (#179)
## Purpose <!-- Describe the intention of the changes being proposed. What problem does it solve or functionality does it add? --> * ... ## Does this introduce a breaking change? <!-- Mark one with an "x". --> ``` [ ] Yes [x] No ``` ## Pull Request Type What kind of change does this Pull Request introduce? <!-- Please check the one that applies to this PR using "x". --> ``` [ ] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [x] Documentation content changes [ ] Other... Please describe: ``` ## How to Test Preview server updated here: https://ronline-java-aca-preview.azurewebsites.net/ --------- Co-authored-by: Songbo Wang <[email protected]>
1 parent 385f0e5 commit e3d2236

File tree

13 files changed

+166
-135
lines changed

13 files changed

+166
-135
lines changed

docs/02_lab_launch/0201.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ parent: 'Lab 2: Deploy applications to Azure Container Apps'
1010
Before performing any additional actions, you'll need to store your user info as an environment variable that you can use in subsequent steps.
1111

1212
{: .note }
13-
We already collected your subscription information as part of the [preparing your subscription]({% link install.md %}#preparing-your-subscription) instructions. Make sure you've completed this process and and any other [installation steps]({% link install.md %}) are complete before proceeding.
13+
We already collected your subscription information as part of the [preparing your subscription]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources) instructions. Make sure you've completed this process and and any other [installation steps]({% link install.md %}) are complete before proceeding.
1414

1515
## Step-by-step guidance
1616

docs/02_lab_launch/0202.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ This involves three things:
6767
1. Create a new Azure Container Apps environment in your resource group, and configure it to use the new subnet.
6868

6969
{: .note}
70-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), you can skip this step.
70+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), you can skip this step.
7171
7272
We’ll be creating the service on an [Azure Container Apps Dedicated plan](https://learn.microsoft.com/azure/container-apps/plans#dedicated) using the [workload profiles](https://learn.microsoft.com/azure/container-apps/workload-profiles-overview) option. This plan gives you more advanced features than the alternative [Azure Container Apps Consumption plan](https://learn.microsoft.com/azure/container-apps/plans#consumption) type:
7373

docs/02_lab_launch/0203.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ By default, the MySQL database you create will have a firewall enabled that will
1717
## Step-by-step guidance
1818

1919
{: .note}
20-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), skip to step 2.
20+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), skip to step 2.
2121
2222
1. To create an Azure Database for MySQL - Flexible Server instance, run the following commands. Replace the \<*sqladmin-password*\> placeholder with a complex password, and record its value.
2323

@@ -46,7 +46,7 @@ By default, the MySQL database you create will have a firewall enabled that will
4646
> Wait for the provisioning to complete. This usually takes around three minutes.
4747

4848
{: .note }
49-
> If the command fails and you get the message, “No available SKUs in this location,” try again with a different region by adding the following line to the command: \--location \<*another-region*\>. It’s OK to create the MySQL Server in a different region from your other resources.
49+
> If the create command fails and you get a message like, “No available SKUs in this location”, try again with a different region by adding the following line to the command: \--location \<*another-region*\>. It’s OK to create the MySQL Server instances in any region that supported it, even if it's a different from where you deployed your other resources to.
5050
5151
2. To create the database that your applications will use, run the following commands:
5252

docs/02_lab_launch/0206.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ To give your Container Apps environment secure access to the container registry,
1414
## Step-by-step guidance
1515

1616
{: .note}
17-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), skip to step 2.
17+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), skip to step 2.
1818
1919
1. Create a container registry instance to build and save your container images.
2020

docs/02_lab_launch/0209.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,6 @@ The following image should reflect your application architecture after a success
1616
{: .important }
1717
> The work you did in this lab is fundamental to both this lab and the next several labs you’ll be working through, so please do not delete any of the Azure resources you've created here.
1818
>
19-
> As we mentioned in the [Install instructions]({% link install.md %}#preparing-your-subscription), you can use both the `saveenv` and `loadenv` commands to manually save and load your environment variables at any time.
19+
> As we mentioned in the [Install instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), you can use both the `saveenv` and `loadenv` commands to manually save and load your environment variables at any time.
2020
>
2121
>You've done a lot in this lab, so now is a good time to run `saveenv` to make sure your current environment variables will be there if you have to start a new bash session.

docs/03_lab_openai/0301.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
---
2-
title: '1. Create an Azure OpenAI account (Optional)'
2+
title: '1. Create an Azure OpenAI account'
33
layout: default
44
nav_order: 1
55
parent: 'Lab 3: Integrate Azure OpenAI Service with your apps'
66
---
77

8-
# Create an Azure OpenAI account (Optional)
8+
# Create an Azure OpenAI account
99

1010
Before you can add AI capabilities to your application, you need to create an Azure OpenAI account and deploy the language models that you want to use.
1111

1212
{: .note}
13-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), or if you already have valid `AZURE-OPENAI-ENDPOINT` and `AZURE-OPENAI-API-KEY` values for an existing Azure OpenAI instance, you can skip this section.
13+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), or if you already have valid `AZURE-OPENAI-ENDPOINT` and `AZURE-OPENAI-API-KEY` values for an existing Azure OpenAI instance, you can skip this section.
1414
1515
The following step-by-step guidance will show you how to create an Azure OpenAI account using the Azure CLI. If you’d like to learn more about creating these accounts, see the following documentation: [Create and deploy an Azure OpenAI Service resource](https://learn.microsoft.com/azure/ai-services/openai/how-to/create-resource)
1616

docs/03_lab_openai/03_openai.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,13 +57,13 @@ Your first step in this process is to create a new Spring Boot application:
5757
1. In Visual Studio Code, open the `pom.xml` file and find the `spring-ai.version` value for the project.
5858

5959
```xml
60-
<spring-ai.version>1.0.0-M5</spring-ai.version>
60+
<spring-ai.version>1.0.0-M6</spring-ai.version>
6161
```
6262

6363
1. In your command-line window, save this version number as an environment variable for later use (modifying the version number to match the value you see in your actual `pom.xml` file).
6464

6565
```bash
66-
SPRING_AI_VERSION=1.0.0-M5
66+
SPRING_AI_VERSION=<spring-ai.version>
6767
```
6868

6969
### Generate AI code using Github Copilot
@@ -78,7 +78,7 @@ To do this, you’ll download a version-appropriate example code file from the S
7878

7979
```bash
8080
TEST_FILE="https://raw.githubusercontent.com/spring-projects/spring-ai/refs/heads/${SPRING_AI_VERSION}/models/spring-ai-azure-openai/src/test/java/org/springframework/ai/azure/openai/AzureOpenAiChatClientIT.java"
81-
wget $TEST_FILE -P spring-petclinic-chat-service/src/main/resources/
81+
curl $TEST_FILE -o spring-petclinic-chat-service/src/main/resources/AzureOpenAiChatClientIT.java
8282
```
8383

8484
1. In Visual Studio Code, open the `Github Copilot Chat` window and select the `ChatServiceApplication.java` file. The file name appears in the "Ask Copilot" input box as "Current file context".

docs/03_lab_openai/03_openai_existing.md

Lines changed: 22 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -281,18 +281,22 @@ Start from a simple spring boot application, we will add AI components to the pr
281281
282282
# (Optional) Integrate the chat client into api-gateway
283283
284+
<details markdown="1">
285+
286+
<summary><b><a>Click here to view the contents of this optional section.</a></b></summary>
287+
284288
1. Update service `api-gateway` to add a new chat window.
285289
286290
- Add new route entry for `chat-service`. Note this name will be used later. Open file `spring-petclinic-api-gateway/src/main/resources/application.yml` and append new entry like below:
287291
288-
```yml
289-
- id: chat-service
290-
uri: lb://chat-service
291-
predicates:
292+
```yml
293+
- id: chat-service
294+
uri: lb://chat-service
295+
predicates:
292296
- Path=/api/chat/**
293-
filters:
297+
filters:
294298
- StripPrefix=2
295-
```
299+
```
296300
297301
- Add chatbox for api gateway
298302
@@ -306,16 +310,16 @@ Start from a simple spring boot application, we will add AI components to the pr
306310
APP_NAME=api-gateway
307311
mvn clean package -DskipTests -pl spring-petclinic-$APP_NAME
308312
az containerapp update --name $APP_NAME --resource-group $RESOURCE_GROUP \
309-
--source ./spring-petclinic-$APP_NAME
313+
--source ./spring-petclinic-$APP_NAME
310314
```
311315
312316
- Check the new chatbox in the petclinic page.
313317
314318
```bash
315319
api_gateway_FQDN=$(az containerapp show \
316-
--resource-group $RESOURCE_GROUP \
317-
--name $APP_NAME \
318-
--query properties.configuration.ingress.fqdn \
320+
--resource-group $RESOURCE_GROUP \
321+
--name $APP_NAME \
322+
--query properties.configuration.ingress.fqdn \
319323
-o tsv)
320324
321325
echo https://$api_gateway_FQDN
@@ -329,8 +333,14 @@ Start from a simple spring boot application, we will add AI components to the pr
329333
330334
![lab 5 open-ai-rag-bot](../../images/open-ai-rag-bot.png)
331335
336+
</details>
337+
332338
# (Optional) Prepare the simple project
333339
340+
<details markdown="1">
341+
342+
<summary><b><a>Click here to view the contents of this optional section.</a></b></summary>
343+
334344
1. Create a project from [spring initializr](https://start.spring.io/):
335345
336346
```bash
@@ -365,3 +375,5 @@ Start from a simple spring boot application, we will add AI components to the pr
365375
1. Enable Eureka Client in class `ChatServiceApplication`:
366376
367377
![lab 5 eureka client](../../images/open-ai-eureka-client.png)
378+
379+
</details>

docs/04_lab_monitor/0402.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ To learn more about how Log Analytics works with Azure Container Apps, review:
2323
## Step-by-step guidance
2424

2525
{: .note}
26-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), skip to step 2.
26+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), skip to step 2.
2727
2828
1. In your command-line environment, create a new Log Analytics workspace:
2929

docs/04_lab_monitor/0403.md

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ For additional information on how this works, review:
2727
## Step-by-step guidance
2828

2929
{: .note}
30-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), skip to step 2.
30+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), skip to step 2.
3131
3232
1. Your first step is to create an Application Insights resource. Execute this statement in your command-line environment:
3333

@@ -74,7 +74,11 @@ For additional information on how this works, review:
7474
{: .note }
7575
> The script [../tools/update-apps-appinsights.sh](https://github.com/Azure-Samples/java-on-aca/blob/main/tools/update-apps-appinsights.sh) includes all the steps to update the target apps, and it runs the commands in parallel to save time. If you’d like to explore the details, open the file and review its contents.
7676

77-
(Optional) Alternatively, you can manually build each app individually by running the following commands:
77+
<details markdown="1">
78+
79+
<summary><b>(Optional)</b> Alternatively, you can manually build each app individually. <a>Click here for instructions on how to do this</a>.</summary>
80+
81+
Run the following commands:
7882

7983
```bash
8084
APP_NAME="customers-service"
@@ -99,6 +103,8 @@ For additional information on how this works, review:
99103
{: .note }
100104
> Notice that for each of the applications, we indicate a different role-name. Application Insights uses this role-name in its Application map feature to show the communication between your applications.
101105

106+
</details>
107+
102108
{: .note }
103109
> After redeploying, you’ll need to make sure everything is back up and running as expected. Verify that your applications are operational, and check the console log to determine whether any application is in a failed state.
104110

docs/04_lab_monitor/0405.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ If you’d like to learn more about how Azure Managed Grafana helps visualize ex
1919
## Step-by-step guidance
2020

2121
{: .note}
22-
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#preparing-your-subscription), skip to step 2.
22+
> If you've already successfully run the `create-azure-resources.sh` script discussed in the [installation instructions]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources), skip to step 2.
2323
2424
1. Provision Azure Managed Grafana. In your command-line environment, create an Azure Managed Grafana instance:
2525

index.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -45,11 +45,11 @@ To run this lab, you’ll need:
4545
Before running this lab, be sure that all the required tooling is available. We’ve provided three options:
4646

4747
* [Use GitHub Codespaces (preferred)]({% link install.md %}#use-github-codespaces-strongly-recommended), which will create a cloud-based development environment with the required tools installed and configured.
48-
* [Use Visual Studio Code with remote containers option]({% link install.md %}#using-visual-studio-code-with-remote-containers), which will create a Docker container on your local machine with the required tools preconfigured.
49-
* [Install all the tools on your local machine]({% link install.md %}#install-all-the-tools-on-your-local-machine-not-recommended).
48+
* [Use Visual Studio Code with remote containers option]({% link install.md %}#optional-use-visual-studio-code-with-remote-containers), which will create a Docker container on your local machine with the required tools preconfigured.
49+
* [Install all the tools on your local machine]({% link install.md %}#optional-install-all-the-tools-on-your-local-machine-not-recommended).
5050

5151
We’ve tested this lab using GitHub Codespaces, which is the recommended option for running it.
5252

53-
After the tooling is set up, you'll need to perform some steps to [prepare your subscription]({% link install.md %}#preparing-your-subscription) before continuing with the labs.
53+
After the tooling is set up, you'll need to perform some steps to [prepare your subscription]({% link install.md %}#configure-your-subscription-and-deploy-prerequisite-azure-resources) before continuing with the labs.
5454

5555
You can find the full installation guidance and the options for running this lab in the [Installation]({% link install.md %}) instructions.

0 commit comments

Comments
 (0)