Skip to content

W-18195573-CHtoCH2-App-Migration #787

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 76 commits into
base: latest
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
76 commits
Select commit Hold shift + click to select a range
8de06ca
W-18195573-CHtoCH2-App-Migration
luanamulesoft Apr 22, 2025
51e92ac
added image
luanamulesoft Apr 22, 2025
60d16ac
fixed format
luanamulesoft Apr 22, 2025
8066ce5
fixed format2
luanamulesoft Apr 22, 2025
16c5c9a
added image
luanamulesoft May 22, 2025
aa70c5c
added API policies
luanamulesoft May 22, 2025
9358281
Delete cloudhub/modules/ROOT/pages/to-request-vpc-connectivity.adoc
luanamulesoft May 22, 2025
aad47c5
Delete cloudhub/modules/ROOT/pages/vpn-about.adoc
luanamulesoft May 22, 2025
767cb5c
Delete cloudhub/modules/ROOT/pages/vpn-update-arm.adoc
luanamulesoft May 22, 2025
00ea56b
files2
luanamulesoft May 22, 2025
17131b2
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
cd9078c
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
c552c65
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
8fcce31
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
e0d171c
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
1933113
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
1c20003
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
fa60eca
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
a2fd8aa
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
21b5b36
Update app-migration.adoc
luanamulesoft May 23, 2025
1ad883e
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
a734ca5
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
57f063e
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
a76cecf
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
55c0421
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
bc275f8
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
7f5ae6e
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
ea5cefa
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
3bea8d9
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
ecb91c4
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
1b7b9e4
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
200f459
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
632a924
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
b2a89a6
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
9a5ed22
Update app-migration.adoc
luanamulesoft May 23, 2025
93d2bc9
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
26e6fac
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
a183056
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
568e02f
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
bd60126
Update app-migration.adoc
luanamulesoft May 23, 2025
09f900a
Update app-migration.adoc
luanamulesoft May 23, 2025
d1ce5bb
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
f96b48d
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
28b765e
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
f7a2e46
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft May 23, 2025
6bcad2c
Update app-migration.adoc
luanamulesoft May 23, 2025
58a2488
Update app-migration.adoc
luanamulesoft May 23, 2025
fd60afc
Update app-migration.adoc
luanamulesoft May 28, 2025
992f0f1
W-18662606-CH2-HTTPS-HTTP
luanamulesoft Jun 12, 2025
b390c78
added image
luanamulesoft Jun 12, 2025
87416d1
Update app-migration.adoc
luanamulesoft Jun 12, 2025
609a55f
fixed format
luanamulesoft Jun 12, 2025
51fc003
W-18707073-SLB-traffic-switching
luanamulesoft Jun 12, 2025
8391574
Update app-migration.adoc
luanamulesoft Jun 13, 2025
9cfd413
Update app-migration.adoc
luanamulesoft Jun 13, 2025
58380f6
Update app-migration.adoc
luanamulesoft Jun 13, 2025
fe0717f
Update app-migration.adoc
luanamulesoft Jun 13, 2025
3597714
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft Jun 13, 2025
9f2775f
Update app-migration.adoc
luanamulesoft Jun 13, 2025
76121bc
Merge pull request #802 from mulesoft/W-18707073-SLB-traffic-switchin…
luanamulesoft Jun 13, 2025
bce0774
W-18894998-restart-dlb
luanamulesoft Jun 25, 2025
53cd53b
Merge pull request #804 from mulesoft/W-18894998-restart-dlb-LDS
luanamulesoft Jun 26, 2025
bcf02af
CH1toCH2-default-certificate
luanamulesoft Jun 27, 2025
54830cb
Update app-migration.adoc
luanamulesoft Jun 30, 2025
0e03fa4
Update app-migration.adoc
luanamulesoft Jun 30, 2025
0191345
rephrase
luanamulesoft Jul 2, 2025
da5c221
Update app-migration.adoc
luanamulesoft Jul 3, 2025
44dbfb1
Merge pull request #807 from mulesoft/W-18689118-DLB-SLB-Traffic-Swit…
luanamulesoft Jul 3, 2025
951b2e5
Update app-migration.adoc
luanamulesoft Jul 3, 2025
1563a11
Update app-migration.adoc
luanamulesoft Jul 4, 2025
6dfcabf
Update app-migration.adoc
luanamulesoft Jul 4, 2025
f770eca
Update cloudhub/modules/ROOT/pages/app-migration.adoc
luanamulesoft Jul 4, 2025
4bee634
Merge branch 'W-18195573-CHtoCH2-App-Migration-LDS' into W-18662606-C…
luanamulesoft Jul 4, 2025
d7f6ebe
Merge pull request #801 from mulesoft/W-18662606-CH2-HTTPS-HTTP-LDS
luanamulesoft Jul 4, 2025
6ff003a
Update app-migration.adoc
luanamulesoft Aug 4, 2025
f12b9eb
fixed format
luanamulesoft Aug 8, 2025
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Binary file not shown.
Binary file not shown.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions cloudhub/modules/ROOT/nav.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
** xref:penetration-testing-policies.adoc[Run Vulnerability Assessment and Penetration Tests]
* xref:cloudhub-release-notes.adoc[Release Notes]
* xref:vpc-upgrade.adoc[]
* xref:app-migration.adoc[]
* xref:cloudhub-use.adoc[Using CloudHub]
** xref:developing-applications-for-cloudhub.adoc[Develop Applications for CloudHub]
** xref:deploying-to-cloudhub.adoc[Deploy to CloudHub]
Expand Down
195 changes: 195 additions & 0 deletions cloudhub/modules/ROOT/pages/app-migration.adoc
Original file line number Diff line number Diff line change
@@ -0,0 +1,195 @@
= CloudHub to CloudHub 2.0 Application Migration

