Applications implemented in MuleSoft AnyPoint Studio can be tested in built-in Mule Runtime but these applications need a deployment into actual environment for real use. Mule Runtime Engine is responsible for running Mule Applications. MuleSoft runtime can be setup on-premise on private cloud or you can use MuleSoft’s provided CloudHub. In this MuleSoft Deployment tutorial, we will look into deployment steps for Mule Applications in Cloud Hub.
How to Deploy MuleSoft Application to CloudHub
CloudHub is the platform as a service (PaaS) component of Anypoint Platform which is a global, fully-managed & secure platform for MuleSoft applications where you can deploy mule applications and perform various administration, monitoring, policy enforcement tasks.
In this tutorial, we will cover MuleSoft application deployment for beginners by explaining how to deploy Mule Applications to CloudHub directly from AnyPoint Studio or using Runtime Manager component on AnyPoint Platform.
If you prefer to watch the tutorial and learn about MuleSoft Deployment through video content, you can watch below video on YouTube channel of TutorialsPedia where concepts have been explained with a demo of deploying an application implemented in AnyPoint studio.
If you prefer to go ahead with MuleSoft Deployment tutorial in text format, continue reading further.
How to Deploy Mule Application from AnyPoint Studio to Cloud Hub
Mule Applications implemented in AnyPoint studio can be tested with runtime which is provided built-in as part of Studio. Application can be run in debug or run mode in Studio which gets deployed internally in embedded runtime and can be tested. However, for real scenarios, application needs to be deployed in a runtime in a hosted environment on-premise or on-cloud.
To Deploy an application to Cloud Hub from AnyPoint Studio, you need to follow below steps:
- Configure Cloudhub credentials by right clicking on your project and choosing AnyPoint Platform –>Configure Credentials.
You will have to provide user name and password for an active AnyPoint subscription. Once account has been added, you can proceed with subsequent steps.
- In order to deploy your application to MuleSoft Runtime on Cloudhub, right click on your project and choose AnyPoint Platform–>Deploy to CloudHub. A new window will open where you will be asked to provide necessary configurations including Workers count, workers size, deployment target etc.
- After clicking on Deploy Application, your application will get deployed to Runtime and you can login to your AnyPoint Platform and through RunTime Manager, you can see the status and check log file as well.
- Once Application Status is shown as Started (in green), you can test and verify.
Deploy MuleSoft Application through RunTime Manager
You can also export deployable JAR file for your application and deploy using Runtime Manager on AnyPoint Platform without configuring credentials on Studio.
For this purpose, right click on your project and choose Export–>AnyPoint Studio Project to Mule Deployable Archive
This way, you will export your project deployable artifacts into a jar file. Now you can logint to AnyPoint Platform and by choosing Runtime Manager, you can Deploy Application by browsing the exported jar file. Specify your necessary configurations and once application is deployed and started, you can test and verify.
Pingback: MuleSoft CI/CD: Deployment Automation Using Jenkins for Mule 4 Applications | TutorialsPedia MuleSoft CI/CD: Deployment Automation