Skip to content

Commit 2160ed0

Browse files
committed
edits
1 parent 490391f commit 2160ed0

File tree

1 file changed

+49
-49
lines changed

1 file changed

+49
-49
lines changed

articles/spring-apps/quickstart-deploy-event-driven-app-standard-consumption.md

Lines changed: 49 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
---
22
title: Quickstart - Deploy event-driven application to Azure Spring Apps with the Standard consumption plan
3-
description: Learn how to deploy an event-driven application to Azure Spring Apps
3+
description: Learn how to deploy an event-driven application to Azure Spring Apps with the Standard consumption plan.
44
author: karlerickson
55
ms.service: spring-apps
66
ms.topic: quickstart
7-
ms.date: 02/23/2023
7+
ms.date: 03/22/2023
88
ms.author: rujche
99
ms.custom: devx-track-java, devx-track-azurecli, mode-other, event-tier1-build-2022, engagement-fy23
1010
---
@@ -53,66 +53,66 @@ The main resources needed to run this sample is an Azure Spring Apps instance an
5353

5454
Set variables to the names of your resources, and to values for other settings as needed. Names of resources in Azure must be unique.
5555

56-
```azurecli-interactive
57-
RESOURCE_GROUP=<event-driven-app-resource-group>
56+
```azurecli
57+
RESOURCE_GROUP=<event-driven-app-resource-group-name>
5858
LOCATION=<desired-region>
5959
SERVICE_BUS_NAME_SPACE=<event-driven-app-service-bus-namespace>
60-
MANAGED_ENVIRONMENT=<Azure-Container-Apps-environment>
61-
AZURE_SPRING_APPS_NAME=<Azure-Spring-Apps-instance>
62-
APP_NAME=<event-driven-app>
60+
AZURE_CONTAINER_APPS_ENVIRONMENT=<Azure-Container-Apps-environment-name>
61+
AZURE_SPRING_APPS_INSTANCE=<Azure-Spring-Apps-instance-name>
62+
APP_NAME=<event-driven-app-name>
6363
```
6464

6565
### Step 2 - Create a new resource group
6666

6767
To manage the resources easily, create a resource group to hold these resources. Follow the following steps to create a new resource group.
6868

69-
1. Sign-in Azure CLI.
69+
1. Sign in to Azure by using the following command:
7070

71-
```azurecli-interactive
71+
```azurecli
7272
az login
7373
```
7474

75-
1. Set default location.
75+
1. Set the default location by using the following command:
7676

77-
```azurecli-interactive
77+
```azurecli
7878
az configure --defaults location=${LOCATION}
7979
```
8080

8181
1. Set your default subscription. Firstly, list all available subscriptions:
8282

83-
```azurecli-interactive
83+
```azurecli
8484
az account list --output table
8585
```
8686

8787
Determine the ID of the subscription you want to set and use it with the following command to set your default subscription.
8888

89-
```azurecli-interactive
89+
```azurecli
9090
az account set --subscription <subscription-ID>
9191
```
9292

9393
1. Create a resource group.
9494

95-
```azurecli-interactive
95+
```azurecli
9696
az group create --resource-group ${RESOURCE_GROUP}
9797
```
9898

9999
1. Set the newly created resource group as default resource group.
100100

101-
```azurecli-interactive
101+
```azurecli
102102
az configure --defaults group=${RESOURCE_GROUP}
103103
```
104104

105105
### Step 3 - Create a Service Bus instance
106106

107-
1. Run the following command to create a Service Bus namespace.
107+
1. Use the following command to create a Service Bus namespace.
108108

109-
```azurecli-interactive
109+
```azurecli
110110
az servicebus namespace create --name ${SERVICE_BUS_NAME_SPACE}
111111
```
112112

113-
1. Run the following command to create two queues named `lower-case` and `upper-case`.
113+
1. Use the following commands to create two queues named `lower-case` and `upper-case`.
114114

115-
```azurecli-interactive
115+
```azurecli
116116
az servicebus queue create \
117117
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
118118
--name lower-case
@@ -129,71 +129,71 @@ An Azure Spring Apps Consumption plan hosts the Spring event-driven app. This se
129129

130130
The Azure Container Apps environment creates a secure boundary around a group of applications. Apps deployed to the same environment are deployed in the same virtual network and write logs to the same Log Analytics workspace.
131131

132-
1. Install the Azure Container Apps extension for the CLI.
132+
1. Install the Azure Container Apps extension for the CLI by using the following command:
133133

134-
```azurecli-interactive
134+
```azurecli
135135
az extension add --name containerapp --upgrade
136136
```
137137

138-
1. Register the `Microsoft.App` namespace.
138+
1. Register the `Microsoft.App` namespace by using the following command:
139139

140-
```azurecli-interactive
140+
```azurecli
141141
az provider register --namespace Microsoft.App
142142
```
143143

144-
1. If you haven't previously used the Azure Monitor Log Analytics workspace, register the `Microsoft.OperationalInsights` provider.
144+
1. If you haven't previously used the Azure Monitor Log Analytics workspace, register the `Microsoft.OperationalInsights` provider by using the following command:
145145

146-
```azurecli-interactive
146+
```azurecli
147147
az provider register --namespace Microsoft.OperationalInsights
148148
```
149149

150-
1. Create the environment by this command:
150+
1. Create the environment by using the following command:
151151

152-
```azurecli-interactive
153-
az containerapp env create --name ${MANAGED_ENVIRONMENT}
152+
```azurecli
153+
az containerapp env create --name ${AZURE_CONTAINER_APPS_ENVIRONMENT}
154154
```
155155