After your Anypoint VPC upgrade is complete, you can migrate all associated applications. Migration involves creating an equivalent CloudHub 2.0 application for every CloudHub application, and linking them to create weighted DNS records for both the CloudHub and the CloudHub 2.0 URLs.


The current CloudHub application continues to run without any disruption until the upgrade is complete. After the upgrade is complete, you can continue to use the same CloudHub URL for your new CloudHub 2.0 application.

Some configuration settings of the CloudHub application aren't automatically mapped to the new CloudHub 2.0 application. Go to your new CloudHub 2.0 application settings to finish the configuration.

[NOTE]
During the application upgrade process, no out-of-the-box entitlements are provided. Work with your account representative to remain compliant with entitlements and finish the upgrade on time.

== Upgrade Your CloudHub Application to CloudHub 2.0 via Anypoint Platform

. From *Anypoint Platform*, select *Runtime Manager* > *Applications*.
. Select the CloudHub application to upgrade and go to *Settings*.
+
If your application is eligible for the upgrade, the upgrade tooling is available on the *Settings* page.
. Click *Upgrade to CloudHub 2.0*, then click *Start Upgrade*.
+
image::upgrade-application-window.png[CloudHub to CloudHub 2.0 application upgrade window]
+
The *Upgrade Application to CloudHub 2.0* page opens.
+
* *Application Name* field shows the inherited CloudHub application name by default.
+
To use a different name for your CloudHub 2.0 application, change it by editing the field.
* *Upgrading From* field shows the name of the CloudHub application the new application is being upgraded from.
+
You can’t edit this field.
* *Deployment Target* field shows the preselected private space for the application deployment based on the upgraded CloudHub VPC.
+
You can’t edit this field.
. For the *Application File*, you can either:
.. Upload your application file: Download the application asset from the link under *Application File*, make the necessary changes, and upload it to deploy your new application to the CloudHub 2.0 private space.
.. Import file from Exchange: Import the CloudHub application you want to upgrade.
. In the *Ingress* tab, specify the *Endpoint* configuration:
.. Select a *Host* from the dropdown list.
+
[NOTE]
If you're using `anypoint.dns.net` without a TLS context, the *Ingress* tab doesn’t show it as a possible endpoint.
+
.. Select a specific subdomain from the dropdown list.
.. Add a specific path.
.. Optionally, provide a specific path rewrite.
.. Select whether you want to provide internal or external access to your endpoint.
. Follow the steps to xref:cloudhub-2::ch2-deploy.adoc[deploy an application to CloudHub 2.0].

