How to Control Your Mule With MMC: Part II
In continuation of my series on how to control your Mule with MMC, today we'll learn how to deploy a Mule application using MMC to Mule runtime.
Join the DZone community and get the full member experience.Join For Free
In one of my previous blogs, I showed you how to set up MMC (Mule Management Console) to manage your Mule runtime servers. In continuation of it, today, I will be showing you how to deploy a Mule application using MMC to Mule runtime.
To show this, I have created a demo application in Anypoint studio named
sample-mmc-demo and created a sample demo flow in it that will set a static payload ("This response is coming from a project deployed on Mule Through MMC") to the request received on the URL http://localhost:8081/demo.
Now, we should create a exported project ZIP file that we will be using to deploy through MMC to Mule runtime. To export the project ZIP file, right-click on the project and click Export.
Upon clicking Export, we are prompted to select what kind of format we want to export. Choose Anypoint Studio Project to Mule Deployable Archive (includes Studio metadata).
Upon clicking Next, we are prompted to choose where we want to save the exported file. Select any location that could also be accessed by the MMC application deployed on the Tomcat server.
Now, we are ready with the exported project ZIP file to be deployed on Mule runtime using MMC. We switch to MMC now and click the Deployments tab of the MMC application. We will be using this tab to manage our deployments on the registered Mule runtime through mMMC
Click New, give details of your deployment application, select the server that you want to deploy the application, and upload the ZIP file.
Deployment Name is the name of your deployment. We should have meaningful names for our deployments to make sense of all the various deployed applications, because if we have many applications deployed, it can become out of control pretty soon and can become difficult to manage.
Applications is where we will be uploading the ZIP file that we created earlier.
Servers represents the name of server where we want to deploy our application. If you have many servers registered on your MMC, we can very easily do a search of server by using the search/dropdown and writing the name of server.
Save and Deploy are two buttons available that both do their task as they are named. Save will save your application on MMC and hold the application for future deployments. Deploy will save and start the deployment as soon as we click it.
Testing the Deploy Application
We can go the the URL that I mentioned earlier and then the application will be deployed on Mule runtime.
With this, we come to the end of deploying applications to Mule runtime. I will continue to write about more the things that we can do with MMC in my future blogs. Do let me know your thoughts about this blog!
Opinions expressed by DZone contributors are their own.