Skip to content

Commit 9572830

Browse files
authored
Merge pull request #268066 from Netyyyy/myao/update-monitor-enterprise
Update Quickstart Monitor applications end-to-end and related docs
2 parents 3282955 + 7a74015 commit 9572830

File tree

4 files changed

+247
-193
lines changed

4 files changed

+247
-193
lines changed

articles/spring-apps/enterprise/quickstart-deploy-apps-enterprise.md

Lines changed: 72 additions & 65 deletions
Original file line numberDiff line numberDiff line change
@@ -59,24 +59,31 @@ Use the following steps to provision an Azure Spring Apps service instance.
5959

6060
1. Select a location. This location must be a location supporting the Azure Spring Apps Enterprise plan. For more information, see the [Azure Spring Apps FAQ](faq.md).
6161

62+
1. Create variables to hold the resource names by using the following commands. Be sure to replace the placeholders with your own values. The name of your Azure Spring Apps service instance must be between 4 and 32 characters long and can contain only lowercase letters, numbers, and hyphens. The first character of the service name must be a letter and the last character must be either a letter or a number.
63+
64+
```azurecli
65+
export LOCATION="<location>"
66+
export RESOURCE_GROUP="<resource-group-name>"
67+
export SERVICE_NAME="<Azure-Spring-Apps-service-instance-name>"
68+
export WORKSPACE_NAME="<workspace-name>"
69+
```
70+
6271
1. Use the following command to create a resource group:
6372

6473
```azurecli
6574
az group create \
66-
--name <resource-group-name> \
67-
--location <location>
75+
--name ${RESOURCE_GROUP} \
76+
--location ${LOCATION}
6877
```
6978

7079
For more information about resource groups, see [What is Azure Resource Manager?](../../azure-resource-manager/management/overview.md).
7180

72-
1. Prepare a name for your Azure Spring Apps service instance. The name must be between 4 and 32 characters long and can contain only lowercase letters, numbers, and hyphens. The first character of the service name must be a letter and the last character must be either a letter or a number.
73-
7481
1. Use the following command to create an Azure Spring Apps service instance:
7582

7683
```azurecli
7784
az spring create \
78-
--resource-group <resource-group-name> \
79-
--name <Azure-Spring-Apps-service-instance-name> \
85+
--resource-group ${RESOURCE_GROUP} \
86+
--name ${SERVICE_NAME} \
8087
--sku enterprise \
8188
--enable-application-configuration-service \
8289
--enable-service-registry \
@@ -88,23 +95,23 @@ Use the following steps to provision an Azure Spring Apps service instance.
8895

8996
```azurecli
9097
az monitor log-analytics workspace create \
91-
--resource-group <resource-group-name> \
92-
--workspace-name <workspace-name> \
93-
--location <location>
98+
--resource-group ${RESOURCE_GROUP} \
99+
--workspace-name ${WORKSPACE_NAME} \
100+
--location ${LOCATION}
94101
```
95102

96103
1. Use the following commands to retrieve the Resource ID for your Log Analytics Workspace and Azure Spring Apps service instance:
97104

98105
```azurecli
99106
export LOG_ANALYTICS_RESOURCE_ID=$(az monitor log-analytics workspace show \
100-
--resource-group <resource-group-name> \
101-
--workspace-name <workspace-name> \
107+
--resource-group ${RESOURCE_GROUP} \
108+
--workspace-name ${WORKSPACE_NAME} \
102109
--query id \
103110
--output tsv)
104111
105112
export AZURE_SPRING_APPS_RESOURCE_ID=$(az spring show \
106-
--resource-group <resource-group-name> \
107-
--name <Azure-Spring-Apps-service-instance-name> \
113+
--resource-group ${RESOURCE_GROUP} \
114+
--name ${SERVICE_NAME} \
108115
--query id \
109116
--output tsv)
110117
```
@@ -158,29 +165,29 @@ Use the following steps to provision an Azure Spring Apps service instance.
158165

159166
```azurecli
160167
az spring app create \
161-
--resource-group <resource-group-name> \
168+
--resource-group ${RESOURCE_GROUP} \
162169
--name cart-service \
163-
--service <Azure-Spring-Apps-service-instance-name>
170+
--service ${SERVICE_NAME}
164171
165172
az spring app create \
166-
--resource-group <resource-group-name> \
173+
--resource-group ${RESOURCE_GROUP} \
167174
--name order-service \
168-
--service <Azure-Spring-Apps-service-instance-name>
175+
--service ${SERVICE_NAME}
169176
170177
az spring app create \
171-
--resource-group <resource-group-name> \
178+
--resource-group ${RESOURCE_GROUP} \
172179
--name payment-service \
173-
--service <Azure-Spring-Apps-service-instance-name>
180+
--service ${SERVICE_NAME}
174181
175182
az spring app create \
176-
--resource-group <resource-group-name> \
183+
--resource-group ${RESOURCE_GROUP} \
177184
--name catalog-service \
178-
--service <Azure-Spring-Apps-service-instance-name>
185+
--service ${SERVICE_NAME}
179186
180187
az spring app create \
181-
--resource-group <resource-group-name> \
188+
--resource-group ${RESOURCE_GROUP} \
182189
--name frontend \
183-
--service <Azure-Spring-Apps-service-instance-name>
190+
--service ${SERVICE_NAME}
184191
```
185192

186193
## Externalize configuration with Application Configuration Service
@@ -191,9 +198,9 @@ Use the following steps to configure Application Configuration Service.
191198

192199
```azurecli
193200
az spring application-configuration-service git repo add \
194-
--resource-group <resource-group-name> \
201+
--resource-group ${RESOURCE_GROUP} \
195202
--name acme-fitness-store-config \
196-
--service <Azure-Spring-Apps-service-instance-name> \
203+
--service ${SERVICE_NAME} \
197204
--label main \
198205
--patterns "catalog/default,catalog/key-vault,identity/default,identity/key-vault,payment/default" \
199206
--uri "https://github.com/Azure-Samples/acme-fitness-store-config"
@@ -203,14 +210,14 @@ Use the following steps to configure Application Configuration Service.
203210

