- Tutorials
- Getting Up and Running with mInsight
Getting Up and Running with mInsight
Objective
The objective of this tutorial is to demonstrate how to install the mInsight web utility on a Raspberry Pi in order to perform service discovery against the edge Service Mesh.
Take the hands-on lesson for this tutorial
All the content presented in this tutorial is available in our hands-on interactive learning environment which you can access here or by clicking on the figure below.
Intended Readers
The intended reader of this document is a person with programming or system administration skills who wants to use the minsight web utility in order to perform service discovery against the edge Service Mesh.
What You'll Be Doing
During the course of this tutorial you will be installing mInsight web utility from the command line of a Raspberry Pi device and then use it to do discovery against the edge Service Mesh. Thus, you will do the following tasks:
- Get the
.tar
file that represents the mInsight microservice from the mimik repository on GitHub - Verify that a valid Access Token is associated with your running instance of the mim OE Runtime
- Deploy the edge Image for the mInsight microservice using the
mimik-edge-cli
tool - Create and configure the file
start.json
that's required to deploy the mInsight microservice - Deploy the edge Container for the mInsight microservice using the
mimik-edge-cli
tool - Open the mInsight web page in a browser on the Raspberry Pi desktop
- Do discovery of the Network cluster using the mInsight web utility
Technical Prerequisites
- A Raspberry Pi or another Linux computer running a web browser
- The Raspberry Pi must be running an instance of the mim OE Runtime. To learn how to setup a Raspberry Pi device with the mim OE Runtime, read the tutorial, Installing mim OE and the mimik-edge-cli Tool on a Linux System or MacOS.
- The Raspberry Pi must have an Access Token associated with the mim OE Runtime. To learn how to create and associate the an Access Token with the mim OE Runtime, read the tutorial, Using the mimik-edge-cli Tool to Get An Access Token.
Working with mInsight
The mInsight web utility ships as a standalone edge microservice that runs under the mim OE Runtime. As such, you will need to deploy it as you would any other edge microservice. The following steps will show you how to get mInsight up and running.
![]() |
---|
Figure 4: The mInsight web utility provides a GUI to do discovery on the edge Service Mesh |
Getting mInsight up and running
First you'll need to download the .tar
which is the artifact that has the mInsight microservice. The .tar
file is known as an edge Image. You'll deploy that image. Then, once the edge Image is deployed, you'll create a running instance of the mInsight microservice by deploying it as an edge Container against the deployed edge Image.
BE ADVISED: You need to have an Access Token configured to the mim OE Runtime |
---|
The process of deploying an edge Image and an edge Container requires that you have a valid Access Token configured to the mim OE Runtime. If you need a refresher about to get and use an Access Token, Using the mimik-edge-cli Tool to Get An Access Token. The tutorial explains how to get an Access Token using the mimik-edge-cli tool. |
To install the mInsight web utility and get it up and running, take the following steps:
Step 1: Download the latest version of mInsight.
You can find the latest version of mInsight on GitHub website at: https://github.com/edgeMicroservice/mInsight/releases
.
Clicking the link of the latest version on the mInsight releases page on GitHub will download the file automatically.
Or, if you want to download a specific version from a terminal window, type the following at the command prompt:
curl -OL https://github.com/edgeMicroservice/mInsight/releases/download/v1.4.0/minsight-v1-1.4.0.tar
The command shown above downloads minsight-v1-1.4.0
to the directory where the curl
command is executed.
Step 2: Verify that the mim OE Runtime is running on the Raspberry Pi and that an Access Token as been associated on Raspberry Pi. Execute following command to do the verification.
mimik-edge-cli account get-me
If successful, you'll get output similar to the following:
1: accountId: 28143048051926016002: linkLocalIp: 192.168.86.393: name: mypi-014: nodeId: a95c7f6035b7d00c12fdf359a7a00f41ac803a521f313f39c5fb17af5: supernodeTypeName: _mk-v15-4996e4c2442cc796f2c0ddb4e5e1627d._tcp6: version: v2.3.1 v2.3.1
Notice in the output above the the key accountId
at Line 1
has a value assigned to it. This means that an Access Token is in force. If accountId
does NOT have a value, an Access Token is NOT in force. In this case, you will need to create an Access Token and associate it. Read to tutorial, Using the mimik-edge-cli Tool to Get An Access Token to learn how to create and associate an Access Token.
Step 3: Navigate to the directory into which you downloaded the mInsight .tar
file.
Step 4: Deploy the mInsight Image by executing the following command in a terminal window
mimik-edge-cli image deploy --image=minsight-v1-1.4.0 --token=`<YOUR_ACCESS_TOKEN>`
WHERE <YOUR_ACCESS_TOKEN>
is the value of the Access Token special to your Raspberry Pi device.
Upon success you'll get output similar to the following:
digest: sha265:e45990024b2461577d00f8de60935e5e9ee03fac2859b04e1d714c45cfd1df78id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-mInsight-v1name: minsight-v1repoTags:- minsight-v1:1.2.0size: 131929status: successfully deployed
Step 4: Create a file named, start.json
in the directory in which the mInsight .tar
file is stored. Insert the the text shown below into the start.json
file. This JSON file has configuration information that the mInsight container will use.
{"name": "minsight-v1","image": "minsight-v1","env": {"MCM.BASE_API_PATH": "/minsight-v1/v1","ownerCode": "1234"}}
Step 5: Deploy the mInsight container by executing the following command in a terminal window on the Raspberry Pi device.
mimik-edge-cli container deploy -p start.json --token=<YOUR_ACCESS_TOKEN>
WHERE: <YOUR_ACCESS_TOKEN>
is the value of the Access Token special to your Raspberry Pi device.
You'll get output similar to the following:
1: clientId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac02: created: 16344876964703: env:4: MCM.BASE_API_PATH: /bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/minsight-v1/v15: MCM.DB_ENCRYPTION_SUPPORT: false6: MCM.LINKLOCAL_REPLAY_NONCE_SUPPORT: false7: MCM.WEBSOCKET_SUPPORT: false8: ownerCode: 12349: id: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-minsight-v110: image: minsight-v111: imageId: bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0-minsight-v112: name: minsight-v113: state: started
Pay attention to the value for MCM.BASE_API_PATH
as shown in the listing above at Line 4
. (Your value for MCM.BASE_API_PATH
will be different.) You'll append the MCM.BASE_API_PATH
value to the URL http://localhost:8083
that you'll use to view the mInsight web page in your web browser.
You are now ready to bring up the mInsight utility in a browser on your Raspberry Pi device.
Viewing the mInsight UI
To view the mInsight web utility, open the web browser on the Raspberry Pi device and enter a URL similar to the one shown below
http://localhost:8083/bb6fba7d-6321-41c5-ac37-1a7a8a9a4ac0/minsight-v1/v1/gui
BE ADVISED: The URL you enter will follow the pattern:
http://localhost:8083/
<MCM.BASE_API_PATH>
/gui
The <MCM.BASE_API_PATH>
for your machine will be the one that you was created when you deployed the mInsight container as demonstrated earlier.
Figure 5 shown below illustrates a Raspberry Pi web browser displaying the mInsight web page. Notice the pattern of the URL in the address bar. The address conforms to the URL pattern described previously.
![]() |
---|
Figure 5: The mInsight web utility running on a Raspberry Pi device |
Using mInsight to discover nodes in a Network cluster
Once you have mInsight running in a web browser you can use it to get information relavant to the Raspberry Pi device on which mInsight is running. Also, you can get information about the various clusters that are supported by the edge Service Mesh.
(For an overview of the edge Service Mesh and cluster types, read the key concept, Understanding the edge Service Mesh.)
In this tutorial we're going to discover all the nodes, including your node, in the Network cluster. To do the discovery execute the following steps.
Step 1: Enter the ownerCode
that was defined above in the file, start.json
into the Owner Code text box as shown below in Figure 6.
![]() |
---|
Figure 6: mInsight reporting all the nodes on a Network cluster |
Step 2: In the Access Token text box of the mInsight web page, enter the Access Token you created and used with the mimik-edge-cli
tool to deploy the mInsight image and container. (An example is shown above in Figure 6.)
Step 3: Click the Send
button at the right of the mInsight web page. Clicking the button will display information about the nodes in the Network cluster.
Congratulations! You've installed, started and viewed the mInsight web utility.
Review
In this tutorial you learned how to get the mInsight web utility up and running in web browser running on a Raspberry Pi device.
- You got the
.tar
file that represents the mInsight microservice from the mimik repository on GitHub - You verified that a valid Access Token was associated with your running instance of the mim OE Runtime
- You created and configured the file
start.json
that's required to deploy the mInsight microservice - You deployed the edge Image for the mInsight microservice using the
mimik-edge-cli
tool - You deployed the edge Container for the mInsight microservice sing the
mimik-edge-cli
tool - You started up the mInsight web utility in a browser on the Raspberry Pi desktop
- You discovered information about of the Network cluster by using the mInsight web utility