Skip to content

Commit f075d5b

Browse files
authored
add config in gitignore and fixes in script (#186)
## Purpose process refine and fixes ## 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 5a2c91d commit f075d5b

File tree

6 files changed

+18
-5
lines changed

6 files changed

+18
-5
lines changed

.gitignore

+4-1
Original file line numberDiff line numberDiff line change
@@ -432,4 +432,7 @@ FodyWeavers.xsd
432432
*.msp
433433

434434
# JetBrains Rider
435-
*.sln.iml
435+
*.sln.iml
436+
437+
*.azcli
438+
tools/**/*.profile

docs/04_lab_monitor/0403.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ For additional information on how this works, review:
5252

5353
1. Update the **api-gateway** container app to enable Application Insights Agent.
5454

55-
Notice how you’re setting the environment variables JAVA_TOOL_OPTIONS, APPLICATIONINSIGHTS_CONNECTION_STRING, and APPLICATIONINSIGHTS_CONFIGURATION_CONTENT.
55+
Notice how you’re setting the environment variables `JAVA_TOOL_OPTIONS`, `APPLICATIONINSIGHTS_CONNECTION_STRING`, and `APPLICATIONINSIGHTS_CONFIGURATION_CONTENT`.
5656

5757
```bash
5858
APP_NAME="api-gateway"
@@ -68,7 +68,7 @@ For additional information on how this works, review:
6868

6969
```bash
7070
export RESOURCE_GROUP APP_INSIGHTS_CONN
71-
bash tools/update-apps-appinsights.sh
71+
bash ../tools/update-apps-appinsights.sh
7272
```
7373

7474
{: .note }

install.md

+7-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,13 @@ Now you'll run the script `prepare.sh` to register the required resources provid
100100

101101
You'll now run the script `create-azure-resource.sh`, which will create several of the Azure resource dependencies that you need in the labs.
102102
103-
1. Before running the script, you'll need to edit the file `./tools/azure-resource.profile` in a code editor and update the following values:
103+
1. Before running the script, you'll need to make a copy of the file `./tools/azure-resource.profile.template`.
104+
105+
```bash
106+
cp ./tools/azure-resource.profile.template ./tools/azure-resource.profile
107+
```
108+
109+
Edit the file `./tools/azure-resource.profile` in a code editor and update the following values:
104110

105111
- `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`
106112
- `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`

tips.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ There are a couple places in the lab where you can easily to miss steps or incor
4242
az containerapp logs show -g $RESOURCE_GROUP -n <APP_NAME>
4343
```
4444

45-
### Dealing with code errors
45+
## Dealing with code errors
4646

4747
If you find coding issues that lead to errors, fix the issues and then rebuild and redeploy the affected application.
4848

File renamed without changes.

tools/create-azure-resource.sh

+4
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,9 @@ DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" >/dev/null 2>&1 && pwd )"
55
source $DIR/azure-resource.profile
66
source $DIR/funcs.sh
77

8+
shopt -s expand_aliases
9+
source $DIR/../.devcontainer/funcs.sh
10+
811
# Resource Group
912

1013
az group create -g $RESOURCE_GROUP -l $LOCATION -o table
@@ -106,6 +109,7 @@ fi
106109

107110
# Application Insights
108111

112+
WORKSPACE_ID=$(az monitor log-analytics workspace show -n $WORKSPACE -g $RESOURCE_GROUP --query id -o tsv 2>/dev/null)
109113
APP_INSIGHTS_ID=$(az monitor app-insights component show --resource-group $RESOURCE_GROUP --app $APP_INSIGHTS_NAME -o tsv --query id 2>/dev/null)
110114
if [[ -n $APP_INSIGHTS_ID ]]; then
111115
echo -e "${GREEN}INFO:${NC} Application Insights $APP_INSIGHTS_NAME already exists"

0 commit comments

Comments
 (0)