DZone
Thanks for visiting DZone today,
Edit Profile
  • Manage Email Subscriptions
  • How to Post to DZone
  • Article Submission Guidelines
Sign Out View Profile
  • Post an Article
  • Manage My Drafts
Over 2 million developers have joined DZone.
Log In / Join
Please enter at least three characters to search
Refcards Trend Reports
Events Video Library
Refcards
Trend Reports

Events

View Events Video Library

Zones

Culture and Methodologies Agile Career Development Methodologies Team Management
Data Engineering AI/ML Big Data Data Databases IoT
Software Design and Architecture Cloud Architecture Containers Integration Microservices Performance Security
Coding Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks
Culture and Methodologies
Agile Career Development Methodologies Team Management
Data Engineering
AI/ML Big Data Data Databases IoT
Software Design and Architecture
Cloud Architecture Containers Integration Microservices Performance Security
Coding
Frameworks Java JavaScript Languages Tools
Testing, Deployment, and Maintenance
Deployment DevOps and CI/CD Maintenance Monitoring and Observability Testing, Tools, and Frameworks

Last call! Secure your stack and shape the future! Help dev teams across the globe navigate their software supply chain security challenges.

Modernize your data layer. Learn how to design cloud-native database architectures to meet the evolving demands of AI and GenAI workloads.

Releasing software shouldn't be stressful or risky. Learn how to leverage progressive delivery techniques to ensure safer deployments.

Avoid machine learning mistakes and boost model performance! Discover key ML patterns, anti-patterns, data strategies, and more.

Related

  • AI’s Role in Everyday Development
  • Leveraging Neo4j for Effective Identity Access Management
  • Process Mining Key Elements
  • The Power of Market Disruption: How to Detect Fraud With Graph Data

Trending

  • AI, ML, and Data Science: Shaping the Future of Automation
  • Agile and Quality Engineering: A Holistic Perspective
  • Apache Doris vs Elasticsearch: An In-Depth Comparative Analysis
  • Stateless vs Stateful Stream Processing With Kafka Streams and Apache Flink

Mule Runtime Agent Use Case

Learn how to install Mule Runtime Agent and how it works in two important use cases: Maven deployment and Mule Anypoint Platform.

By 
Anupam Gogoi user avatar
Anupam Gogoi
·
Sep. 04, 17 · Tutorial
Likes (3)
Comment
Save
Tweet
Share
9.1K Views

Join the DZone community and get the full member experience.

Join For Free

In this article, the configuration and use of Mule Runtime Agent will be discussed. I am not going to write in detail about what Mule Runtime Agent is; on the other hand, I am going to explain how to configure the mule-agent.yml file. For more details, please read this link.

Check If You Have Runtime Agent Present

All Enterprise Mule Runtimes above 3.7 come bundled with Mule Runtime Agent. To check, just browse to the bin folder of the runtime and if you see amc_setup stuff; that means it is already present. Mule Agent is not part of the Community Runtime.

Image title

Installation

Now browse to the bin folder of the Mule Runtime and execute the following command in Mac/Linux:

> ./amc_setup -I

It will install the runtime agent and put a configuration file named mule-agent.yml in the conf directory. It looks like as shown below:

Image title

This means that when you run you Mule Runtime (./mule), the the runtime agent will be listening on port 9999, e.g. http://localhost:9999 . Feel free to change the port.

Use of Mule Runtime Agent

You can use Mule Runtime Agent in a number of important aspects. Here I would like to point out two important uses of it.

Maven Deployment

You can do a lot of things using the Mule Runtime Agent. One of the biggest things is you can deploy applications to Mule Runtime by configuring the agent in Maven. Here is a simple example:

<plugin>
<groupId>org.mule.tools.maven</groupId>
<artifactId>mule-maven-plugin</artifactId>
<version>2.0</version>
<configuration>
<deploymentType>agent</deploymentType>
<uri>http://localhost:9999</uri>
</configuration>
<executions>
<execution>
<id>deploy</id>
<phase>deploy</phase>
<goals>
<goal>deploy</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<configuration>
<skip>true</skip>
</configuration>
</plugin>

Add Mule Runtime to Anypoint Platform

You can add servers to the Anypoint Platform, and all the magic happens via Mule Runtime Agent.
Screen Shot 2017-06-01 at 6.41.02 PM.png

When you click the Add Server, it will show you a command as shown below:

Image title

Now copy the command, open a terminal, browse to the bin folder of your Mule Runtime that you are going to add to the Anypoint Platform, and execute. On successful execution, it will CREATE (if does not exist) or OVERWRITE the mule-agent.yml file. So if you have any previous configuration done in the mule-agent.yml, it will be lost.

The file will look something like this:

Image title

You can see that the previous configuration is lost. Now let's suppose that you want to manage the Mule Runtime from Anypoint Platform as well as you want to deploy applications to Mule Runtime using Maven. So, the desired configuration of the mule-agent.yml should be as shown below:
Screen Shot 2017-06-01 at 6.52.23 PM.png

And that's it. You are done with the agent configuration.

Conclusion

In this article, I have shown how to configure the Mule Agent and some of its uses. Mule Agent is the core part of Mule Runtime that provides lots of other functionalities apart from the use cases cited in the article. In another article, I will try to cover those.

Use case

Opinions expressed by DZone contributors are their own.

Related

  • AI’s Role in Everyday Development
  • Leveraging Neo4j for Effective Identity Access Management
  • Process Mining Key Elements
  • The Power of Market Disruption: How to Detect Fraud With Graph Data

Partner Resources

×

Comments
Oops! Something Went Wrong

The likes didn't load as expected. Please refresh the page and try again.

ABOUT US

  • About DZone
  • Support and feedback
  • Community research
  • Sitemap

ADVERTISE

  • Advertise with DZone

CONTRIBUTE ON DZONE

  • Article Submission Guidelines
  • Become a Contributor
  • Core Program
  • Visit the Writers' Zone

LEGAL

  • Terms of Service
  • Privacy Policy

CONTACT US

  • 3343 Perimeter Hill Drive
  • Suite 100
  • Nashville, TN 37211
  • support@dzone.com

Let's be friends:

Likes
There are no likes...yet! 👀
Be the first to like this post!
It looks like you're not logged in.
Sign in to see who liked this post!