Skip to content

Commit 25aed97

Browse files
committed
indentation fixes
1 parent 51d89f7 commit 25aed97

File tree

1 file changed

+103
-104
lines changed

1 file changed

+103
-104
lines changed

articles/spring-apps/quickstart.md

Lines changed: 103 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -48,19 +48,19 @@ Use the following steps to create a service instance of Azure Spring Apps.
4848

4949
1. Select **Open Cloudshell** and sign in to your Azure account in [Azure Cloud Shell](../cloud-shell/overview.md).
5050

51-
```azurecli-interactive
52-
az account show
53-
```
51+
```azurecli-interactive
52+
az account show
53+
```
5454

5555
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.
5656

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":::
5858

5959
1. After you sign in successfully, use the following command to display a list of your subscriptions.
6060

61-
```azurecli-interactive
62-
az account list --output table
63-
```
61+
```azurecli-interactive
62+
az account list --output table
63+
```
6464

6565
1. Use the following command to choose and link to your subscription.
6666

@@ -70,19 +70,19 @@ Use the following steps to create a service instance of Azure Spring Apps.
7070

7171
1. Use the following command to create a resource group.
7272

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+
```
7878

7979
1. Use the following command to create an Azure Spring Apps service instance.
8080

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+
```
8686

8787
1. Choose **Y** to install the Azure Spring Apps extension and run it.
8888

@@ -108,8 +108,8 @@ Use the following steps to clone the Spring Boot sample project.
108108

109109
1. Use the following command to clone the [Spring Boot sample project](https://github.com/spring-guides/gs-spring-boot.git) from GitHub.
110110

111-
```azurecli-interactive
112-
git clone -b boot-2.7 https://github.com/spring-guides/gs-spring-boot.git
111+
```azurecli-interactive
112+
git clone -b boot-2.7 https://github.com/spring-guides/gs-spring-boot.git
113113
```
114114
115115
1. Use the following command to move to the project folder.
@@ -120,7 +120,7 @@ Use the following steps to clone the Spring Boot sample project.
120120
121121
1. Use the following [Maven](https://maven.apache.org/what-is-maven.html) command to build the project.
122122
123-
```azurecli-interactive
123+
```azurecli-interactive
124124
mvn clean package -DskipTests
125125
```
126126
@@ -145,91 +145,91 @@ Deploying the application can take a few minutes.
145145
- An Azure subscription. If you don't have a subscription, create a [free account](https://azure.microsoft.com/free/) before you begin.
146146
- [Azure CLI](/cli/azure/install-azure-cli). Install the spring extension for StandardGen2 Azure Spring Apps.
147147

148-
```shell
149-
az extension add --upgrade --name spring
150-
```
148+
```shell
149+
az extension add --upgrade --name spring
150+
```
151151

152152
- Install the Azure Container Apps extension for the CLI and register these namespaces: `Microsoft.App`, `Microsoft.OperationalInsights` and `Microsoft.AppPlatform`
153153

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
159-
```
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
159+
```
160160

161161
## Provision an instance of Azure Spring Apps
162162

163163
Use the following steps to create a service instance of Azure Spring Apps.
164164

165165
1. Select **Open Cloudshell** and sign in to your Azure account in [Azure Cloud Shell](../cloud-shell/overview.md).
166166

167-
```azurecli-interactive
168-
az account show
169-
```
167+
```azurecli-interactive
168+
az account show
169+
```
170170

171171
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.
172172

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":::
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":::
174174

175175
1. After you sign in successfully, use the following command to display a list of your subscriptions.
176176

177-
```azurecli-interactive
178-
az account list --output table
179-
```
177+
```azurecli-interactive
178+
az account list --output table
179+
```
180180

181181
1. Use the following command to choose and link to your subscription.
182182

183-
```azurecli-interactive
184-
az account set --subscription <subscription-id>
185-
```
183+
```azurecli-interactive
184+
az account set --subscription <subscription-id>
185+
```
186186

187187
1. Define variables for this quickstart.
188188

189-
```azurecli-interactive
190-
LOCATION="<location>"
191-
RESOURCE_GROUP="<resource group>"
192-
MANAGED_ENVIRONMENT="<Azure-Container-Apps-environment-name>"
193-
SERVICE_NAME="<Azure-Spring-Apps-instance-name>"
194-
APP_NAME="<Spring-app-name>"
195-
```
189+
```azurecli-interactive
190+
LOCATION="<location>"
191+
RESOURCE_GROUP="<resource group>"
192+
MANAGED_ENVIRONMENT="<Azure-Container-Apps-environment-name>"
193+
SERVICE_NAME="<Azure-Spring-Apps-instance-name>"
194+
APP_NAME="<Spring-app-name>"
195+
```
196196

197197
1. Use the following command to create a resource group.
198198

199-
```azurecli-interactive
200-
az group create \
201-
--resource-group ${RESOURCE_GROUP} \
202-
--location ${LOCATION}
203-
```
199+
```azurecli-interactive
200+
az group create \
201+
--resource-group ${RESOURCE_GROUP} \
202+
--location ${LOCATION}
203+
```
204204

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
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](/azure/azure-monitor/logs/log-analytics-workspace-overview). To create the environment, run the following command
206206