[WARNING]
====
If you use a different name for the CloudHub 2.0 application, make sure you put the CloudHub application name in the *Ingress* tab settings in the subdomain field of the endpoint configuration. If you configure URLs incorrectly, traffic doesn't reach the CloudHub 2.0 application during xref:app-migration.adoc#next-steps-after-application-upgrade[traffic switching].

In applications with inbound traffic, the Shared Load Balancer (SLB) handles traffic switching if your Ingress configuration includes the default CloudHub application endpoint in the format: `<app_name>.<region>.cloudhub.io`. However, if that default endpoint is missing and you have configured a vanity domain or an `anypointdns.net endpoint` instead, the Dedicated Load Balancer (DLB) switches the traffic. For more information about SLB and DLB traffic switching, see xref:app-migration.adoc#understanding-the-traffic-source[Understanding the Traffic Source].
====

[NOTE]
The *Host* dropdown list shows only the domains added under the certificates of the underlying VPC Dedicated Load Balancer configuration before the application upgrade started. If you add a new certificate to the original VPC Dedicated Load Balancer after the application upgrade has started, you need to manually add it under the *Domain & TLS* tab of your newly created private space for that domain to appear on the *Host* dropdown list.

== Next Steps After Application Upgrade

After the CloudHub 2.0 application is deployed, you can test the app by directing traffic to it and verifying network connectivity and the app behavior.

To avoid updating your client applications that connect to CloudHub, retain the domains from CloudHub on CloudHub 2.0. To link your applications, apply either of these options:

Customer-managed:: Switch the application’s xref:cloudhub-2::ch2-config-endpoints-paths.adoc[DNS] to point to CloudHub 2.0.

MuleSoft-managed:: Carry over vanity URLs while incrementally switching percentage of traffic from CloudHub to CloudHub 2.0.

[IMPORTANT]
Restart your Dedicated Load Balancer before initiating the traffic switching.

To gradually switch traffic from CloudHub to CloudHub 2.0:

. In *Runtime Manager*, go to *Finish Upgrade*.
. Select the percentage of traffic to direct from CloudHub to CloudHub 2.0, and click *Save changes*.
+
image::traffic-switching.png[CloudHub to CloudHub 2.0 app traffic switching window.]

[NOTE]
You can roll back to CloudHub if there are failures during this stage.

=== Understanding the Traffic Source

The traffic source determines which type of DNS record is updated to manage the traffic flow between your CloudHub and CloudHub 2.0 applications during the migration process. Understanding this concept helps you anticipate how ‌‌traffic is managed based on your application's existing and new endpoint configurations.

CloudHub can theoretically receive traffic from two main sources:

* Shared Load Balancer (SLB): This source is typically associated with the default endpoints of your CloudHub application, often listening on ports `8081/8082`.
* Dedicated Load Balancer (DLB): This source is usually associated with vanity domains configured for your CloudHub application, often listening on ports `8091/8092`.

CloudHub 2.0 applications listen on a single port: `8081`.

During traffic switching, CloudHub needs to know the traffic source to correctly modify the DNS records. This is because applications using SLB have a different DNS record structure than those using DLB.

To facilitate the gradual migration of traffic from CloudHub to CloudHub 2.0, the system creates weighted DNS records. These records direct a certain percentage of traffic to your CloudHub application and the remaining percentage to your linked CloudHub 2.0 application. The specific DNS record that needs to be weighted depends on whether the traffic to your CloudHub application originates from the SLB or the DLB.

The system infers the traffic source based on the endpoints configured for your application. The rules for inference are:

* If your application has a CloudHub default endpoint, the SLB DNS record is used for traffic switching. CloudHub default domains follow patterns like `$region.$env.cloudhub.io` or `*.ca-c1.stgx.cloudhub.io/`.
* If your application has any other endpoints, such as vanity domains or mule-worker endpoints, the DLB DNS record is used for traffic switching.
* Vanity domains are any domains other than the default CloudHub or CloudHub 2.0 domains.
+
Make sure that the vanity domain on CloudHub 2.0 matches the one on the CloudHub application, or avoid setting a traffic switch percentage to prevent dropped traffic.
* If your application has both default domains and vanity domains configured, default domains take precedence over vanity domains.

If you change your application's endpoint configuration, the inferred traffic source can also change. For example, if you initially had only vanity domains (DLB) and then add a CloudHub default endpoint, the traffic source is inferred as SLB.