156156
#### Step 4.2 - Create Azure Spring Apps instance
157157

158158
1. Install the Spring extension designed for StandardGen2 Azure Spring Apps.
159159

160-
```azurecli-interactive
160+
```azurecli
161161
az extension remove -n spring && \
162162
az extension add \
163163
--source https://ascprivatecli.blob.core.windows.net/cli-extension/spring-1.8.0-py3-none-any.whl \
164164
--yes
165165
```
166166

167-
1. Register the Microsoft.AppPlatform provider for the Azure Spring Apps.
167+
1. Register the `Microsoft.AppPlatform` provider for the Azure Spring Apps by using the following command:
168168

169-
```azurecli-interactive
169+
```azurecli
170170
az provider register --namespace Microsoft.AppPlatform
171171
```
172172

173-
1. Get Azure Container Apps environment resource ID.
173+
1. Get the Azure Container Apps environment resource ID by using the following command:
174174

175-
```azurecli-interactive
175+
```azurecli
176176
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
177-
--name ${MANAGED_ENVIRONMENT} \
177+
--name ${AZURE_CONTAINER_APPS_ENVIRONMENT} \
178178
--query id -o tsv)
179179
```
180180

181-
1. Create your Azure Spring Apps instance by specifying the resource ID of the Azure Container Apps environment you created.
181+
1. Use the following command to create your Azure Spring Apps instance, specifying the resource ID of the Azure Container Apps environment you created.
182182

183-
```azurecli-interactive
183+
```azurecli
184184
az spring create \
185-
--name ${AZURE_SPRING_APPS_NAME} \
185+
--name ${AZURE_SPRING_APPS_INSTANCE} \
186186
--managed-environment ${MANAGED_ENV_RESOURCE_ID} \
187187
--sku standardGen2
188188
```
189189

190190
#### Step 4.3 - Create an app in Azure Spring Apps
191191

192-
Create an app in the Azure Spring Apps instance.
192+
Create an app in the Azure Spring Apps instance by using the following command:
193193

194-
```azurecli-interactive
194+
```azurecli
195195
az spring app create \
196-
--service ${AZURE_SPRING_APPS_NAME} \
196+
--service ${AZURE_SPRING_APPS_INSTANCE} \
197197
--name ${APP_NAME} \
198198
--cpu 1 \
199199
--memory 2 \
@@ -208,9 +208,9 @@ Now both the Service Bus and the app in Azure Spring Apps have been created. But
208208

209209
#### Step 5.1 - Get a connection string
210210

211-
To enable the app to connect to the Service Bus, get the Service Bus's connection string.
211+
To enable the app to connect to the Service Bus, get the Service Bus's connection string by using the following command:
212212

213-
```azurecli-interactive
213+
```azurecli
214214
SERVICE_BUS_CONNECTION_STRING=$(az servicebus namespace authorization-rule keys list \
215215
--namespace-name ${SERVICE_BUS_NAME_SPACE} \
216216
--name RootManageSharedAccessKey \
@@ -222,9 +222,9 @@ SERVICE_BUS_CONNECTION_STRING=$(az servicebus namespace authorization-rule keys
222222

223223
Provide the connecting string to the app by adding an environment variable.
224224

225-
```azurecli-interactive
225+
```azurecli
226226
az spring app update \
227-
--service ${AZURE_SPRING_APPS_NAME} \
227+
--service ${AZURE_SPRING_APPS_INSTANCE} \
228228
--name ${APP_NAME} \
229229
--env SERVICE_BUS_CONNECTION_STRING=${SERVICE_BUS_CONNECTION_STRING}
230230
```
@@ -233,19 +233,19 @@ az spring app update \
233233

234234
Now the cloud environment is ready. Deploy the app with the following command.
235235

236-
```azurecli-interactive
236+
```azurecli
237237
az spring app deploy \
238-
--service ${AZURE_SPRING_APPS_NAME} \
238+
--service ${AZURE_SPRING_APPS_INSTANCE} \
239239
--name ${APP_NAME} \
240240
--artifact-path target/simple-event-driven-app-0.0.1-SNAPSHOT.jar
241241
```
242242

243243
## Validate the event-driven app
244244

245-
To check whether the event-driven app works well, validate it by sending a message to the `lower-case` queue and check whether there's a message in the `upper-case`queue.
245+
To check whether the event-driven app works well, validate it by sending a message to the `lower-case` queue and check whether there's a message in the `upper-case` queue.
246246

247-
1. Send a message to `lower-case` queue with Service Bus Explorer. For details see [Send a message to a queue or topic](/azure/service-bus-messaging/explorer#send-a-message-to-a-queue-or-topic).
248-
1. Check whether there is a new message sent to the `upper-case` queue. For details see [Peek a message](/azure/service-bus-messaging/explorer#peek-a-message).
247+
1. Send a message to `lower-case` queue with Service Bus Explorer. For more information, see the [Send a message to a queue or topic](../service-bus-messaging/explorer.md#send-a-message-to-a-queue-or-topic) section of [Use Service Bus Explorer to run data operations on Service Bus](../service-bus-messaging/explorer.md).
248+
1. Check whether there is a new message sent to the `upper-case` queue. For more information, see the [Peek a message](../service-bus-messaging/explorer.md#peek-a-message) section of [Use Service Bus Explorer to run data operations on Service Bus](../service-bus-messaging/explorer.md).
249249

250250
## Next steps
251251

0 commit comments

Comments
 (0)