Skip to content

Commit d84154f

Browse files
committed
Added pivot zone to distinguish consumption plan
1 parent b662224 commit d84154f

File tree

2 files changed

+124
-98
lines changed

2 files changed

+124
-98
lines changed

articles/spring-apps/quickstart.md

Lines changed: 119 additions & 97 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ ms.service: spring-apps
77
ms.topic: quickstart
88
ms.date: 03/21/2022
99
ms.custom: devx-track-java, devx-track-azurecli, mode-other, event-tier1-build-2022, engagement-fy23
10+
zone_pivot_groups: spring-apps-tier-selection
1011
---
1112

1213
# Quickstart: Deploy your first application to Azure Spring Apps
@@ -19,6 +20,7 @@ ms.custom: devx-track-java, devx-track-azurecli, mode-other, event-tier1-build-2
1920
2021
**This article applies to:** ✔️ Standard consumption (Preview) ✔️ Basic/Standard ✔️ Enterprise
2122

23+
::: zone pivot="sc-consumption-plan"
2224
This article explains how to deploy a small application to run on Azure Spring Apps.
2325

2426
The application code used in this tutorial is a simple app. When you've completed this example, the application is accessible online, and you can manage it through the Azure portal.
@@ -34,14 +36,28 @@ This quickstart explains how to:
3436
3537
At the end of this quickstart, you have a working Spring app running on Azure Spring Apps.
3638

37-
## [Azure CLI](#tab/Azure-CLI)
39+
40+
## [Standard consumption plan with Azure CLI](#tab/Consumption-Plan)
3841

3942
## Prerequisites
4043

4144
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
4245
- [Apache Maven](https://maven.apache.org/download.cgi)
43-
- [Azure CLI](/cli/azure/install-azure-cli). Install the Azure Spring Apps extension with the following command: `az extension add --name spring`
44-
- If you're deploying Azure Spring Apps Enterprise tier for the first time in the target subscription, see the [Prerequisites](./how-to-enterprise-marketplace-offer.md#prerequisites) section of [View Azure Spring Apps Enterprise tier offering in Azure Marketplace](./how-to-enterprise-marketplace-offer.md).
46+
- [Azure CLI](/cli/azure/install-azure-cli). Install the Azure CLI extension for Azure Spring Apps Standard consumption plan by using the following command.
47+
48+
```azurecli
49+
az extension remove --name spring && \
50+
az extension add --name spring
51+
```
52+
53+
- Use the following commands to install the Azure Container Apps extension for the Azure CLI and register these namespaces: `Microsoft.App`, `Microsoft.OperationalInsights`, and `Microsoft.AppPlatform`
54+
55+
```azurecli
56+
az extension add --name containerapp --upgrade
57+
az provider register --namespace Microsoft.App
58+
az provider register --namespace Microsoft.OperationalInsights
59+
az provider register --namespace Microsoft.AppPlatform
60+
```
4561

4662
## Provision an instance of Azure Spring Apps
4763

@@ -53,7 +69,7 @@ Use the following steps to create an Azure Spring Apps service instance.
5369
az account show
5470
```
5571

56-
1. Azure Cloud Shell workspaces are temporary. When first started, the shell prompts you to select an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
72+
1. Azure Cloud Shell workspaces are temporary. When first started, the shell prompts you to associate an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
5773

5874
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
5975

@@ -69,40 +85,77 @@ Use the following steps to create an Azure Spring Apps service instance.
6985
az account set --subscription <subscription-ID>
7086
```
7187

88+
1. Define variables for this quickstart with the names of your resources and desired settings.
89+
90+
```azurecli-interactive
91+
LOCATION="<region>"
92+
RESOURCE_GROUP="<resource-group-name>"
93+
MANAGED_ENVIRONMENT="<Azure-Container-Apps-environment-name>"
94+
SERVICE_NAME="<Azure-Spring-Apps-instance-name>"
95+
APP_NAME="<Spring-app-name>"
96+
```
97+
7298
1. Use the following command to create a resource group.
7399

74100
```azurecli-interactive
75101
az group create \
76-
--resource-group <name-of-resource-group> \
77-
--location eastus
102+
--resource-group ${RESOURCE_GROUP} \
103+
--location ${LOCATION}
78104
```
79105

80-
1. Use the following command to create an Azure Spring Apps service instance.
106+
1. An 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](../azure-monitor/logs/log-analytics-workspace-overview.md). To create the environment, run the following command:
81107

