Daily Learnings: Thu, Jan 23, 2025
Not all those who wander are lost. — J. R. R. Tolkien
Notes on On-Prem Mulesoft Deployments
I did some learning on Mulesoft deployments that involve wrapping on-premise applications.
Prereqs
- You’ll need to have access to a Mulesoft org with the
Anypoint Integration - Advancedsubscription tier, which allows for on-prem deployments - Read through this article that discusses getting an “Enterprise License” file that you’ll use when setting up the Mule standalone Runtime Agent
Steps for Mule Deployment & Management Pane Configuration
- Allocate a “server” using whatever platform or method you’d like
- Could be a virtual machine in the cloud or even on a bare metal server that you’ve racked and stacked yourself
- Install the Mulesoft Runtime Agent
- This is what’s connecting up to the Mulesoft Management Pane (which is hosted by Mulesoft themselves)
- Google “Mulesoft standalone runtime” to find the download link
- Extract the files into a directory on your server
- Note where the
bindirectory is (for use later)
- Navigate to your organization’s Anypoint Platform cloud UI to allocate a server
Anypoint > Runtime Manager > Servers > Add Server- Define a unique name for the server
- Copy the command that the UI provides
- On your server, navigate to the Mule Runtime Agent directory and find the
bindirectory - Run the command in a terminal on the server in this directory
- Ensure that the “heartbeat” that is sent up to the CloudHub is received and that your server is “registered”
- This is always “customer-initiated”, meaning that it’s sent from the customer’s server / data center, never something that Mulesoft attempts to connect directly into
- I.e., this is just egress traffic
- In a terminal on your server, start the Mule process by running
mulein the same directory as above - Ensure that the Runtime Manager shows your server(s) status as “Running”
- (OPTIONAL) Set up a “cluster” for high-availability deployments
- This refers to setting up 2 or more servers with the same applications and Mulesoft Runtime Agent installed (likely with load balancing involved), and wrapping those two servers as a “cluster” so the Mulesoft Management Pane sees them as unified
Deploying Applications to Your Server / Cluster
Note: The following steps assume that you’ll be deploying your application to your Mule Runtime via the web UI
- Navigate in the web-based Anypoint Management Center to
Runtime Manager > Applications > Deploy Application - Name your application
- Select your server / cluster from the
Deployment Targetdropdown menu - Next to
Application File, selectUpload Filefrom theChoose Filedropdown and upload your application’sJARfile - Set up your properties and logging configuration as needed, then click
Deploy
Additional Notes
- You can deploy as many applications on the server running the Mulesoft Runtime Agent as you’d like
- Just make sure that you’re cognizant of the CPU, memory, and storage constraints of the server that you’re running on
- Mulesoft doesn’t really care about where your database or data stores live, even if it’s on other servers or lives in other cloud applications
- All that matters is that the applications are configured correctly
- The servers allocated via this method have a 2 year certificate deployed
- You’ll need to remember to go into the Runtime Manager and renew the certificates manually for the each server to avoid disruptions
Additional Terminology
- Mulesoft Domain Project: This is a special type of Mulesoft project that allows you to share resourced between different projects
- Can only be deployed on-premise, not applicable to applications hosted in CloudHub
Resources
- On-Premise Deployment Model Explained - YouTube
- On-Premise Server Mulesoft Deployment From Scratch - YouTube