Skip to content

Commit 8274587

Browse files
authored
Some minor fixes (#183)
## Purpose ## 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". --> ``` [x] Bugfix [ ] Feature [ ] Code style update (formatting, local variables) [ ] Refactoring (no functional changes, no api changes) [ ] Documentation content changes [ ] Other... Please describe: ```
1 parent 6285a9b commit 8274587

File tree

9 files changed

+26
-25
lines changed

9 files changed

+26
-25
lines changed

.devcontainer/funcs.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ DEV_ENV_FILE="$HOME/.dev-environment"
44

55
alias saveenv='declare -p | grep "declare \(--\|-x\)" | grep -v "^declare \(--\|-x\) \(PS[0-9]\|_.*\|SDKMAN_.*\|sdkman_.*\|IFS\|VSCODE_.*\|HIST.*\|GITHUB_.*\|BASH_.*\|COMP_WORDBREAKS\|PATH\|OLDPWD\|PWD\|LS_COLORS\)=" > "$DEV_ENV_FILE"'
66

7-
alias loadenv='source "$DEV_ENV_FILE"'
7+
alias loadenv='[ -f $DEV_ENV_FILE ] && source "$DEV_ENV_FILE"'
88

99
alias clearenv='rm -f "$DEV_ENV_FILE"'

docs/02_lab_launch/0202.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ This involves three things:
3434
```
3535

3636
{: .note }
37-
> Not all regions support Azure Container Apps environments and Azure Database for MySQL - Flexible Server instances. For more info, please refer to [Region availability]({% link tips.md %}#region-availability).
37+
> Not all regions support Azure Container Apps environments and Azure Database for MySQL - Flexible Server instances. For more info, please refer to [Region availability]({% link index.md %}#region-availability).
3838

3939
{: .note }
4040
> This lab uses quite a few environment variables. If you’re using a codespace to run this lab and the codespace restarts, your environment variables will be lost. For methods to persist these environment variables across codespace sessions, go to the [LabTips]({% link tips.md %}) section.

docs/03_lab_openai/03_openai.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ Your first step in this process is to create a new Spring Boot application:
3434

3535
You’ll also need to provide additional settings, such as project type, Java code details, and naming to match the structure of the existing Spring Petclinic application.
3636

37-
To create the new Spring Boot application using these settings, in your command-line window, go to the `src` folder of your local code repo and run the following command:
37+
To create the new Spring Boot application using these settings, in your command-line window, go to the `spring-petclinic-microservices` folder of your local code repo and run the following command:
3838

3939
```bash
4040
mkdir spring-petclinic-chat-service

docs/03_lab_openai/03_openai_existing.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ layout: default
44
nav_order: 5
55
nav_exclude: true
66
search_exclude: true
7-
parent: 'Lab 3: Integrate Azure OpenAI Service with your apps'
7+
parent: 'Lab 3: Integrate Azure OpenAI Service with your apps (exclude)'
88
---
99

1010
# Integrate AI into your existing project
@@ -376,4 +376,4 @@ Start from a simple spring boot application, we will add AI components to the pr
376376
377377
![lab 5 eureka client](../../images/open-ai-eureka-client.png)
378378
379-
</details>
379+
</details>

install.md

+11-12
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,10 @@ nav_order: 2
1111

1212
Before you begin working through the lab, you’ll need to make sure that you have all the required tools installed and configured in your development environment, and that your Azure subscription is ready for the labs. Please complete the following steps before proceeding:
1313

14-
1. **[Set up your development environment using GitHub Codespaces](#use-github-codespaces-strongly-recommended).** This will give you a fully configured development environment without requiring any software installation or configuration on your local workstation. This environment will also contain a cloned copy of the example Spring Petclinic workload code from the GitHub repo.
14+
1. **[Set up your development environment using GitHub Codespaces](#use-github-codespaces-strongly-recommended).** This will give you a fully configured development environment without requiring any software installation or configuration on your local workstation. This environment will also contain a cloned copy of the example Spring Petclinic workload code from the GitHub repo.
1515
2. **[Configure your subscription and deploy prerequisite Azure resources](#configure-your-subscription-and-deploy-prerequisite-azure-resources).** Once you've set up your dev environment, you'll need to run a couple scripts that will automate some required subscription configuration and resources deployment tasks.
1616

17-
These setup tasks can take several minutes to complete, so we suggest starting this process as soon as possible.
17+
These setup tasks can take several minutes to complete, so we suggest starting this process as soon as possible.
1818

1919
### Alternative development environment options
2020

@@ -24,7 +24,7 @@ If you are unable to use a Codespace, there's two alternative ways to set up a d
2424
- [Install all the tools on your local machine (not recommended)](#optional-install-all-the-tools-on-your-local-machine-not-recommended)
2525

2626
{: .important }
27-
> We’ve tested all the steps of this lab in [GitHub Codespaces](#use-github-codespaces), which is the simplest way to get going and the preferred option for running the lab. Support for these alternative options during the lab may be limited. Use a Codespace if at all possible.
27+
> We’ve tested all the steps of this lab in [Use GitHub Codespaces](#use-github-codespaces), which is the simplest way to get going and the preferred option for running the lab. Support for these alternative options during the lab may be limited. Use a Codespace if at all possible.
2828
2929

3030
## Use GitHub Codespaces (strongly recommended)
@@ -92,7 +92,7 @@ Now you'll run the script `prepare.sh` to register the required resources provid
9292
./tools/prepare.sh
9393
```
9494
95-
This process should take less than 10 minutes to complete.
95+
This process should take less than 10 minutes to complete.
9696
9797
1. Once the `prepare.sh` script finishes, close your current terminal window and start a new terminal session to ensure you're accessing a fully prepared lab environment.
9898

@@ -105,7 +105,7 @@ You'll now run the script `create-azure-resource.sh`, which will create several
105105
- `UNIQUEID` - Create a unique ID string and paste that in the code editor. You can use the following command generate an acceptable value: `openssl rand -hex 3`
106106
- `SUBSCRIPTION` - Enter the ID of the subscription you're going to work in. To quickly find this id, use the following command: `az account show --query id`
107107
- `REGION` - Enter the default Azure region you want to work in. For example `westus` or `southindia`.
108-
- `MYSQL_ADMIN_PASSWORD` - enter a strong password string.
108+
- `MYSQL_ADMIN_PASSWORD` - enter a strong password string.
109109
110110
After setting these values, save the updated `azure-resource.profile` file before proceeding.
111111
@@ -136,9 +136,9 @@ You'll now run the script `create-azure-resource.sh`, which will create several
136136
>
137137
> Before you do anything else, run the command `saveenv` in your open command-line window. This will save all of your currently defined environment variables to the file `~/.dev-environment`. The next time you start a new bash session you will automatically load the saved variables from this file.
138138
>
139-
> You can also manually load the saved variables with the command `loadenv`.
140-
>
141-
> You can use these commands at any time, so feel free to run `saveenv` after creating or updating environment variables when working through the labs, or `loadenv` to reload your saved variables as needed.
139+
> You can also manually load the saved variables with the command `loadenv`.
140+
>
141+
> You can use these commands at any time, so feel free to run `saveenv` after creating or updating environment variables when working through the labs, or `loadenv` to reload your saved variables as needed.
142142
143143
144144
## (Optional) Use Visual Studio Code with remote containers
@@ -184,7 +184,7 @@ To get started working in the dev container:
184184
```bash
185185
mkdir workspaces
186186
cd workspaces
187-
git clone https://github.com/\<your-github-account\>/java-on-aca.git
187+
git clone https://github.com/<your-github-account>/java-on-aca.git
188188
```
189189

190190
1. When prompted to sign in to GitHub, select **Sign in with your browser**. This will automatically open a new tab in the web browser window, prompting you to provide your GitHub username and password.
@@ -197,9 +197,8 @@ To get started working in the dev container:
197197
1. Go to the java-on-aca folder where you cloned the project, and open the project with Visual Studio Code.
198198

199199
```bash
200-
mkdir workspaces
201-
cd workspaces
202-
git clone https://github.com/<your-github-account>/java-on-aca.git
200+
cd java-on-aca
201+
code .
203202
```
204203

205204
1. With the [Visual Studio Code Remote Containers extension](https://code.visualstudio.com/docs/remote/containers) installed, you can now open the project in a remote container. This will reopen the project in a Docker container with all the tooling installed.

tips.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,15 @@ Tips in this section include:
1414

1515
## Use GitHub Codespaces
1616

17-
As described in the [installation instructions]({% link install.md %}), the best and easiest way to run this lab is to use [GitHub Codespaces](https://github.com/features/codespaces). With the devcontainer.json file provided in the lab's [GitHub repository](https://github.com/Azure-Samples/java-on-aca) you can create a codespace that has the required tools pre-installed and configured for you. The steps in this lab have been thoroughly tested with the codespace configuration included in the repo.
17+
As described in the [installation instructions]({% link install.md %}), the best and easiest way to run this lab is to use [GitHub Codespaces](https://github.com/features/codespaces). With the devcontainer.json file provided in the lab's [GitHub repository](https://github.com/Azure-Samples/java-on-aca) you can create a codespace that has the required tools pre-installed and configured for you. The steps in this lab have been thoroughly tested with the codespace configuration included in the repo.
1818

19-
If you're unable to use a codespace, the best alternative is Visual Studio Code with remote containers, which allows you to deploy and work with a preconfigured Docker development environment.
19+
If you're unable to use a codespace, the best alternative is Visual Studio Code with remote containers, which allows you to deploy and work with a preconfigured Docker development environment.
2020

2121
If you can't use either of these options, you can complete this lab by installing the required tooling on your local environment. However, since it’s impossible for us to test all lab steps with every possible local configuration, we highly recommend using either GitHub Codespaces or the Visual Studio Code with remote containers.
2222

23-
## Use .azcli files to make command line work easier
23+
## Use .azcli files to make command line work easier
2424

25-
If you're using Visual Studio Code, you can record the command-line statements that you execute in a file with the _.azcli_ extension. This extension, combined with the [Azure CLI Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azurecli) extension, gives you extra capabilities, like IntelliSense, and the opportunity to directly run statements from the script file in a terminal window.
25+
If you're using Visual Studio Code, you can record the command-line statements that you execute in a file with the _.azcli_ extension. This extension, combined with the [Azure CLI Tools](https://marketplace.visualstudio.com/items?itemName=ms-vscode.azurecli) extension, gives you extra capabilities, like IntelliSense, and the opportunity to directly run statements from the script file in a terminal window.
2626

2727
With this extension, you can keep a record in an .azcli file of all the steps that you executed and quickly execute these statements through the `Ctrl+` shortcut. To save time and effort in this lab, be sure to check out the extension.
2828

@@ -39,7 +39,7 @@ There are a couple places in the lab where you can easily to miss steps or incor
3939
1. Check the logs for the failing application or service.
4040

4141
```bash
42-
az containerapp logs show -g $RESOURCE_GROUP -n <APP_NAME>
42+
az containerapp logs show -g $RESOURCE_GROUP -n <APP_NAME>
4343
```
4444

4545
### Dealing with code errors

tools/create-azure-resource.sh

+5-3
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
#!/usr/bin/env bash
22

3-
source ./azure-resource.profile
4-
source ./funcs.sh
3+
DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
4+
5+
source $DIR/azure-resource.profile
6+
source $DIR/funcs.sh
57

68
# Resource Group
79

@@ -139,4 +141,4 @@ fi
139141

140142
# Save environment variables
141143

142-
saveenv
144+
saveenv

tools/funcs.sh

100644100755
File mode changed.

tools/prepare-extensions.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)