<plugin>
Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::example$mmp-concept-config.xml[]
<configuration>
<cloudHubDeployment>
<uri>https://anypoint.mulesoft.com</uri>
<muleVersion>${app.runtime}</muleVersion>
<username>${username}</username>
<password>${password}</password>
<applicationName>${cloudhub.application.name}</applicationName>
<environment>${environment}</environment>
<properties>
<key>value</key>
</properties>
</cloudHubDeployment>
</configuration>
</plugin>
Deploy Applications to CloudHub
Standard Support for Mule 4.1 ended on November 2, 2020, and this version of Mule reached its End of Life on November 2, 2022, 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. |
In addition to using Anypoint Studio, Anypoint Runtime Manager, or the Anypoint Platform CLI to deploy applications to CloudHub, you can also deploy, redeploy, or undeploy applications by using the Mule Maven plugin. To do so, you must meet certain prerequisites, and configure your CloudHub deployment strategy in your project’s pom.xml
file.
Prerequisites
Before you can deploy to CloudHub using the Mule Maven plugin, you must complete the following tasks:
-
Add the Mule Maven plugin to your project
See Add the Mule Maven Plugin to a Mule Project for instructions.
-
If you are using the HTTP Listener as source for your flow, you need to set its host to 0.0.0.0 and its port to ${http.port}
-
Declare all external classes and resources in the
exportedPackages
andexportedResources
fields on themule-artifact.json
file
Configure the CloudHub Deployment Strategy
Configure the CloudHub deployment strategy in your project’s pom.xml
file so you can deploy, redeploy and undeploy your Mule application using the Mule Maven plugin.
Inside the plugin
element in your project’s pom.xml
file, configure your CloudHub deployment, replacing the placeholder values with your CloudHub information:
Deploy to CloudHub
From the command line in your project’s folder, package the app and execute the deploy goal:
mvn clean package deploy -DmuleDeploy
Redeploy to CloudHub
To redeploy a Mule application using Mule Maven plugin, run mvn clean package deploy -DmuleDeploy
as you did to previously deploy the app. CloudHub rewrites the app you had deployed.
Undeploy from CloudHub
To undeploy a Mule application using Mule Maven plugin, run the following command:
mvn mule:undeploy
The undeploy command also deletes the app in Mule Maven plugin 3.3.0 and later versions.
Authentication Methods
Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[]
Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[]
For a detailed description of the configuration parameters, see the CloudHub Deployment Reference.
CloudHub Deployment Reference
The following table shows the available parameters to configure the CloudHub deployment strategy in your project’s pom.xml
file.
Parameter | Description | Required |
---|---|---|
|
Top-level element |
Yes |
|
Your Anypoint Platform URI |
No |
|
The version of Mule that you want to run in your CloudHub instance |
Yes |
|
Your CloudHub username |
Only when using Anypoint Platform credentials to login. |
|
Your CloudHub password |
Only when using Anypoint Platform credentials to login. |
|
The name of your application in CloudHub |
Yes |
|
The absolute path of the JAR file to be deployed |
No |
|
The CloudHub environment to which you want to deploy
|
Yes Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] |
|
The number of workers |
No |
|
Size of each worker; one of the following values:
|
No |
|
Region of worker clouds; one of the following values:
|
No |
|
Enables Object Store V2 |
No |
|
Enables persistent queues |
No Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[] |
Encrypt Credentials
Unresolved include directive in modules/ROOT/pages/deploy-to-cloudhub.adoc - include::mule-runtime::partial$mmp-concept.adoc[]
+
<plugin>
...
<configuration>
...
<cloudHubDeployment>
...
<server>my.anypoint.credentials</server>
...
</cloudHubDeployment>
...
</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.