Skip to main content
The deploy operation deploys a Mule Application. It should be used in deploy workflows. Properties Management It is always recommended to externalize any configuration parameters (usernames, passwords, URLs etc.). Instead of hard coding these values inside application code, we recommend creating a properties file for your mule application. Please follow these steps to achieve property replacement in FlexDeploy.
  1. Create a properties file in your Mule application (eg: orderapi.properties)
  2. Place values for all the properties for Anypoint Studio local testing. 
  3. Use these property keys in your Mule Application instead of hard coding (eg: ${DB_USERNAME})
  4. In FlexDeploy create these properties in your Workflow with the MULE_ prefix (eg: MULE_DB_USERNAME)
  5. Provide values to these properties on the Target page.
  6. Specify the Property file name in the Project Properties page (Property File Name to Create)
  7. FlexDeploy replaces/creates the property file with the values for the environment it is deploying to.
Deploy operation is compatible with the following types of servers:

FDMULE_TYPE

Notes Specific to the Mule Type

Standalone

This operation runs on the Mule server endpoint(s).

In order to deploy an application to an entire cluster, set up multiple instances or endpoints.

The deployment will be run on all of them so the application will be deployed to all of the cluster members.

 Target Properties

In 9.0.0.3, the cloud-related properties were moved into cloud accounts. This process happens automatically during server startup / migration. If you running on a version of FlexDeploy prior to 9.0.0.2, please refer to the 8.0 documentation instead of this page.

Property Name

Property Code

Required for which Mule Type

Description

Mule Account

FDMULE_CLOUD_ACCOUNT_CODE

CloudHub, Anypoint Runtime Manager

The Mule Integration Account

See Configuring a Mule Cloud Account for help creating a Mule Cloud Account.

Mule Home

FDMULE_HOME

Standalone

Path to the Mule Standalone Install

Timeout in Milliseconds

FDMULE_TIMEOUT

None

Timeout for deployment and utility operations such as start and stop application.

Defaults to 600000 which is 10 minutes.

Runtime Agent URL

FDMULE_AGENT_URL

Runtime Agent

The URL of Runtime Agent

Mule Region Code

FDMULE_REGION

None. Used for CloudHub, but optional.

Region Code for Mule

AnyPoint CLI Path

FDMULE_CH2_ANYPOINT_CLI_PATH

For CloudHub 2.0

Provide the absolute path where the Anypoint CLI is installed.

(/u01/sqlcl/anycli/bin/)

Runtime Properties File

FDMULE_CH2_PROPERTIES_FILE_PATH

For CloudHub 2.0

Provide the path to the properties file containing runtime configuration for CloudHub 2.0. Relative paths will be resolved against FD_ARTIFACTS_DIR.

CloudHub 2.0 Secure Property Name

FDMULE_CH2_SECURE_PROPERTY_NAME

For CloudHub 2.0

Name of the secure property defined in the Mule configuration (for example,secure.key:). This must match the property name referenced in the secure-properties configuration in the Mule XML.

CloudHub 2.0 Secure Property Key

FDMULE_CH2_ENCRYPTION_KEY

For CloudHub 2.0

Key used to decrypt secure values in configuration files (e.g., sandbox.yaml). This must be the same key that was used to encrypt values using the Secure Properties Tool.

CloudHub 2.0 Secure Property Key

FDMULE_RELEASE_CHANNEL

For CloudHub 2.0

Specifies the Mule runtime release channel for CloudHub 2.0 deployment. EDGE selects the latest runtime, LTS selects the long-term support version. If left blank, CloudHub uses the default channel (EDGE).

Project Properties

Property Name

Property Code

Required for which Mule Type

Description

Mule Application Name

FDMULE_APP_NAME

All

Name of the Mule Application

(The Mule Application Name is automatically suffixed with the Anypoint Environment name by FlexDeploy during deployment. This is required for deployments to CloudHub 2.0 to ensure that each application name is unique across all deployment targets in Anypoint Platform. For example appname-dev, appname-test depending on the environment.)

Target Server Type

FDMULE_TARGET_TYPE

Anypoint Runtime Manager

Mule Target Server Type

(Server, Cluster, ServerGroup)

If necessary, this property can be overridden at the property/Target level.

Target Name

FDMULE_TARGET_NAME

Anypoint Runtime Manager

Name for the Target Server, Cluster or Group

If necessary, this property can be overridden at the project/Target level.

Static IP Address

FDMULE_STATIC_IPADDRESS

None. Used for CloudHub, but optional

Static IP Address for the Application

If necessary, this property can be overridden at the project/Target level.

Number of Workers

FDMULE_WORKERS_COUNT

None. Used for CloudHub, but optional.

Workers Count

Worker Size Type

FDMULE_WORKER_TYPE

None. Used for CloudHub, but optional.

Type of the Worker Size

(Micro,Small,Medium,Large,xLarge,xxLarge)

Defaults to Small

Persistent Queues

FDMULE_PERSISTENT_QUEUES

None. Used for CloudHub, but optional.

Enable Persistent Queues

Defaults to false

Property File Name to Create

FDMULE_PROPERTY_FILE

None. Used for CloudHub, but optional.

Name of the property file to create with Mule Properties

Auto Start

FDMULE_AUTO_START

None. Used for CloudHub, but optional.

Defaults to true

Enable Monitoring

FDMULE_MONITORING_ENABLED

None. Used for CloudHub, but optional.

Defaults to true

Replica Size Type

FDMULE_CH2_REPLICA_SIZE

Select the vCore size for the replica.

CloudHub 2.0 Deployement Process

In CloudHub 2.0 (From 10.0.0.2), due to architecture changes, the artifact does not need to be uploaded during deployment. Instead, the deployment process retrieves the artifact directly from MuleSoft Exchange. During the build phase, Maven packages the application and the POM file is updated with the artifact name and version using properties from FlexDeploy. The same artifact name and version are then used during deployment to locate and retrieve the artifact from MuleSoft Exchange and deploy it to CloudHub 2.0.

CloudHub 2.0 Properties Management

In Mule applications, we often need to pass dynamic data (such as URLs, usernames, passwords, and other configuration settings) that may vary across environments (e.g., dev, test, prod). CloudHub 2.0 makes it easy to manage these properties dynamically during deployment, allowing you to handle different environments smoothly.
  1. Organize Properties into Environment-Specific YAML Files
    • It is recommended to store environment-specific configurations in separate YAML files within the src/main/resources/config directory. This way, you can easily separate the configurations for different environments such as development, testing, and production.
    • These YAML files contain properties like:
      • URLs
      • API keys
      • Username/Password (secure values)
      • Example : dev.yaml
  2. Use the FDMULE_CH2_PROPERTIES_FILE_PATH to Select the Environment-Specific YAML
    • During the deployment of the Mule application, CloudHub uses the CH2_PROPERTIES_FILE_PATH property to specify which environment-specific YAML file to use. This allows you to dynamically select the correct environment file based on your deployment context (e.g., development, testing, production).Example Properies File
    • Example File

Artifacts

This operation consumes Mule Application and Domain artifacts from the artifacts repository.

Endpoint Selection

This operation will select all available endpoints associated to the Target.

Endpoint Execution

This operation will execute on all of the selected endpoints.