x-ssl-client-verify
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:
-
Install and configure Anypoint Runtime Fabric. See Begin Runtime Fabric Installation for more information.
-
Ensure that Runtime Fabric is associated with an environment. See Associate Business Groups and Environments to Anypoint Runtime Fabric
-
Determine the resource allocation requirements for your application. See Determine Application Resource Allocation on Runtime Fabric for more information.
-
Your Anypoint user may require the Exchange Contributors permission to deploy applications to Runtime Fabric.
-
To deploy an application to a specific domain (endpoint), ensure that you have setup domains (endpoints) in your environment. See Enable Inbound Traffic on Anypoint Runtime Fabric (Self-Managed Kuberenetes) or Enable Inbound Traffic on Anypoint Runtime Fabric (VM / Baremetal)
Deploy a Mule Application to Runtime Fabric
To deploy an application, perform the following steps:
-
Sign into Anypoint Platform.
-
Navigate to Runtime Manager, and select the Applications section.
-
Click Deploy application.
-
Provide a name for your application in the Application Name field.
The name can contain only lowercase alphanumeric characters, hyphens, and underscores.
-
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.
-
-
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. -
Select the Ingress tab.
-
In the Public endpoint section, select a domain from the Domain list.
-
-
Select the Deployment Target tab.
This tab displays the name and type of the deployment target you selected above.
-
Select the Mule runtime engine version from the Runtime Version drop-down list.
-
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.
-
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.
-
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.
-
Specify network configuration for the application:
-
Click the Ingress tab.
-
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 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.
-
-
-
Configure application properties:
-
Click the Properties tab.
-
Specify your application properties as key-value pairs.
-
-
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.
-
Determine which endpoint exposes the application. The Application url field on the Manage application page in Runtime Manager contains this information.
-
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 tohttps://newapp.example-rtf.dev
, and192.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.