Skip to content

Commit 1059f74

Browse files
authored
Merge pull request #210088 from SteveSaunders1952/v-ssaunders-how-to-staging-environment
Update how-to-staging-environment screenshots
2 parents 90044cc + 062ba93 commit 1059f74

File tree

11 files changed

+25
-26
lines changed

11 files changed

+25
-26
lines changed

articles/spring-apps/how-to-staging-environment.md

Lines changed: 25 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: Set up a staging environment in Azure Spring Apps | Microsoft Docs
2+
title: Set up a staging environment in Azure Spring Apps
33
description: Learn how to use blue-green deployment with Azure Spring Apps
44
author: karlerickson
55
ms.service: spring-apps
@@ -22,10 +22,10 @@ This article explains how to set up a staging deployment by using the blue-green
2222

2323
## Prerequisites
2424

25-
* Azure Spring Apps instance on a Standard pricing tier
26-
* [Azure Spring Apps extension](/cli/azure/azure-cli-extensions-overview) for the Azure CLI
25+
- Azure Spring Apps instance on a Standard pricing tier
26+
- [Azure Spring Apps extension](/cli/azure/azure-cli-extensions-overview) for the Azure CLI
2727

28-
This article uses an application built from Spring Initializr. If you want to use a different application for this example, you'll need to make a simple change in a public-facing portion of the application to differentiate your staging deployment from production.
28+
This article uses an application built from Spring Initializr. If you want to use a different application for this example, make a change in a public-facing portion of the application to differentiate your staging deployment from the production deployment.
2929

