Skip to content

Commit

Permalink
Update 0403.md
Browse files Browse the repository at this point in the history
vermegi authored Jul 10, 2024

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
1 parent 3c43951 commit d16603b
Showing 1 changed file with 6 additions and 9 deletions.
15 changes: 6 additions & 9 deletions docs/04_lab_secrets/0403.md
Original file line number Diff line number Diff line change
@@ -67,14 +67,9 @@ The following three apps of your application use the database hosted by the Azur

```bash
cd staging-acr
rm spring-petclinic-customers-service-$VERSION.jar
rm spring-petclinic-visits-service-$VERSION.jar
rm spring-petclinic-vets-service-$VERSION.jar
cp ../spring-petclinic-customers-service/target/spring-petclinic-customers-service-$VERSION.jar spring-petclinic-customers-service-$VERSION.jar
cp ../spring-petclinic-visits-service/target/spring-petclinic-visits-service-$VERSION.jar spring-petclinic-visits-service-$VERSION.jar
cp ../spring-petclinic-vets-service/target/spring-petclinic-vets-service-$VERSION.jar spring-petclinic-vets-service-$VERSION.jar

export APP_NAME="customers-service"
cp ../spring-petclinic-$APP_NAME/target/spring-petclinic-$APP_NAME-$VERSION.jar spring-petclinic-$APP_NAME-$VERSION.jar
sed -i "s|my-service|$APP_NAME|g" Dockerfile

az containerapp update \
@@ -84,9 +79,10 @@ The following three apps of your application use the database hosted by the Azur
--set-env-vars APPLICATIONINSIGHTS_CONNECTION_STRING=$AI_CONNECTIONSTRING APPLICATIONINSIGHTS_CONFIGURATION_CONTENT='{"role": {"name": "customers-service"}}' InstrumentationKey=$AI_CONNECTIONSTRING

sed -i "s|$APP_NAME|my-service|g" Dockerfile

rm spring-petclinic-$APP_NAME-$VERSION.jar

export APP_NAME="vets-service"
cp ../spring-petclinic-$APP_NAME/target/spring-petclinic-$APP_NAME-$VERSION.jar spring-petclinic-$APP_NAME-$VERSION.jar
sed -i "s|my-service|$APP_NAME|g" Dockerfile

az containerapp update \
@@ -96,19 +92,20 @@ The following three apps of your application use the database hosted by the Azur
--set-env-vars APPLICATIONINSIGHTS_CONNECTION_STRING=$AI_CONNECTIONSTRING APPLICATIONINSIGHTS_CONFIGURATION_CONTENT='{"role": {"name": "vets-service"}}' InstrumentationKey=$AI_CONNECTIONSTRING

sed -i "s|$APP_NAME|my-service|g" Dockerfile

rm spring-petclinic-$APP_NAME-$VERSION.jar

export APP_NAME="visits-service"
cp ../spring-petclinic-$APP_NAME/target/spring-petclinic-$APP_NAME-$VERSION.jar spring-petclinic-$APP_NAME-$VERSION.jar
sed -i "s|my-service|$APP_NAME|g" Dockerfile


az containerapp update \
--name $APP_NAME \
--resource-group $RESOURCE_GROUP \
--source . \
--set-env-vars APPLICATIONINSIGHTS_CONNECTION_STRING=$AI_CONNECTIONSTRING APPLICATIONINSIGHTS_CONFIGURATION_CONTENT='{"role": {"name": "visits-service"}}' InstrumentationKey=$AI_CONNECTIONSTRING

sed -i "s|$APP_NAME|my-service|g" Dockerfile
rm spring-petclinic-$APP_NAME-$VERSION.jar
```

1. This will redeploy each of your apps. After redeploy, double check that yu are still able to connect to the database and see data in the apps. If that is not the case, use the logs to troubleshoot.

0 comments on commit d16603b

Please sign in to comment.