Contact Free trial Login

Deploy a Mule Application to Runtime Fabric

Deploy a Mule application to Anypoint Runtime Fabric and test the inbound traffic for deployed applications.

Before You Begin

Before deploying an application to Anypoint Runtime Fabric, you must perform the following:

Deploy an Application

To deploy an application, perform the following steps:

  1. Sign into Anypoint Platform.

  2. Navigate to Runtime Manager, and select the Applications section.

  3. Click Deploy application.

  4. Provide a name for your application in the Application Name field.

    The name can contain only lowercase alphanumeric characters, hyphens, and underscores.

  5. Click Choose File to select the application to deploy, then select one of the following options:

    • Import file from Exchange: Enables you to select a Mule application stored in Anypoint Exchange.

    • Upload file: Enables you to select a Mule application file from your filesystem.

  6. Select the name of your Runtime Fabric from the Deployment Target drop-down list.

    Result: The Deployment Target, Ingress, and Properties tabs are displayed. Use these tabs to enter additional configuration information for your application.

  7. Select the Deployment Target tab.

    This tab displays the name and type of the deployment target you selected above.

  8. Select the Mule runtime engine version from the Runtime Version drop-down list.

  9. Select the number of replicas, or instances, of the application to deploy.

    A minimum of two replicas is required for high availability. .. To enable Mule clustering across each replica of the application, enable Run in Runtime Clustering Mode.
  10. Specify the number of Cores and amount of Memory to allocate to each replica of the application by adjusting the sliders to the appropriate values.

    See how to determine resource allocation for applications deployed to Runtime Fabric.

  11. Specify network configuration for the application:

    1. Click the Ingress tab.

    2. Enable or disable the following options:

      • Enable inbound traffic to this application to allow incoming HTTP requests to be processed by this application. Ensure your application is configured to accept connections on port 8081.

      • Enable Last-Mile security to forward HTTPS connections to be decrypted by this application. This requires an SSL certificate to be included in the Mule application, and also requires more CPU resources.

  12. Configure application properties:

    1. Click the Properties tab.

    2. Specify your application properties as key-value pairs.

  13. Click Deploy Application.

    If the Deploy Application button is disabled, ensure that you have uploaded a valid Mule application file. Also ensure that the Mule runtime engine version you selected is the same as the version used by your application.

Result: Runtime Manager displays a status message confirming the application deployment. After the deployment starts, you’ll be directed to the applications list page where you can view the deployment status.

For newly deployed applications, the status initially displays as Starting. The status updates to Started if the application is successful. Monitor the application status to ensure that it starts successfully.

Verification

To test inbound traffic for deployed applications, you can send a request using the IP address along with a host header set to the domain. The host header depends on the structure of the application URL.

  • An application URL with the format of {app-name}.domain.com uses the following request header format: Host: {app-name}.domain.com. Here’s an example cURL command to verify: curl -Lvk -XGET https://{ip-address}/{path} -H "Host: {app-name}.domain.com"

  • An application URL with domain.com/{app-name}_ uses the following request header format: Host: domain.com. Here’s an example cURL command to verify: curl -Lvk -XGET https://{ip-address}/{app-name}/{path} -H "Host: domain.com"

Common Issues

If your application remains in the Starting status for several minutes, this may be due to specifying a lower amount of resources. It’s common for applications to take several minutes to start up when selecting 0.3 cores or lower.

If the application encounters an error during startup, the deployment will stop and the status updates to Failed. An error message preview is displayed when clicking on the application and viewing the right sidebar. To view the entire message, click on the Manage Application button. Viewing the application logs in Ops Center or using your third party logging provider will provide more details.

An error message indicating insufficient resources is returned when Runtime Fabric doesn’t have the CPU cores or memory available for the deployment. When selecting multiple replicas, it’s important to know that the cores and memory specified applies to each replica.

If a re-deployment to an existing running application fails, the previous application remains running and active. This behavior enables zero-downtime application re-deployments. Runtime Manager will report the details and status of the failed deployment to help resolve the failure.