==== HTTP and HTTPS Requests

When sending traffic via SLB in CloudHub applications, you can target either HTTP or HTTPS. This impacts on whether the SLB uses port 8081 or 8082 to forward requests to your application:

* If you target HTTP, the SLB receives traffic on HTTP and forwards it to port 8081. The app then receives on port 8081.
* If you target HTTPS, the SLB receives traffic on HTTPS and forwards it to port 8082. The app then receives on port 8082.

CloudHub 2.0 private spaces are configured by default to redirect traffic to HTTPS. If you use a mix of HTTP and HTTPS applications in CloudHub SLB and want to migrate this configuration, use either of these workarounds:

* Enable the *Accept HTTP* option within the *Advanced* tab of the private space settings. This allows CloudHub 2.0 to accept HTTP traffic.
+
image::accept-http.png[Option to accept HTTP traffic.]
+
[WARNING]
This option applies to all client-to-private-space traffic. If you enable it, all the applications in that private space become open to accepting HTTP traffic.
+
* Update your CloudHub HTTP applications to become HTTPS. In this case, you can leave the “redirect to HTTPS” option on the private space settings.
+
[NOTE]
This workaround can take more work and time depending on the number of HTTP CloudHub applications you have.


[WARNING]
The CloudHub DLB routes requests from clients to Mule apps deployed within the VPC. The DLB sends requests to a Mule application. It uses the HTTP Host header to find the certificate endpoint that matches the request. Then, it uses the URL mapping rules for that endpoint to send the request to the Mule application. If the request doesn't match any certificate configured on the DLB, the DLB uses the "default" certificate endpoint to match the request against its URL mapping rules. During traffic switching, CloudHub 2.0 doesn't contain mapping rules for this unmatched host within the default certificate.


=== Managing API Policies During Traffic Switching

When API policies are applied to your new application, they begin with a clean internal status.

==== Policies Unchanged by the App Migration

These policies don't rely on internal status and their behavior remains consistent:

* http-basic-authentication
* cors
* client id enforcement
* Header injection
* Header removal
* ip-allowlist
* ip-blocklist
* ldap-authentication
* message-logging
* json-threat-protection
* xml-threat-protection

==== Policies Affected by Internal Status (Caching)

These policies rely on internal status to cache data:

* external-oauth2-access-token-enforcement
* openam-access-token-enforcement
* openidconnect-access-token-enforcement
* pingfederate-access-token-enforcement
* mule-http-caching-policy
* jwt-validation

When transitioning to the new application, these policies can either trigger additional requests to the origin servers or have different cached values depending on which application receives the requests.

==== Policies Affected by Internal Status (Request Counting)

These policies track the number of processed requests and can sometimes exhibit unexpected behavior during the transition to the new application:

* rate-limiting
* rate-limiting-sla-based
* spike-control

If there's a hard change on traffic from one application to the other, policy counters behave as if they were reset. In a balanced round-robin traffic distribution, the effective number of requests can sometimes double as each application maintains an independent counting mechanism.


During the CloudHub to CloudHub 2.0 application migration, traffic gradually shifts, and both applications are active simultaneously. If your API Manager policies are closely integrated with your original CloudHub application, these configurations can’t be easily shared or migrated in real time. To maintain consistent policy enforcement, configure equivalent policies on your CloudHub 2.0 application's API instance during traffic switching.

Auto-discovery connects a deployed Mule application with an API defined in API Manager. Throughout the migration, both your CloudHub and CloudHub 2.0 applications are linked to the same API.


== Complete the Application Upgrade

After traffic is fully redirected to the CloudHub 2.0 application, you have 30 days to stop your CloudHub application and mark the upgrade as complete. If you don't stop it within this period, the platform automatically stops the application for you.

If you change your CloudHub application after it stops, the changes aren't replicated in your new CloudHub 2.0 application. Make any changes to the CloudHub 2.0 application settings.

After your CloudHub application is stopped, you have 30 days to delete it. If you don't delete it within this period, the platform automatically deletes the application for you.

== See Also

* xref:vpc-upgrade.adoc[]
* xref:cloudhub-2::ch2-deploy-private-space.adoc[]