Contact Free trial Login

Deploy a Mule Application to Runtime Fabric

You can deploy a Mule application to a Mule runtime server on Anypoint Runtime Fabric. After deploying an application you can test the inbound traffic for deployed applications.

Runtime Fabric can be shared across multiple environments. After installation, configure one or more environments for each Runtime Fabric to enable application deployment. You must associate at least one environment with each Runtime Fabric to be able to deploy Mule applications or API gateways.

Applications deployed to a production environment must be deployed to an instance of Runtime Fabric that is separate from nonproduction applications.

Before You Begin

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

Deploy a Mule Application to Runtime Fabric

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.

    The Deployment Target, Ingress, and Properties, and JVM tabs are displayed. If you are using Runtime Fabric on VMs / Bare Metal the Logs tab is also displayed. Use these tabs to enter additional configuration information for your application.

    To select a domain (endpoint) for the application:

    If you do not select a domain, the application is deployed to an empty domain.
    1. Select the Ingress tab.

    2. In the Public endpoint section, select a domain from the Domain list.

  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.
  10. To enable Mule clustering across each replica of the application, enable Run in Runtime Clustering Mode.

  11. To enforce the deployment of replicas across different nodes, select Enforce deploying replicas across nodes.

    This can cause some replicas in the deployment to remain in Pending status if there are unsufficient worker nodes or resources available on the worker nodes needed to deploy each replica. The deployment status will transition to Running after all replicas are deployed on different worker nodes.

  12. To enable data persistence across Mule application replicas and restarts, select Use Persistent Object Storage.

    This option is only available on Mule runtime engine, version 4.2.1 or later. If this option is unavailable, contact your IT administrator. See Persistence Gateway for more information.

  13. 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.

  14. 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.

        If you are using Runtime Fabric on Self-Managed Kubernetes, this option is enabled by default. To send requests to a deployment using a different supported environment, add additional endpoints for this Runtime Fabric. See Configure Domains and Inbound Traffic (RTF Self-Managed Kuberenetes)

        If you are using Runtime Fabric on VMs / Bare Metal, you must enable inbound traffic manually. Additional endpoints are sourced from the subject alternative names (SAN) certificate property. If a certificate has multiple DNS entries specified by the SAN property, the available URLs are displayed in the *Application URL

        To access a Runtime Fabric instance using more than one DNS, add additional DNS entries in the subject alternative names (SAN) certificate property. If a certificate has multiple DNS entries specified in the SAN property, the available URLs are displayed in the Application url section.

        The following options are only available on Runtime Fabric on VMs / Baremetal.

      • Enable Last-Mile security (This option is only applicable to ) forwards 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. This option is only applicable to Runtime Fabric on VMs / baremetal.

      • Forward SSL session (This option is only applicable to Runtime Fabric on VMs / Baremetal) enables SSL forwarding during a session.

        SSL forwarding is mostly used with client authentication. See Enable Client Authentication. SSL forwarding forwards client certificate details in HTTP request headers so they are available to the application. These fields can identify an authenticated client and allow an application to determine and use the identity.

        The following headers are available:

        Header Name Value

        x-ssl-client-verify

        SUCCESS/FAIL

        x-ssl-issuer

        the client certificate issuer.

        x-ssl-client-serial

        the client certificate serial number.

        x-ssl-client-dn

        the contents of the client certificate DN field.

  15. Configure application properties:

    1. Click the Properties tab.

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

  16. 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.

Configure Continuous Deployment

To set up a workflow for on-premises application deployment on Runtime Fabric, refer to Workflow for On-Premises Runtime Fabric.

Verification

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

  1. Determine which endpoint exposes the application. The Application url field on the Manage application page in Runtime Manager contains this information.

  2. Run the following cURL command for verification:

    curl -Lvk -XGET {application-path-from-runtime-manager} --resolve {hostname}:443:{ip-address-of-controller}

    In the following example, {application-path-from-runtime-manager} is set to https://newapp.example-rtf.dev, and 192.168.64.14 is the IP address of a controller machine in your cluster.

    curl -Lvk https://newapp.example-rtf.dev/ --resolve newapp.example-rtf.dev:443:192.168.64.14

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.

If you are using Runtime Fabric on VMs / Bare Metal, view the application logs in Ops Center or your third party logging provider to see additional 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.

Was this article helpful?

💙 Thanks for your feedback!

Edit on GitHub