Getting started with WSO2 Micro Integrator CLI Tool

Sanoj Punchihewa
Think Integration
Published in
3 min readAug 2, 2019

--

WSO2 Micro Integrator is an integration server that helps you integrate microservices and cloud-native enterprise architectures using a configuration-driven approach.

WSO2 Micro Integrator is shipped with a command line tool, mi, which allows you to inspect deployed artifacts. With this tool, you can get more insight into what’s going on with the artifacts.

Let’s get started!

Installation

First things first, to use the CLI tool, you need to download it from WSO2 Micro Integrator Tooling and extract the archive to the desired location. Also must have installed the WSO2 Micro Integrator, if not you can get it from here.

Getting Started

1. Configure the Micro Integrator

First lets deploy a composite application in our Micro Integrator. Here I have deployed the HealthcareCompositeApplication.

Download and extract the above ZIP file and from this point onwards I’ll refer this folder as <MI_QSG_HOME>, copy the HealthcareCompositeExporter_1.0.0.car file from<MI_QSG_HOME>/HealthCareCompositeExporter/target directory to the <MI_HOME>/repository/deployment/server/carbonapps directory to deploy.

2. Configure the CLI tool

After you extract the distribution, run the command mi remote login . You’ll be prompted to enter the username and password to login to the Management API of the Micro Integrator.

NOTE: The default remote will be the micro integrator instance running on localhost with the port 9164.

If you are running the Micro Integrator in a different host and port you must first add it has a remote. Please have a look at mi remote command to find out more information.

Trying out the commands

Let’s start with the obvious command everyone will use, the help command to get an idea about the CLI tool.

$ mi help

To get more information about a command use the help command

$ mi api show help

I will show some examples of how you can use these commands to retrieve information about the artifacts deployed.

Example: To list all the endpoints deployed in the WSO2 Micro integrator

$ mi endpoint show

Example: To get information about a specific endpoint

$ mi endpoint show GrandOakEndpoint

Example: To get information about a specific composite app

$ mi compositeapp show HealthcareCompositeExporter

I leave the rest of the commands to try yourself. If you find it hard or confused have a look at the documentation or use the -h help flag 😉

Found this article useful? Please 👏 this post and share it!

Further readings

--

--