You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1. You can test the validity of this new connection with the `validate` command:
165
177
166
178
```bash
179
+
167
180
Vets_ConnId=$(az containerapp connection list \
168
181
--resource-group $RESOURCE_GROUP \
169
182
--name vets-service \
@@ -179,6 +192,7 @@ Since each of these apps already has a user assigned managed identity assigned t
179
192
180
193
az containerapp connection validate \
181
194
--id $Visits_ConnId
195
+
182
196
```
183
197
184
198
1. In the Azure Portal, navigate to your `customers-service` container app. In the `customers-service` app, selectthe`Service Connector` menu item. Notice in this screen you can see the details of your service connector. Notice that the service connector has all the config values set like `spring.datasource.url`, `spring.datasource.username`, but for instance no `spring.datasource.password`. These values get turned into environment variables at runtime for your app. This is also why you could remove them from the Key Vault. Instead of `spring.datasource.password` it has a `spring.cloud.azure.credential.client-id`, which is the client ID of your managed identity. It also defines 2 additional variables `spring.datasource.azure.passwordless-enabled` and `spring.cloud.azure.credential.managed-identity-enabled`for enabling the passwordless connectivity.
@@ -231,8 +245,10 @@ The following three apps of your application use the database hosted by the Azur
231
245
1. With these changes done. Make sure you are in the /src folder and rebuild the project.
232
246
233
247
```bash
248
+
234
249
cd~/workspaces/java-microservices-aks-lab/src
235
250
mvn clean package -DskipTests
251
+
236
252
```
237
253
1. In the config repository you will need to update the database connection information. Replace the contents of the current `application.yml` file with the contents of the [0405_application.yml file](0405_application.yml). Make sure you fill out your current MySQL server name on line `12`. This file includes the following changes:
238
254
@@ -243,14 +259,17 @@ The following three apps of your application use the database hosted by the Azur
243
259
1. Commit these changes to the config repo.
244
260
245
261
```bash
262
+
246
263
git add .
247
264
git commit -m 'Changed db config to passwordless'
248
265
git push
266
+
249
267
```
250
268
251
269
1. Once the build is done, move to the `staging-acr` directory and recreate the container for customers, visits and vets.
0 commit comments