204211
```azurecli
205212
az spring application-configuration-service bind \
206-
--resource-group <resource-group-name> \
213+
--resource-group ${RESOURCE_GROUP} \
207214
--app payment-service \
208-
--service <Azure-Spring-Apps-service-instance-name>
215+
--service ${SERVICE_NAME}
209216
210217
az spring application-configuration-service bind \
211-
--resource-group <resource-group-name> \
218+
--resource-group ${RESOURCE_GROUP} \
212219
--app catalog-service \
213-
--service <Azure-Spring-Apps-service-instance-name>
220+
--service ${SERVICE_NAME}
214221
```
215222

216223
## Activate service registration and discovery
@@ -219,14 +226,14 @@ To active service registration and discovery, use the following commands to bind
219226

220227
```azurecli
221228
az spring service-registry bind \
222-
--resource-group <resource-group-name> \
229+
--resource-group ${RESOURCE_GROUP} \
223230
--app payment-service \
224-
--service <Azure-Spring-Apps-service-instance-name>
231+
--service ${SERVICE_NAME}
225232
226233
az spring service-registry bind \
227-
--resource-group <resource-group-name> \
234+
--resource-group ${RESOURCE_GROUP} \
228235
--app catalog-service \
229-
--service <Azure-Spring-Apps-service-instance-name>
236+
--service ${SERVICE_NAME}
230237
```
231238

232239
## Deploy polyglot applications with Tanzu Build Service
@@ -237,19 +244,19 @@ Use the following steps to deploy and build applications. For these steps, make
237244

238245
```azurecli
239246
az spring build-service builder create \
240-
--resource-group <resource-group-name> \
247+
--resource-group ${RESOURCE_GROUP} \
241248
--name quickstart-builder \
242-
--service <Azure-Spring-Apps-service-instance-name> \
249+
--service ${SERVICE_NAME} \
243250
--builder-file azure-spring-apps-enterprise/resources/json/tbs/builder.json
244251
```
245252

246253
1. Use the following command to build and deploy the payment service:
247254

248255
```azurecli
249256
az spring app deploy \
250-
--resource-group <resource-group-name> \
257+
--resource-group ${RESOURCE_GROUP} \
251258
--name payment-service \
252-
--service <Azure-Spring-Apps-service-instance-name> \
259+
--service ${SERVICE_NAME} \
253260
--config-file-pattern payment/default \
254261
--source-path apps/acme-payment \
255262
--build-env BP_JVM_VERSION=17
@@ -259,9 +266,9 @@ Use the following steps to deploy and build applications. For these steps, make
259266

260267
```azurecli
261268
az spring app deploy \
262-
--resource-group <resource-group-name> \
269+
--resource-group ${RESOURCE_GROUP} \
263270
--name catalog-service \
264-
--service <Azure-Spring-Apps-service-instance-name> \
271+
--service ${SERVICE_NAME} \
265272
--config-file-pattern catalog/default \
266273
--source-path apps/acme-catalog \
267274
--build-env BP_JVM_VERSION=17
@@ -271,9 +278,9 @@ Use the following steps to deploy and build applications. For these steps, make
271278

272279
```azurecli
273280
az spring app deploy \
274-
--resource-group <resource-group-name> \
281+
--resource-group ${RESOURCE_GROUP} \
275282
--name order-service \
276-
--service <Azure-Spring-Apps-service-instance-name> \
283+
--service ${SERVICE_NAME} \
277284
--builder quickstart-builder \
278285
--source-path apps/acme-order
279286
```
@@ -282,9 +289,9 @@ Use the following steps to deploy and build applications. For these steps, make
282289

