Skip to content

Commit 80c6032

Browse files
Acrolinx and further edits.
1 parent a3d443f commit 80c6032

File tree

1 file changed

+26
-28
lines changed

1 file changed

+26
-28
lines changed

articles/spring-apps/migration/migrate-to-azure-container-apps-components-gateway.md

Lines changed: 26 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ ms.custom: devx-track-java
1515

1616
**This article applies to:** ❎ Basic/Standard ✅ Enterprise
1717

18-
This article shows you how to migrate a Spring Cloud Gateway for VMWare Tanzu project running on an Azure Spring Apps Enterprise plan to a project running as a self-hosted Open Source (OSS) Spring Cloud Gateway running as an Azure Container Apps application.
18+
This article shows you how to migrate a Spring Cloud Gateway for VMWare Tanzu project running on an Azure Spring Apps Enterprise plan to a project running as a self-hosted, open source software (OSS) Spring Cloud Gateway project running as an Azure Container Apps application.
1919

2020
The OSS version of Spring Cloud Gateway mentioned in this page is provided as an example for reference. Users can choose other distributions of Spring Cloud Gateway based on their requirements.
2121

2222
> [!NOTE]
23-
> The features offered by Spring Cloud Gateway for VMWare Tanzu are more extensive than the features in the OSS version, so it's essential to verify the differences and ensure compatibility before moving to production.
23+
> The features offered by Spring Cloud Gateway for VMWare Tanzu are more extensive than the features in the OSS version. Be sure to examine the differences and ensure compatibility before moving to production.
2424
2525
## Prerequisites
2626

@@ -34,25 +34,23 @@ The OSS version of Spring Cloud Gateway mentioned in this page is provided as an
3434
To get the code of the Spring Cloud Gateway application, use the following steps:
3535

3636
1. Navigate to https://start.spring.io.
37-
1. Update the project metadata by setting the **Group** to your organization's name. Change the **Artifact** and **Name** to **gateway**.
38-
1. Add dependencies **Reactive Gateway** and **Spring Boot Actuator**.
37+
1. Update the project metadata by setting the **Group** field to your organization's name. Change the **Artifact** and **Name** fields to **gateway**.
38+
1. Add the **Reactive Gateway** and **Spring Boot Actuator** dependencies.
3939
1. Leave the other properties at their default values.
40-
1. Click **Generate** to download the project.
41-
1. Extract the project when it's downloaded.
40+
1. Select **Generate** to download the project.
41+
1. After the project downloads, extract it.
4242

43-
## Configure the Spring Cloud Gateway
43+
## Configure the Spring Cloud Gateway application
4444

45-
Now that the Spring Cloud Gateway code is ready, you configure it in the next sections.
45+
Now that you downloaded the Spring Cloud Gateway application, you configure it in the next sections.
4646

4747
### Configure the application properties file
4848

4949
To configure the application properties file, use the following steps:
5050

5151
1. Navigate to the **gateway/src/main/resources** directory of the project.
52-
5352
1. Rename the **application.properties** file to **application.yml**.
54-
55-
1. Edit the **application.yml**. The following **application.yml** file is typical:
53+
1. Edit the **application.yml** file. The following **application.yml** file is typical:
5654