207-
```azurecli-interactive
208-
az containerapp env create \
209-
--name ${MANAGED_ENVIRONMENT} \
210-
--resource-group ${RESOURCE_GROUP} \
211-
--location ${LOCATION}
212-
```
207+
```azurecli-interactive
208+
az containerapp env create \
209+
--name ${MANAGED_ENVIRONMENT} \
210+
--resource-group ${RESOURCE_GROUP} \
211+
--location ${LOCATION}
212+
```
213213

214214
1. Set the environment variable:
215215

216-
```azurecli-interactive
217-
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
218-
--name ${MANAGED_ENVIRONMENT} \
219-
--resource-group ${RESOURCE_GROUP} \
220-
--query id -o tsv)
221-
```
216+
```azurecli-interactive
217+
MANAGED_ENV_RESOURCE_ID=$(az containerapp env show \
218+
--name ${MANAGED_ENVIRONMENT} \
219+
--resource-group ${RESOURCE_GROUP} \
220+
--query id -o tsv)
221+
```
222222

223223
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:
224224

225-
```azurecli-interactive
226-
az spring create \
227-
--resource-group ${RESOURCE_GROUP} \
228-
--name ${SERVICE_NAME} \
229-
--managed-environment ${MANAGED_ENV_RESOURCE_ID} \
230-
--sku standardGen2 \
231-
--location ${LOCATION}
232-
```
225+
```azurecli-interactive
226+
az spring create \
227+
--resource-group ${RESOURCE_GROUP} \
228+
--name ${SERVICE_NAME} \
229+
--managed-environment ${MANAGED_ENV_RESOURCE_ID} \
230+
--sku standardGen2 \
231+
--location ${LOCATION}
232+
```
233233

234234
## Create an app in your Azure Spring Apps instance
235235

@@ -260,36 +260,36 @@ Use the following steps to clone the Spring Boot sample project.
260260

261261
1. Use the following command to clone the [Spring Boot sample project](https://github.com/spring-guides/gs-spring-boot.git) from GitHub.
262262

263-
```azurecli-interactive
264-
git clone -b boot-2.7 https://github.com/spring-guides/gs-spring-boot.git
265-
```
263+
```azurecli-interactive
264+
git clone -b boot-2.7 https://github.com/spring-guides/gs-spring-boot.git
265+
```
266266

267267
1. Use the following command to move to the project folder.
268268

269-
```azurecli-interactive
270-
cd gs-spring-boot/complete
271-
```
269+
```azurecli-interactive
270+
cd gs-spring-boot/complete
271+
```
272272

273273
1. Use the following [Maven](https://maven.apache.org/what-is-maven.html) command to build the project.
274274

275-
```azurecli-interactive
276-
mvn clean package -DskipTests
277-
```
275+
```azurecli-interactive
276+
mvn clean package -DskipTests
277+
```
278278

279279
## Deploy the local app to Azure Spring Apps
280280

281281
1. Use the following command to deploy the *.jar* file for the app.
282282

283-
```azurecli-interactive
284-
az spring app deploy \
285-
--resource-group ${RESOURCE_GROUP} \
286-
--service ${SERVICE_NAME} \
287-
--name ${APP_NAME} \
288-
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar \
289-
--env testEnvKey=testEnvValue \
290-
--runtime-version Java_11 \
291-
--jvm-options '-Xms1024m -Xmx2048m'
292-
```
283+
```azurecli-interactive
284+
az spring app deploy \
285+
--resource-group ${RESOURCE_GROUP} \
286+
--service ${SERVICE_NAME} \
287+
--name ${APP_NAME} \
288+
--artifact-path target/spring-boot-complete-0.0.1-SNAPSHOT.jar \
289+
--env testEnvKey=testEnvValue \
290+
--runtime-version Java_11 \
291+
--jvm-options '-Xms1024m -Xmx2048m'
292+
```
293293

294294
Deploying the application can take a few minutes.
295295

@@ -321,22 +321,21 @@ This example uses Java version 11. To use a different Java version, change the
321321
1. When all dependencies are set, select **Generate**.
322322
1. Download and unpack the package, and then create a web controller for your web application by adding the file *src/main/java/com/example/hellospring/HelloController.java* with the following contents:
323323

324-
```java
325-
package com.example.hellospring;
324+
```java
325+
package com.example.hellospring;
326326

327-
import org.springframework.web.bind.annotation.RestController;
328-
import org.springframework.web.bind.annotation.RequestMapping;
327+
import org.springframework.web.bind.annotation.RestController;
328+
import org.springframework.web.bind.annotation.RequestMapping;
329329

330-
@RestController
331-
public class HelloController {
330+
@RestController
331+
public class HelloController {
332332

333-
@RequestMapping("/")
334-
public String index() {
335-
return "Greetings from Azure Spring Apps!";
333+
@RequestMapping("/")
334+
public String index() {
335+
return "Greetings from Azure Spring Apps!";
336336
}
337-
338-
}
339-
```
337+
}
338+
```
340339

341340
## Create an instance of Azure Spring Apps
342341

@@ -439,7 +438,7 @@ echo "Press [ENTER] to continue ..."
439438

440439
## Next steps
441440

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.
441+
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.
443442

444443
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).
445444

0 commit comments

Comments
 (0)