283290
```azurecli
284291
az spring app deploy \
285-
--resource-group <resource-group-name> \
292+
--resource-group ${RESOURCE_GROUP} \
286293
--name cart-service \
287-
--service <Azure-Spring-Apps-service-instance-name> \
294+
--service ${SERVICE_NAME} \
288295
--builder quickstart-builder \
289296
--env "CART_PORT=8080" \
290297
--source-path apps/acme-cart
@@ -294,9 +301,9 @@ Use the following steps to deploy and build applications. For these steps, make
294301

295302
```azurecli
296303
az spring app deploy \
297-
--resource-group <resource-group-name> \
304+
--resource-group ${RESOURCE_GROUP} \
298305
--name frontend \
299-
--service <Azure-Spring-Apps-service-instance-name> \
306+
--service ${SERVICE_NAME} \
300307
--source-path apps/acme-shopping
301308
```
302309

@@ -311,23 +318,23 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
311318

312319
```azurecli
313320
az spring gateway update \
314-
--resource-group <resource-group-name> \
315-
--service <Azure-Spring-Apps-service-instance-name> \
321+
--resource-group ${RESOURCE_GROUP} \
322+
--service ${SERVICE_NAME} \
316323
--assign-endpoint true
317324
```
318325

319326
1. Use the following commands to configure Spring Cloud Gateway API information:
320327

321328
```azurecli
322329
export GATEWAY_URL=$(az spring gateway show \
323-
--resource-group <resource-group-name> \
324-
--service <Azure-Spring-Apps-service-instance-name> \
330+
--resource-group ${RESOURCE_GROUP} \
331+
--service ${SERVICE_NAME} \
325332
--query properties.url \
326333
--output tsv)
327334
328335
az spring gateway update \
329-
--resource-group <resource-group-name> \
330-
--service <Azure-Spring-Apps-service-instance-name> \
336+
--resource-group ${RESOURCE_GROUP} \
337+
--service ${SERVICE_NAME} \
331338
--api-description "Fitness Store API" \
332339
--api-title "Fitness Store" \
333340
--api-version "v1.0" \
@@ -339,9 +346,9 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
339346

340347
```azurecli
341348
az spring gateway route-config create \
342-
--resource-group <resource-group-name> \
349+
--resource-group ${RESOURCE_GROUP} \
343350
--name cart-routes \
344-
--service <Azure-Spring-Apps-service-instance-name> \
351+
--service ${SERVICE_NAME} \
345352
--app-name cart-service \
346353
--routes-file azure-spring-apps-enterprise/resources/json/routes/cart-service.json
347354
```
@@ -350,9 +357,9 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
350357

351358
```azurecli
352359
az spring gateway route-config create \
353-
--resource-group <resource-group-name> \
360+
--resource-group ${RESOURCE_GROUP} \
354361
--name order-routes \
355-
--service <Azure-Spring-Apps-service-instance-name> \
362+
--service ${SERVICE_NAME} \
356363
--app-name order-service \
357364
--routes-file azure-spring-apps-enterprise/resources/json/routes/order-service.json
358365
```
@@ -361,9 +368,9 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
361368

362369
```azurecli
363370
az spring gateway route-config create \
364-
--resource-group <resource-group-name> \
371+
--resource-group ${RESOURCE_GROUP} \
365372
--name catalog-routes \
366-
--service <Azure-Spring-Apps-service-instance-name> \
373+
--service ${SERVICE_NAME} \
367374
--app-name catalog-service \
368375
--routes-file azure-spring-apps-enterprise/resources/json/routes/catalog-service.json
369376
```
@@ -372,9 +379,9 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
372379

373380
```azurecli
374381
az spring gateway route-config create \
375-
--resource-group <resource-group-name> \
382+
--resource-group ${RESOURCE_GROUP} \
376383
--name frontend-routes \
377-
--service <Azure-Spring-Apps-service-instance-name> \
384+
--service ${SERVICE_NAME} \
378385
--app-name frontend \
379386
--routes-file azure-spring-apps-enterprise/resources/json/routes/frontend.json
380387
```
@@ -383,8 +390,8 @@ Use the following steps to configure Spring Cloud Gateway and configure routes t
383390

384391
```azurecli
385392
export GATEWAY_URL=$(az spring gateway show \
386-
--resource-group <resource-group-name> \
387-
--service <Azure-Spring-Apps-service-instance-name> \
393+
--resource-group ${RESOURCE_GROUP} \
394+
--service ${SERVICE_NAME} \
388395
--query properties.url \
389396
--output tsv)
390397
@@ -401,17 +408,17 @@ Use the following steps to configure API Portal.
401408

402409
```azurecli
403410
az spring api-portal update \
404-
--resource-group <resource-group-name> \
405-
--service <Azure-Spring-Apps-service-instance-name> \
411+
--resource-group ${RESOURCE_GROUP} \
412+
--service ${SERVICE_NAME} \
406413
--assign-endpoint true
407414
```
408415

409416
1. Use the following commands to retrieve the URL for API Portal:
410417

411418
```azurecli
412419
export PORTAL_URL=$(az spring api-portal show \
413-
--resource-group <resource-group-name> \
414-
--service <Azure-Spring-Apps-service-instance-name> \
420+
--resource-group ${RESOURCE_GROUP} \
421+
--service ${SERVICE_NAME} \
415422
--query properties.url \
416423
--output tsv)
417424

0 commit comments

Comments
 (0)