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
> Azure Spring Apps is the new name for the Azure Spring Cloud service. Although the service has a new name, you'll see the old name in some places for a while as we work to update assets such as screenshots, videos, and diagrams.
This quickstart explains how to deploy a small application to run on Azure Spring Apps.
22
+
This article explains how to deploy a small application to run on Azure Spring Apps.
23
23
24
24
The application code used in this tutorial is a simple app. When you've completed this example, the application will be accessible online, and you can manage it through the Azure portal.
25
25
@@ -44,23 +44,23 @@ At the end of this quickstart, you'll have a working spring app running on Azure
44
44
45
45
## Provision an instance of Azure Spring Apps
46
46
47
-
Use the following steps to provision a service instance.
47
+
Use the following steps to create a service instance of Azure Spring Apps.
48
48
49
49
1. Select **Open Cloudshell** and sign in to your Azure account in [Azure Cloud Shell](../cloud-shell/overview.md).
50
50
51
-
```azurecli-interactive
52
-
az account show
53
-
```
51
+
```azurecli-interactive
52
+
az account show
53
+
```
54
54
55
55
1. Azure Cloud Shell workspaces are temporary. On initial start, the shell prompts you to associate an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
56
56
57
-
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
57
+
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
58
58
59
59
1. After you sign in successfully, use the following command to display a list of your subscriptions.
60
60
61
-
```azurecli-interactive
62
-
az account list --output table
63
-
```
61
+
```azurecli-interactive
62
+
az account list --output table
63
+
```
64
64
65
65
1. Use the following command to choose and link to your subscription.
66
66
@@ -70,28 +70,29 @@ Use the following steps to provision a service instance.
70
70
71
71
1. Use the following command to create a resource group.
72
72
73
-
```azurecli-interactive
74
-
az group create \
75
-
--resource-group <name-of-resource-group> \
76
-
--location eastus
77
-
```
73
+
```azurecli-interactive
74
+
az group create \
75
+
--resource-group <name-of-resource-group> \
76
+
--location eastus
77
+
```
78
78
79
79
1. Use the following command to create an Azure Spring Apps service instance.
80
80
81
-
```azurecli-interactive
82
-
az spring create \
83
-
--resource-group <name-of-resource-group> \
84
-
--name <service-instance-name>
85
-
```
81
+
```azurecli-interactive
82
+
az spring create \
83
+
--resource-group <name-of-resource-group> \
84
+
--name <service-instance-name>
85
+
```
86
86
87
87
1. Choose **Y** to install the Azure Spring Apps extension and run it.
88
88
89
89
## Create an app in your Azure Spring Apps instance
90
+
90
91
An [**App**](/azure/spring-apps/concept-understand-app-and-deployment) is an abstraction of one business app. Apps run in an Azure Spring Apps Service Instance, or simply service instance, as shown next.
91
92
</br>
92
93

