How to Deploy and Un-Deploy Mule Apps on a Customer-Hosted Runtime?

DZone 's Guide to

How to Deploy and Un-Deploy Mule Apps on a Customer-Hosted Runtime?

Learn how to easily deploy and un-deploy Mule apps in a customer-hosted, on-premise runtime straight from Anypoint Studio in this tutorial.

· Integration Zone ·
Free Resource


Once you have a runtime environment setup on-premise, you want to be able to deploy and un-deploy Mule apps. Let’s find out how easily can this be done and appreciate the beauty behind its simplicity.


This environment used is as following:

Source Code

You can find the source code of this project here.

Export App

Mule Developer is supposed to give the app packaged in a deployable archive to Mule Administrator. Mule Developer can do this straight from Anypoint Studio.


Start Mule Specifying Placeholder Value

This project is based off the environment aware project template. Therefore, you will need to pass an expected placeholder value when running the Mule runtime.

There are various ways to do so, but the simplest would be passing a parameter when running Mule from a command line.

C:\mule\onprem_servers\max\bin>mule -M-Dmule.env=Development


Make sure the placeholder value was fed as expected:

* Mule Runtime and Integration Platform                              *
* Version: 3.8.5 Build: de4fbf1e                                     *
* MuleSoft, Inc.                                                     *
* For more information go to                                         *
* http://www.mulesoft.com/mule-esb-enterprise                        *
*                                                                    *
* Server started: 18/08/17 1:37 PM                                   *
* JDK: 1.8.0_141 (mixed mode)                                        *
* OS: Windows 10 -  (10.0, amd64)                                    *
* Mule system properties:                                            *
*  - mule.base = C:\mule\onprem_servers\max                          *
*  - mule.env = Development                                          *
*  - mule.home = C:\mule\onprem_servers\max                          *

Deploy the App

The deployable archive has everything necessary within. Thus, app deployment is as easy as putting this into the apps folder of the Mule runtime.


Once the deployment is successful, you will see the deployable archive file was consumed and created an anchor file.


Un-deploy the App

Undeploying the app is done by removing the anchor file created after deployment above. Let’s see how it’s done.


You have now seen how easy it is to deploy and un-deploy app from a customer-hosted runtime. I reckon the beauty behind this simplicity is remarkable. There is no messing around with setup files, touching the Windows registry, deploying artifacts into a dependent proprietary database, etc. All it takes is creating a self-contained zip file that has everything necessary to run the app within. It is simple, lightweight, independent, and manageable. I hope everyone sees the beauty.

anypoint studio ,deployment ,integration ,mule ,mulesoft

Published at DZone with permission of Aaron Kim . See the original article here.

Opinions expressed by DZone contributors are their own.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}