3030
> [!TIP]
3131
> [Azure Cloud Shell](https://shell.azure.com) is a free interactive shell that you can use to run the instructions in this article. It has common, preinstalled Azure tools, including the latest versions of Git, JDK, Maven, and the Azure CLI. If you're signed in to your Azure subscription, start your Cloud Shell instance. To learn more, see [Overview of Azure Cloud Shell](../cloud-shell/overview.md).
@@ -46,8 +46,8 @@ To build the application, follow these steps:
4646

4747
1. Generate the code for the sample app by using Spring Initializr with [this configuration](https://start.spring.io/#!type=maven-project&language=java&platformVersion=2.3.4.RELEASE&packaging=jar&jvmVersion=1.8&groupId=com.example&artifactId=hellospring&name=hellospring&description=Demo%20project%20for%20Spring%20Boot&packageName=com.example.hellospring&dependencies=web,cloud-eureka,actuator,cloud-starter-sleuth,cloud-starter-zipkin,cloud-config-client).
4848

49-
2. Download the code.
50-
3. Add the following *HelloController.java* source file to the folder *\src\main\java\com\example\hellospring\*:
49+
1. Download the code.
50+
1. Add the following *HelloController.java* source file to the folder *\src\main\java\com\example\hellospring\*:
5151

5252
```java
5353
package com.example.hellospring;
@@ -67,25 +67,25 @@ To build the application, follow these steps:
6767
}
6868
```
6969

70-
4. Build the *.jar* file:
70+
1. Build the *.jar* file:
7171

7272
```azurecli
7373
mvn clean package -DskipTests
7474
```
7575

76-
5. Create the app in your Azure Spring Apps instance:
76+
1. Create the app in your Azure Spring Apps instance:
7777

7878
```azurecli
7979
az spring app create -n demo -g <resourceGroup> -s <Azure Spring Apps instance> --assign-endpoint
8080
```
8181

82-
6. Deploy the app to Azure Spring Apps:
82+
1. Deploy the app to Azure Spring Apps:
8383

8484
```azurecli
8585
az spring app deploy -n demo -g <resourceGroup> -s <Azure Spring Apps instance> --jar-path target\hellospring-0.0.1-SNAPSHOT.jar
8686
```
8787

88-
7. Modify the code for your staging deployment:
88+
1. Modify the code for your staging deployment:
8989

9090
```java
9191
package com.example.hellospring;
@@ -105,54 +105,53 @@ To build the application, follow these steps:
105105
}
106106
```
107107

108-
8. Rebuild the *.jar* file:
108+
1. Rebuild the *.jar* file:
109109

110110
```azurecli
111111
mvn clean package -DskipTests
112112
```
113113

114-
9. Create the green deployment:
114+
1. Create the green deployment:
115115

116116
```azurecli
117117
az spring app deployment create -n green --app demo -g <resourceGroup> -s <Azure Spring Apps instance> --jar-path target\hellospring-0.0.1-SNAPSHOT.jar
118118
```
119119

120120
## View apps and deployments
121121

122-
View deployed apps by using the following procedure:
122+
Use the following steps to view deployed apps.
123123

124124
1. Go to your Azure Spring Apps instance in the Azure portal.
125125

126126
1. From the left pane, open the **Apps** pane to view apps for your service instance.
127127

128-
![Screenshot of the open Apps pane.](media/spring-cloud-blue-green-staging/app-dashboard.png)
128+
:::image type="content" source="media/how-to-staging-environment/app-dashboard.png" lightbox="media/how-to-staging-environment/app-dashboard.png" alt-text="Screenshot of the Apps pane showing apps for your service instance.":::
129129

130-
1. You can select an app and view details.
130+
1. Select an app to view details.
131131

132-
![Screenshot of details for an app.](media/spring-cloud-blue-green-staging/app-overview.png)
132+
:::image type="content" source="media/how-to-staging-environment/app-overview.png" lightbox="media/how-to-staging-environment/app-overview.png" alt-text="Screenshot of details for an app.":::
133133

134134
1. Open **Deployments** to see all deployments of the app. The grid shows both production and staging deployments.
135135

136-
![Screenshot that shows listed app deployments.](media/spring-cloud-blue-green-staging/deployments-dashboard.png)
136+
:::image type="content" source="media/how-to-staging-environment/deployments-dashboard.png" lightbox="media/how-to-staging-environment/deployments-dashboard.png" alt-text="Screenshot that shows listed app deployments.":::
137137

138138
1. Select the URL to open the currently deployed application.
139139

140-
![Screenshot that shows the U R L for the deployed application.](media/spring-cloud-blue-green-staging/running-blue-app.png)
140+
:::image type="content" source="media/how-to-staging-environment/running-blue-app.png" lightbox="media/how-to-staging-environment/running-blue-app.png" alt-text="Screenshot that shows the URL of the deployed application.":::
141141

142142
1. Select **Production** in the **State** column to see the default app.
143143

144-
![Screenshot that shows the U R L for the default app.](media/spring-cloud-blue-green-staging/running-default-app.png)
144+
:::image type="content" source="media/how-to-staging-environment/running-default-app.png" lightbox="media/how-to-staging-environment/running-default-app.png" alt-text="Screenshot that shows the URL of the default app.":::
145145

146146
1. Select **Staging** in the **State** column to see the staging app.
147147

148-
![Screenshot that shows the U R L for the staging app.](media/spring-cloud-blue-green-staging/running-staging-app.png)
148+
:::image type="content" source="media/how-to-staging-environment/running-staging-app.png" lightbox="media/how-to-staging-environment/running-staging-app.png" alt-text="Screenshot that shows the URL of the staging app.":::
149149

150150
>[!TIP]
151-
> * Confirm that your test endpoint ends with a slash (/) to ensure that the CSS file is loaded correctly.
152-
> * If your browser requires you to enter login credentials to view the page, use [URL decode](https://www.urldecoder.org/) to decode your test endpoint. URL decode returns a URL in the format *https://\<username>:\<password>@\<cluster-name>.test.azureapps.io/gateway/green*. Use this format to access your endpoint.
151+
> Confirm that your test endpoint ends with a slash (/) to ensure that the CSS file is loaded correctly. If your browser requires you to enter login credentials to view the page, use [URL decode](https://www.urldecoder.org/) to decode your test endpoint. URL decode returns a URL in the format `https://\<username>:\<password>@\<cluster-name>.test.azureapps.io/gateway/green`. Use this format to access your endpoint.
153152
154153
>[!NOTE]
155-
> Configuration server settings apply to both your staging environment and your production environment. For example, if you set the context path (*server.servlet.context-path*) for your app gateway in the configuration server as *somepath*, the path to your green deployment changes to *https://\<username>:\<password>@\<cluster-name>.test.azureapps.io/gateway/green/somepath/...*.
154+
> Configuration server settings apply to both your staging environment and your production environment. For example, if you set the context path (*server.servlet.context-path*) for your app gateway in the configuration server as *somepath*, the path to your green deployment changes to `https://\<username>:\<password>@\<cluster-name>.test.azureapps.io/gateway/green/somepath/...`.
156155
157156
If you visit your public-facing app gateway at this point, you should see the old page without your new change.
158157

@@ -162,11 +161,11 @@ If you visit your public-facing app gateway at this point, you should see the ol
162161

163162
1. Select the ellipsis after **Registration status** of the green deployment, and then select **Set as production**.
164163

165-
![Screenshot that shows selections for setting the staging build to production.](media/spring-cloud-blue-green-staging/set-staging-deployment.png)
164+
:::image type="content" source="media/how-to-staging-environment/set-staging-deployment.png" lightbox="media/how-to-staging-environment/set-staging-deployment.png" alt-text="Screenshot that shows selections for setting the staging build to production.":::
166165

167166
1. Confirm that the URL of the app displays your changes.
168167

169-
![Screenshot that shows the U R L of the app now in production.](media/spring-cloud-blue-green-staging/new-production-deployment.png)
168+
:::image type="content" source="media/how-to-staging-environment/new-production-deployment.png" lightbox="media/how-to-staging-environment/new-production-deployment.png" alt-text="Screenshot that shows the URL of the app now in production.":::
170169

171170
>[!NOTE]
172171
> After you've set the green deployment as the production environment, the previous deployment becomes the staging deployment.
@@ -191,4 +190,4 @@ az spring app deployment delete -n <staging-deployment-name> -g <resource-group-
191190

192191
## Next steps
193192

194-
* [CI/CD for Azure Spring Apps](./how-to-cicd.md?pivots=programming-language-java)
193+
- [CI/CD for Azure Spring Apps](./how-to-cicd.md?pivots=programming-language-java)
39.4 KB
Loading
40.8 KB
Loading
Binary file not shown.

0 commit comments

Comments
 (0)