93
94
</br>
94
-
Use the following command to specify the app name on Azure Spring Apps as *hellospring*.
95
+
Use the following command to specify the app name on Azure Spring Apps as *hello spring*.
95
96
96
97
```azurecli-interactive
97
98
az spring app create \
@@ -107,21 +108,21 @@ Use the following steps to clone the Spring Boot sample project.
107
108
108
109
1. Use the following command to clone the [Spring Boot sample project](https://github.com/spring-guides/gs-spring-boot.git) from GitHub.
1. Use the following command to move to the project folder.
115
116
116
-
```azurecli-interactive
117
-
cd gs-spring-boot/complete
118
-
```
117
+
```azurecli-interactive
118
+
cd gs-spring-boot/complete
119
+
```
119
120
120
121
1. Use the following [Maven](https://maven.apache.org/what-is-maven.html) command to build the project.
121
122
122
-
```azurecli-interactive
123
-
mvn clean package -DskipTests
124
-
```
123
+
```azurecli-interactive
124
+
mvn clean package -DskipTests
125
+
```
125
126
126
127
## Deploy the local app to Azure Spring Apps
127
128
@@ -142,23 +143,24 @@ Deploying the application can take a few minutes.
142
143
## Prerequisites
143
144
144
145
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
145
-
-[Azure CLI](/cli/azure/install-azure-cli). Install the spring extension specifically designed for StandardGen2 Azure Spring Apps.
146
+
-[Azure CLI](/cli/azure/install-azure-cli). Install the spring extension for StandardGen2 Azure Spring Apps.
146
147
147
148
```shell
148
149
az extension add --upgrade --name spring
149
150
```
150
151
151
152
- Install the Azure Container Apps extension for the CLI and register these namespaces: `Microsoft.App`, `Microsoft.OperationalInsights` and `Microsoft.AppPlatform`
152
-
```shell
153
-
az extension add --name containerapp --upgrade
154
-
az provider register --namespace Microsoft.App
155
-
az provider register --namespace Microsoft.OperationalInsights
156
-
az provider register --namespace Microsoft.AppPlatform
153
+
154
+
```shell
155
+
az extension add --name containerapp --upgrade
156
+
az provider register --namespace Microsoft.App
157
+
az provider register --namespace Microsoft.OperationalInsights
158
+
az provider register --namespace Microsoft.AppPlatform
157
159
```
158
160
159
161
## Provision an instance of Azure Spring Apps
160
162
161
-
Use the following steps to provision a service instance.
163
+
Use the following steps to create a service instance of Azure Spring Apps.
162
164
163
165
1. Select **Open Cloudshell** and sign in to your Azure account in [Azure Cloud Shell](../cloud-shell/overview.md).
164
166
@@ -168,7 +170,7 @@ Use the following steps to provision a service instance.
168
170
169
171
1. Azure Cloud Shell workspaces are temporary. On initial start, the shell prompts you to associate an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
170
172
171
-
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
173
+
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
172
174
173
175
1. After you sign in successfully, use the following command to display a list of your subscriptions.
174
176
@@ -181,23 +183,26 @@ Use the following steps to provision a service instance.
181
183
```azurecli-interactive
182
184
az account set --subscription <subscription-id>
183
185
```
184
-
1. These are the pre-defined parameters used in this quickstart, you can also define your own based on needs:
1. Use the following command to create a resource group.
194
198
195
199
```azurecli-interactive
196
200
az group create \
197
-
--resource-group ${RESOURCE_GROUP} \
198
-
--location ${LOCATION}
201
+
--resource-group ${RESOURCE_GROUP} \
202
+
--location ${LOCATION}
199
203
```
200
-
1. An Azure Container App environment creates a secure boundary around a group apps. Apps deployed to the same environment are deployed in the same virtual network and write logs to the same [Log Analytics workspace](https://learn.microsoft.com/azure/azure-monitor/logs/log-analytics-workspace-overview). To create the environment, run the following command
204
+
205
+
1. An Azure Container App 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](https://learn.microsoft.com/azure/azure-monitor/logs/log-analytics-workspace-overview). To create the environment, run the following command
201
206
202
207
```azurecli-interactive
203
208
az containerapp env create \
@@ -206,23 +211,24 @@ Use the following steps to provision a service instance.
206
211
--location ${LOCATION}
207
212
```
208
213
209
-
1. Set the environment varable:
214
+
1. Set the environment variable:
215
+
210
216
```azurecli-interactive
211
217
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
212
218
--name ${MANAGED_ENVIRONMENT} \
213
219
--resource-group ${RESOURCE_GROUP} \
214
220
--query id -o tsv)
215
221
```
216
222
217
-
1. Use the following command to create an Azure Spring Apps service instance.The StandardGen2 Azure Spring Apps instance is built on top of the Container Environment: Create your Azure Spring Apps instance by specifying the resource id of the ACA Environment you just created:
223
+
1. Use the following command to create an Azure Spring Apps service instance.The StandardGen2 Azure Spring Apps instance is built on top of the Container Environment: Create your Azure Spring Apps instance by specifying the resource ID of the ACA Environment you created:
## Create an app in your Azure Spring Apps instance
@@ -233,18 +239,18 @@ An [**App**](/azure/spring-apps/concept-understand-app-and-deployment) is an abs
233
239
</br>
234
240
Use the following command to specify the app name on Azure Spring Apps and allocate required resources:
235
241
236
-
```azurecli-interactive
237
-
az spring app create \
238
-
--resource-group ${RESOURCE_GROUP} \
239
-
--service ${SERVICE_NAME} \
240
-
--name ${APP_NAME} \
241
-
--cpu 1 \
242
-
--memory 2Gi \
243
-
--instance-count 2 \
244
-
--assign-endpoint true
245
-
```
242
+
```azurecli-interactive
243
+
az spring app create \
244
+
--resource-group ${RESOURCE_GROUP} \
245
+
--service ${SERVICE_NAME} \
246
+
--name ${APP_NAME} \
247
+
--cpu 1 \
248
+
--memory 2Gi \
249
+
--instance-count 2 \
250
+
--assign-endpoint true
251
+
```
246
252
247
-
Azure Spring Apps will create an empty welcome application, and you can find the appliction url in the field `properties.url`.
253
+
Azure Spring Apps creates an empty welcome application, and you can find the application url in the field `properties.url`.
248
254
249
255
:::image type="content" source="media/quickstart/bannerapp.png" alt-text="Screenshot of the welcome page." lightbox="media/quickstart/bannerapp.png":::
250
256
@@ -332,7 +338,7 @@ This example uses Java version 11. To use a different Java version, change the
332
338
}
333
339
```
334
340
335
-
## Provision an instance of Azure Spring Apps
341
+
## Create an instance of Azure Spring Apps
336
342
337
343
Use the following steps to create an instance of Azure Spring Apps using the Azure portal.
338
344
@@ -433,9 +439,9 @@ echo "Press [ENTER] to continue ..."
433
439
434
440
## Next steps
435
441
436
-
In this quickstart, you learned how to generate a basic Spring project, provision a service instance, build and deploy an app with a public endpoint, and clean up the resources.
442
+
In this quickstart, you learned how to build and deploy a Spring app in a service instance of Azure Spring Apps. You also learned how to deploy an app with a public endpoint, and how to clean up resources.
437
443
438
-
You also have access to powerful logs, metrics, and distributed tracing capability from the Azure portal. For more information, see [Quickstart: Monitoring Azure Spring Apps apps with logs, metrics, and tracing](./quickstart-logs-metrics-tracing.md).
444
+
You have access to powerful logs, metrics, and distributed tracing capability from the Azure portal. For more information, see [Quickstart: Monitoring Azure Spring Apps apps with logs, metrics, and tracing](./quickstart-logs-metrics-tracing.md).
439
445
440
446
To learn how to use more Azure Spring capabilities, advance to the quickstart series that deploys a sample application to Azure Spring Apps:
0 commit comments