Contact Us 1-800-596-4880

Deploying a Mule Application to CloudHub

Before You Begin

To successfully deploy your Mule application to CloudHub, consider the following requirements:

  • The host and port number of your HTTP Listener flow sources are properly configured.
    If you’re using the HTTP Listener as sources for your flow, you must set its host to 0.0.0.0 and its port to ${http.port}.
    CloudHub then dynamically allocates a port at deployment time.

  • All your external classes and resources are properly declared in the mule-artifact.json file of your Mule application.
    Due to Mule 4.x classloading isolation mechanism, all external classes and resources must be explicitly declared in the "exportedPackages" and "exportedResources" fields on the mule-artifact.json file before packaging and deploying the application.

    See the How to Export Resources task to learn more about working with external resources in your Mule application.

  • The Java version selected in your project must match the Java version of CloudHub to avoid deployment fails.

Deploy to CloudHub

  1. Right click the project folder on your Package Explorer View.

  2. Select Anypoint Platform and then Deploy to CloudHub.
    If you don’t have your Anypoint Platform credentials configured in Anypoint Studio, you must provide your log in information before continuing.

  3. Configure the CloudHub instance to which your application is being deployed.
    Anypoint Studio uses your package name as the name for your application on CloudHub. This name is part of the domain of your deployed application.
    For example, naming your application "deployment-1" makes your application public domain "deployment-1.cloudhub.io."
    You can also configure the runtime version. By default, Studio uses the application version you’re using in your project during development.
    To reduce compatibility risks, you must deploy to the runtime version used to create your Mule project or the closest alternative.

    Additionally you can configure the amount of worker and worker size for the CloudHub instance you’re going to use, enable Insight, static IPs, configure log levels, and properties placeholders for your application.

Redeploy to CloudHub

After you deploy your application from Anypoint Studio for the first time, you can keep modifying the application code and repeat the steps 1 and 2 to redeploy your updated application.
When you get to the CloudHub instance configuration window, the "Overwrite Existing Application" option would already be selected for you. This allows you to redeploy the application.