Hear from Salesforce leaders on how to create and deploy Agentforce agents.
Contact Us 1-800-596-4880

Deploy Applications to Runtime Fabric

This version of Mule reached its End of Life on May 2, 2023, when Extended Support ended.

Deployments of new applications to CloudHub that use this version of Mule are no longer allowed. Only in-place updates to applications are permitted.

MuleSoft recommends that you upgrade to the latest version of Mule 4 that is in Standard Support so that your applications run with the latest fixes and security enhancements.

Mule Maven plugin versions 3.0.0, 3.1.0, 3.1.1, 3.1.2, 3.1.3, 3.1.4, 3.1.5, 3.1.6, and 3.1.7 are deprecated.

In addition to using Anypoint Runtime Manager, to deploy applications to Anypoint Runtime Fabric, you can also deploy applications by using the Mule Maven plugin. To do so, you must meet certain prerequisites, and configure your Runtime Fabric deployment strategy in your project’s pom.xml file.

Prerequisites

Configure the Runtime Fabric Deployment Strategy

Inside the plugin element, add a configuration for your Runtime Fabric deployment, replacing the following placeholder values with your Runtime Fabric information:

<plugin>
Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::example$mmp-concept-config.xml[]
  <configuration>
    <runtimeFabricDeployment>
      <uri>https://anypoint.mulesoft.com</uri>
      <muleVersion>${app.runtime}</muleVersion>
      <username>${username}</username>
      <password>${password}</password>
      <applicationName>${runtime.fabric.application.name}</applicationName>
      <target>${runtime.fabric.name}</target>
      <environment>${environment}</environment>
      <provider>${provider}</provider>
      <properties>
        <key>value</key>
      </properties>
      <deploymentSettings>
        <publicUrl>${app.url}</publicUrl>
        <cpuReserved>500m</cpuReserved>
        <memoryReserved>800Mi</memoryReserved>
      </deploymentSettings>
    </runtimeFabricDeployment>
  </configuration>
</plugin>

Deploy to Runtime Fabric

From the command line in your project’s folder, package the application and execute the deploy goal:

mvn clean package deploy -DmuleDeploy

Redeploy to Runtime Fabric

To redeploy the application, run the same command as you did to deploy.
Runtime Fabric rewrites the application you had deployed.

Authentication Methods

Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[]

Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[]

For a detailed description of the configuration parameters, see the Runtime Fabric Deployment Parameters Reference.

Runtime Fabric Deployment Parameters Reference

Parameter Description Required

runtimeFabricDeployment

Top-Level Element

Yes

uri

Your Anypoint Platform URI.
If not set, defaults to https://anypoint.mulesoft.com.

No

muleVersion

The Mule runtime engine version to run in your Runtime Fabric instance.
Ensure that this value is equal to or higher than the earliest required Mule version of your application.
Example values: 4.2.0, 4.2.2-hf4

Yes

username

Your Anypoint Platform username

Only when using Anypoint Platform credentials to login.

password

Your Anypoint Platform password

Only when using Anypoint Platform credentials to login.

applicationName

The application name displayed in Runtime Manager after the app deploys.

Yes

target

The Runtime Fabric target name where to deploy the app.

Yes

provider

Set to MC, for Runtime Fabric.

Yes

environment

Target Anypoint Platform environment.
This value must match an environment configured in your Anypoint Platform account, as shown here:

<environment>Sandbox</environment>

Yes Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[]

deploymentSettings

Any of the parameters documented in deploymentSettings Reference

No

deploymentSettings Parameters Reference

Parameter Description

clusteringEnabled

Enables clustering across two or more replicas of the application; default is false.
Here is an example:

<deploymentSettings>
    <clusteringEnabled>true</clusteringEnabled>
</deploymentSettings>

replicationFactor

The number of instances for your application. Default is 1.
Here is an example:

<deploymentSettings>
    <replicationFactor>2</replicationFactor>
</deploymentSettings>

lastMileSecurity

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. Default is false.

<deploymentSettings>
    <lastMileSecurity>true</lastMileSecurity>
</deploymentSettings>

memoryReserved

Amount of memory to be allocated for each replica of the application. Default value is 700 MB.

<deploymentSettings>
    <memoryReserved>100Mi</memoryReserved>
</deploymentSettings>

This allocates 100 MB of memory per replica.

memoryMax

Maximum memory allocated per application replica. Value must be equal to or greater than memoryReserved, if configured.

<deploymentSettings>
    <memoryMax>200Mi</memoryMax>
</deploymentSettings>

This allocates 200 MB maximum memory for each replica.

cpuReserved

Number of cores allocated per application replica. Default is 0.5 vCores.

<deploymentSettings>
    <cpuReserved>500m</cpuReserved>
</deploymentSettings>

This allocates 0.5 vCores per replica.

cpuMax

Amount of max cores to be allocated for each replica of the application
If a cpuReserved configuration is present, ensure that this value is equal or higher.

<deploymentSettings>
    <cpuMax>1000m</cpuMax>
</deploymentSettings>

This allocates a maximum of 1 vCore per replica.

publicUrl

URL of the deployed application:

<deploymentSettings>
    <publicUrl>myapp.anypoint.com</publicUrl>
</deploymentSettings>

Encrypt Credentials

Unresolved include directive in modules/ROOT/pages/deploy-to-rtf.adoc - include::mule-runtime::partial$mmp-concept.adoc[]

+

<plugin>
  ...
  <configuration>
    ...
    <runtimeFabricDeployment>
      ...
      <server>my.anypoint.credentials</server>
      ...
    </runtimeFabricDeployment>
    ...
  </configuration>
  ...
<plugin>

+ NOTE: Make sure that the username and password are not set in the deployment configuration, or they will overwrite the defined server ID.