82108
```azurecli-interactive
83-
az spring create \
84-
--resource-group <name-of-resource-group> \
85-
--name <Azure-Spring-Apps-instance-name>
109+
az containerapp env create \
110+
--name ${MANAGED_ENVIRONMENT} \
111+
--resource-group ${RESOURCE_GROUP} \
112+
--location ${LOCATION}
86113
```
87114

88-
1. Select **Y** to install the Azure Spring Apps extension and run it.
115+
1. Use the following command to create a variable to store the environment resource ID:
116+
117+
```azurecli-interactive
118+
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
119+
--name ${MANAGED_ENVIRONMENT} \
120+
--resource-group ${RESOURCE_GROUP} \
121+
--query id \
122+
--output tsv)
123+
```
124+
125+
1. Use the following command to create an Azure Spring Apps service instance. The Azure Spring Apps Standard consumption plan instance is built on top of the Azure Container Apps environment. Create your Azure Spring Apps instance by specifying the resource ID of the environment you created.
126+
127+
```azurecli-interactive
128+
az spring create \
129+
--resource-group ${RESOURCE_GROUP} \
130+
--name ${SERVICE_NAME} \
131+
--managed-environment ${MANAGED_ENV_RESOURCE_ID} \
132+
--sku standardGen2 \
133+
--location ${LOCATION}
134+
```
89135

90136
## Create an app in your Azure Spring Apps instance
91137

92-
An [*App*](concept-understand-app-and-deployment.md) is an abstraction of one business app. Apps run in an Azure Spring Apps service instance, as shown in the following diagram.
138+
An [*App*](concept-understand-app-and-deployment.md) is an abstraction of one business app. Apps run in an Azure Spring Apps service instance, or simply service instance, as shown in the following diagram.
93139

94-
:::image type="content" source="media/spring-cloud-app-and-deployment/app-deployment-rev.png" alt-text="Diagram showing the relationship between apps and an Azure Spring Apps service instance.":::
140+
:::image type="content" source="media/spring-cloud-app-and-deployment/app-deployment-rev.png" alt-text="Diagram showing the relationship between apps and an Azure Spring Apps service instance." border="false":::
95141

96-
Use the following command to specify the app name on Azure Spring Apps as *hellospring*.
142+
Use the following command to specify the app name on Azure Spring Apps and to allocate required resources:
97143

98144
```azurecli-interactive
99145
az spring app create \
100-
--resource-group <name-of-resource-group> \
101-
--service <Azure-Spring-Apps-instance-name> \
102-
--name hellospring \
146+
--resource-group ${RESOURCE_GROUP} \
147+
--service ${SERVICE_NAME} \
148+
--name ${APP_NAME} \
149+
--cpu 1 \
150+
--memory 2Gi \
151+
--instance-count 2 \
103152
--assign-endpoint true
104153
```
105154

155+
Azure Spring Apps creates an empty welcome application and provides its URL in the field named `properties.url`.
156+
157+
:::image type="content" source="media/quickstart/app-welcome-page.png" alt-text="Screenshot of the welcome page." lightbox="media/quickstart/app-welcome-page.png":::
158+
106159
## Clone and build the Spring Boot sample project
107160

108161
Use the following steps to clone the Spring Boot sample project.
@@ -127,39 +180,47 @@ Use the following steps to clone the Spring Boot sample project.
127180

128181
## Deploy the local app to Azure Spring Apps
129182

130-
Use the following command to deploy the *.jar* file for the app (*target/spring-boot-complete-0.0.1-SNAPSHOT.jar* on Windows).
183+
Use the following command to deploy the *.jar* file for the app.
131184

132185
```azurecli-interactive
133186
az spring app deploy \
134-
--resource-group <name-of-resource-group> \
135-
--service <Azure-Spring-Apps-instance-name> \
136-
--name hellospring \
137-
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar
187+
--resource-group ${RESOURCE_GROUP} \
188+
--service ${SERVICE_NAME} \
189+
--name ${APP_NAME} \
190+
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar \
191+
--env testEnvKey=testEnvValue \
192+
--runtime-version Java_11 \
193+
--jvm-options '-Xms1024m -Xmx2048m'
138194
```
139195

140196
Deploying the application can take a few minutes.
141197

142-
## [Standard consumption plan with Azure CLI](#tab/Consumption-Plan)
198+
::: zone-end
143199

144-
## Prerequisites
200+
::: zone pivot="sc-basic-standard-enterprise"
201+
This article explains how to deploy a small application to run on Azure Spring Apps.
145202