5755
```yaml
5856
spring:
@@ -88,32 +86,31 @@ To configure the application properties file, use the following steps:
8886
8987
### CORS configuration
9088
91-
To migrate the Cross-Origin Resource Sharing (CORS) configuration of your Spring Cloud Gateway for VMWare Tanzu project, see [CORS Configuration for Spring Cloud Gateway](https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/#cors-configuration) for global CORS configuration and route CORS configuration.
89+
To migrate the Cross-Origin Resource Sharing (CORS) configuration of your Spring Cloud Gateway for VMWare Tanzu project, see [CORS Configuration](https://docs.spring.io/spring-cloud-gateway/docs/current/reference/html/#cors-configuration) for global CORS configuration and route CORS configuration.
9290
9391
### Scale
9492
95-
When migrating to a Spring Cloud Gateway application in Azure Container Apps, the scaling behavior should align with the Azure Container Apps model. The instance count from Spring Cloud Gateway for VMWare Tanzu maps to `min-replica` and `max-replica` in Azure Container Apps. You can configure automatic scaling for the gateway application by defining scaling rules. For more information, see [Set scaling rules in Azure Container Apps](/azure/container-apps/scale-app).
93+
When you migrate to a Spring Cloud Gateway application in Azure Container Apps, the scaling behavior should align with the Azure Container Apps model. The instance count from Spring Cloud Gateway for VMWare Tanzu maps to `min-replica` and `max-replica` in Azure Container Apps. You can configure automatic scaling for the gateway application by defining scaling rules. For more information, see [Set scaling rules in Azure Container Apps](/azure/container-apps/scale-app).
9694

97-
The CPU and memory combinations available in Azure Spring Apps differ from those in Azure Container Apps. When mapping resource allocations, ensure that the selected CPU and memory configurations in Azure Container Apps fit both your performance needs and the supported options.
95+
The CPU and memory combinations available in Azure Spring Apps differ from the combinations available in Azure Container Apps. When mapping resource allocations, ensure that the selected CPU and memory configurations in Azure Container Apps fit both your performance needs and the supported options.
9896

9997
### Custom domains & certificates
10098

10199
Azure Container Apps supports custom domains and certificates. For more information on migrating custom domains configured on Spring Cloud Gateway for VMWare Tanzu, see [Certificates in Azure Container Apps](/azure/container-apps/certificates-overview).
102100

103101
### Routes
104102

105-
You can migrate the routes in Spring Cloud Gatewy for Tanzu to Spring Cloud Gateway, as the **application.yml** example shows. The following list describes the mapping relationship between the routes of Spring Cloud Gateway for VMWare Tanzu and the routes of Spring Cloud Gateway:
103+
You can migrate the routes in Spring Cloud Gateway for Tanzu to Spring Cloud Gateway, as the **application.yml** example shows. The following list describes the mapping relationship between the routes of Spring Cloud Gateway for VMWare Tanzu and the routes of Spring Cloud Gateway:
106104

107105
- The `name` property of the route is mapped to `id`.
108-
109106
- The `appName` and `protocol` properties are mapped to the URI of the route, which should be the accessible URI for the Azure Container Apps instance. Make sure the Azure Container Apps applications enable the ingress.
110-
- Predicates and filters of Spring Cloud Gateway for VMWare Tanzu are mapped to those of Spring Cloud Gateway. Commercial predicates and filters aren't supported. For more information, see [Commercial route filters in Spring Cloud Gateway for K8s](https://techdocs.broadcom.com/us/en/vmware-tanzu/spring/spring-cloud-gateway-for-kubernetes/2-2/scg-k8s/developer-filters.html).
107+
- Predicates and filters of Spring Cloud Gateway for VMWare Tanzu are mapped to predicates and filters of Spring Cloud Gateway. Commercial predicates and filters aren't supported. For more information, see [Commercial route filters in Spring Cloud Gateway for K8s](https://techdocs.broadcom.com/us/en/vmware-tanzu/spring/spring-cloud-gateway-for-kubernetes/2-2/scg-k8s/developer-filters.html).
111108

112109
As an example, consider the following route config JSON file, **test-api.json**, which defines the `test-api` route in Spring Cloud Gateway for VMWare Tanzu for the `test` app:
113110

114111
```json
115112
{
116-
"protocol": "HTTP",
113+
"protocol": "HTTP",
117114
"routes": [
118115
{
119116
"title": "Test API",
@@ -129,7 +126,7 @@ As an example, consider the following route config JSON file, **test-api.json**,
129126
}
130127
```
131128

132-
Then, the following YAML file shows the corresponding route configuration for Spring Cloud Gateway:
129+
Then, the following YAML file shows the corresponding route configuration for the Spring Cloud Gateway application:
133130

134131
```yaml
135132
spring:
@@ -146,11 +143,12 @@ spring:
146143
- StripPrefix=1
147144
```
148145

149-
Spring Cloud Gateway for VMWare Tanzu sets `StripPrefix=1` by default on every route. To migrate to Spring Cloud Gateway, you need to explicitly set `StripPrefix=1` in the filter configuration.
146+
Spring Cloud Gateway for VMWare Tanzu sets `StripPrefix=1` by default on every route. To migrate to a Spring Cloud Gateway, you need to explicitly set `StripPrefix=1` in the filter configuration.
150147

151-
To allow your Spring Cloud Gateway application to access other applications through the app name, you need to enable ingress for your Azure Container App applications. You can also set the accessible FQDN of the Azure Container Apps application to be the URI of the route, following the format `https://<app-name>.<container-app-env-name>.<region>.azurecontainerapps.io`.
148+
To enable your Spring Cloud Gateway application to access other applications through the app name, you need to enable ingress for your Azure Container App applications. You can also set the accessible fully qualified domain name (FQDN) of the Azure Container Apps application to be the URI of the route, following the format `https://<app-name>.<container-app-env-name>.<region>.azurecontainerapps.io`.
152149

153-
There are some [commercial predicates](https://docs.vmware.com/en/VMware-Spring-Cloud-Gateway-for-Kubernetes/2.2/scg-k8s/GUID-guides-predicates.html) and [commercial filters](https://docs.vmware.com/en/VMware-Spring-Cloud-Gateway-for-Kubernetes/2.2/scg-k8s/GUID-guides-filters.html) that aren't supported on Spring Cloud Gateway.
150+
> [!NOTE]
151+
> There are some [commercial predicates](https://docs.vmware.com/en/VMware-Spring-Cloud-Gateway-for-Kubernetes/2.2/scg-k8s/GUID-guides-predicates.html) and [commercial filters](https://docs.vmware.com/en/VMware-Spring-Cloud-Gateway-for-Kubernetes/2.2/scg-k8s/GUID-guides-filters.html) that aren't supported on Spring Cloud Gateway.
154152

155153
### Response cache
156154

@@ -184,7 +182,7 @@ spring:
184182

185183
### Integrate with APM
186184

187-
You can enable application performance monitoring (APM) for Spring Cloud Gateway application. For more information, see [Integrate application performance monitoring into container images](migrate-to-azure-container-apps-build-application-performance-monitoring.md).
185+
You can enable application performance monitoring (APM) for your Spring Cloud Gateway application. For more information, see [Integrate application performance monitoring into container images](migrate-to-azure-container-apps-build-application-performance-monitoring.md).
188186

189187
## Deploy to Azure Container Apps
190188

@@ -231,13 +229,13 @@ To build and push the Docker image, use the following steps:
231229
```azurecli
232230
az acr login --name <azure-container-registry-name>
233231
az acr build \
234-
--resource-group <resource-group-name> \
232+
--resource-group <resource-group-name> \
235233
--image gateway:acrbuild-spring-cloud-gateway-0.0.1-SNAPSHOT \
236234
--registry <azure-container-registry-name> \
237235
--file Dockerfile .
238236
```
239237

240-
1. Ensure the gateway image is created, and get the image tag, which uses the following format: `<azure-container-registry-name>.azurecr.io/gateway:acrbuild-spring-cloud-gateway-0.0.1-SNAPSHOT`.
238+
1. Ensure that the gateway image is created, and get the image tag, which uses the following format: `<azure-container-registry-name>.azurecr.io/gateway:acrbuild-spring-cloud-gateway-0.0.1-SNAPSHOT`.
241239

242240
### Deploy the image in Azure Container Apps
243241

@@ -257,15 +255,15 @@ Access the FQDN of the Spring Cloud Gateway application to verify that it's runn
257255

258256
## Troubleshooting
259257

260-
If you encounter issues when running the Spring Cloud Gateway application, you can view real time and historical logs of the `gateway`application in Azure Container Apps. For more information, see [Application Logging in Azure Container Apps](/azure/container-apps/logging).
258+
If you encounter issues when running the Spring Cloud Gateway application, you can view real-time and historical logs of the `gateway` application in Azure Container Apps. For more information, see [Application Logging in Azure Container Apps](/azure/container-apps/logging).
261259

262260
You can also monitor a gateway application's metrics. For more information, see [Monitor Azure Container Apps metrics](/azure/container-apps/metrics)
263261

264262
## Known limitation
265263

266-
As far as we know, Spring Cloud Gateway does not support the following commercial features:
264+
As far as we know, Spring Cloud Gateway doesn't support the following commercial features:
267265

268266
- Metadata used to generate OpenAPI documentation.
269267
- Single sign-on (SSO) functionality.
270268

271-
If you require these features, you may need to consider other commercial solutions, such as Spring Cloud Gateway for VMWare Tanzu.
269+
If you require these features, you might need to consider other commercial solutions, such as Spring Cloud Gateway for VMWare Tanzu.

0 commit comments

Comments
 (0)