146-
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
147-
- [Apache Maven](https://maven.apache.org/download.cgi)
148-
- [Azure CLI](/cli/azure/install-azure-cli). Install the Azure CLI extension for Azure Spring Apps Standard consumption plan by using the following command.
203+
The application code used in this tutorial is a simple app. When you've completed this example, the application is accessible online, and you can manage it through the Azure portal.
149204

150-
```azurecli
151-
az extension remove --name spring && \
152-
az extension add --name spring
153-
```
205+
This quickstart explains how to:
154206

155-
- Use the following commands to install the Azure Container Apps extension for the Azure CLI and register these namespaces: `Microsoft.App`, `Microsoft.OperationalInsights`, and `Microsoft.AppPlatform`
207+
> [!div class="checklist"]
156208
157-
```azurecli
158-
az extension add --name containerapp --upgrade
159-
az provider register --namespace Microsoft.App
160-
az provider register --namespace Microsoft.OperationalInsights
161-
az provider register --namespace Microsoft.AppPlatform
162-
```
209+
> - Generate a basic Spring project.
210+
> - Provision a service instance.
211+
> - Build and deploy an app with a public endpoint.
212+
> - Clean up the resources.
213+
214+
At the end of this quickstart, you have a working Spring app running on Azure Spring Apps.
215+
216+
## [Azure CLI](#tab/Azure-CLI)
217+
218+
## Prerequisites
219+
220+
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
221+
- [Apache Maven](https://maven.apache.org/download.cgi)
222+
- [Azure CLI](/cli/azure/install-azure-cli). Install the Azure Spring Apps extension with the following command: `az extension add --name spring`
223+
- If you're deploying Azure Spring Apps Enterprise tier for the first time in the target subscription, see the [Prerequisites](./how-to-enterprise-marketplace-offer.md#prerequisites) section of [View Azure Spring Apps Enterprise tier offering in Azure Marketplace](./how-to-enterprise-marketplace-offer.md).
163224

164225
## Provision an instance of Azure Spring Apps
165226

@@ -171,7 +232,7 @@ Use the following steps to create an Azure Spring Apps service instance.
171232
az account show
172233
```
173234

174-
1. Azure Cloud Shell workspaces are temporary. When first started, the shell prompts you to associate an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
235+
1. Azure Cloud Shell workspaces are temporary. When first started, the shell prompts you to select an [Azure Storage](../storage/common/storage-introduction.md) instance with your subscription to persist files across sessions.
175236

176237
:::image type="content" source="media/quickstart/azure-storage-subscription.png" alt-text="Screenshot of Azure Storage subscription." lightbox="media/quickstart/azure-storage-subscription.png":::
177238

@@ -187,77 +248,40 @@ Use the following steps to create an Azure Spring Apps service instance.
187248
az account set --subscription <subscription-ID>
188249
```
189250

190-
1. Define variables for this quickstart with the names of your resources and desired settings.
191-
192-
```azurecli-interactive
193-
LOCATION="<region>"
194-
RESOURCE_GROUP="<resource-group-name>"
195-
MANAGED_ENVIRONMENT="<Azure-Container-Apps-environment-name>"
196-
SERVICE_NAME="<Azure-Spring-Apps-instance-name>"
197-
APP_NAME="<Spring-app-name>"
198-
```
199-
200251
1. Use the following command to create a resource group.
201252

202253
```azurecli-interactive
203254
az group create \
204-
--resource-group ${RESOURCE_GROUP} \
205-
--location ${LOCATION}
206-
```
207-
208-
1. An 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](../azure-monitor/logs/log-analytics-workspace-overview.md). To create the environment, run the following command:
209-
210-
```azurecli-interactive
211-
az containerapp env create \
212-
--name ${MANAGED_ENVIRONMENT} \
213-
--resource-group ${RESOURCE_GROUP} \
214-
--location ${LOCATION}
215-
```
216-
217-
1. Use the following command to create a variable to store the environment resource ID:
218-
219-
```azurecli-interactive
220-
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
221-
--name ${MANAGED_ENVIRONMENT} \
222-
--resource-group ${RESOURCE_GROUP} \
223-
--query id \
224-
--output tsv)
255+
--resource-group <name-of-resource-group> \
256+
--location eastus
225257
```
226258

227-
1. Use the following command to create an Azure Spring Apps service instance. The Azure Spring Apps Standard consumption plan instance is built on top of the Azure Container Apps environment. Create your Azure Spring Apps instance by specifying the resource ID of the environment you created.
259+
1. Use the following command to create an Azure Spring Apps service instance.
228260

229261
```azurecli-interactive
230262
az spring create \
231-
--resource-group ${RESOURCE_GROUP} \
232-
--name ${SERVICE_NAME} \
233-
--managed-environment ${MANAGED_ENV_RESOURCE_ID} \
234-
--sku standardGen2 \
235-
--location ${LOCATION}
263+
--resource-group <name-of-resource-group> \
264+
--name <Azure-Spring-Apps-instance-name>
236265
```
237266

267+
1. Select **Y** to install the Azure Spring Apps extension and run it.
268+
238269
## Create an app in your Azure Spring Apps instance
239270

240-
An [*App*](concept-understand-app-and-deployment.md) is an abstraction of one business app. Apps run in an Azure Spring Apps service instance, or simply service instance, as shown in the following diagram.
271+
An [*App*](concept-understand-app-and-deployment.md) is an abstraction of one business app. Apps run in an Azure Spring Apps service instance, as shown in the following diagram.
241272

242-
:::image type="content" source="media/spring-cloud-app-and-deployment/app-deployment-rev.png" alt-text="Diagram showing the relationship between apps and an Azure Spring Apps service instance." border="false":::
273+
:::image type="content" source="media/spring-cloud-app-and-deployment/app-deployment-rev.png" alt-text="Diagram showing the relationship between apps and an Azure Spring Apps service instance.":::
243274

244-
Use the following command to specify the app name on Azure Spring Apps and to allocate required resources:
275+
Use the following command to specify the app name on Azure Spring Apps as *hellospring*.
245276

246277
```azurecli-interactive
247278
az spring app create \
248-
--resource-group ${RESOURCE_GROUP} \
249-
--service ${SERVICE_NAME} \
250-
--name ${APP_NAME} \
251-
--cpu 1 \
252-
--memory 2Gi \
253-
--instance-count 2 \
279+
--resource-group <name-of-resource-group> \
280+
--service <Azure-Spring-Apps-instance-name> \
281+
--name hellospring \
254282
--assign-endpoint true
255283
```
256284

257-
Azure Spring Apps creates an empty welcome application and provides its URL in the field named `properties.url`.
258-
259-
:::image type="content" source="media/quickstart/app-welcome-page.png" alt-text="Screenshot of the welcome page." lightbox="media/quickstart/app-welcome-page.png":::
260-
261285
## Clone and build the Spring Boot sample project
262286

263287
Use the following steps to clone the Spring Boot sample project.
@@ -282,17 +306,14 @@ Use the following steps to clone the Spring Boot sample project.
282306

283307
## Deploy the local app to Azure Spring Apps
284308

285-
Use the following command to deploy the *.jar* file for the app.
309+
Use the following command to deploy the *.jar* file for the app (*target/spring-boot-complete-0.0.1-SNAPSHOT.jar* on Windows).
286310

287311
```azurecli-interactive
288312
az spring app deploy \
289-
--resource-group ${RESOURCE_GROUP} \
290-
--service ${SERVICE_NAME} \
291-
--name ${APP_NAME} \
292-
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar \
293-
--env testEnvKey=testEnvValue \
294-
--runtime-version Java_11 \
295-
--jvm-options '-Xms1024m -Xmx2048m'
313+
--resource-group <name-of-resource-group> \
314+
--service <Azure-Spring-Apps-instance-name> \
315+
--name hellospring \
316+
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar
296317
```
297318

298319
Deploying the application can take a few minutes.
@@ -426,6 +447,7 @@ Use the following steps to build and deploy your app.
426447
To deploy a Spring Boot web app to Azure Spring Apps, follow the steps in [Java on Azure Spring Apps](https://code.visualstudio.com/docs/java/java-spring-apps).
427448

428449
---
450+
::: zone-end
429451

430452
Once deployment has completed, you can access the app at `https://<service-instance-name>-hellospring.azuremicroservices.io/`.
431453

articles/zone-pivot-groups.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1887,6 +1887,10 @@ groups:
18871887
title: Basic/Standard tier
18881888
- id: sc-enterprise-tier
18891889
title: Enterprise tier
1890+
- id: sc-consumption-plan
1891+
title: Standard consumption (Preview)
1892+
- id: sc-basic-standard-enterprise
1893+
title: Basic/Standard/Enterprise
18901894
########### BEGIN APPLICATION MANAGEMENT
18911895
# Service: Active Directory (active-directory)
18921896
# Sub-service: APPLICATION MANAGEMENT(manage-apps)
@@ -1977,7 +1981,7 @@ groups:
19771981
- id: msgraph-powershell
19781982
title: Microsoft graph PowerShell
19791983
- id: ms-graph
1980-
title: Microsoft Graph
1984+
title: Microsoft Graph
19811985
# Owner: juliakm
19821986
- id: pipelines-version
19831987
title: Pipelines version

0 commit comments

Comments
 (0)