Categories
developer documentation v0.0.27
mimik Developer Documentation
  • Tutorials
  • Installing edgeEngine and the mimik-edge-cli Tool on a Linux System or MacOS

Installing edgeEngine and the mimik-edge-cli Tool on a Linux System or MacOS

Objective

The objective of this tutorial is to demonstrate how to install the edgeEngine Runtime and the mimik-edge-cli tool on a computer running the Linux operating system, a Raspberry Pi computer running the Raspian operating system, or on a computer running macOS. The edgeEngine Runtime is the essential component that allows a computer to join an edgeEngine cluster and run an edge microservice.

The mimik-edge-cli tool is an application that you use at the command line to do work with edgeEngine Runtime.

Take the hands-on lesson for this tutorial

All the content presented in this tutorial is available in our hands-on interactive learning environment that teaches you how to install the edgeEngine runtime and edge CLI tool on a Linux machine. You can access the tutorial here or by clicking on the figure below.

Link to Instruqt


BE ADVISED: The installation process under MacOS is similar to the process described in the hands-on Linux tutorial mentioned above. However, installing the edgeEngine runtime on Mac requires developers to download a special version of the edgeEngine runtime for MacOS found here.


Intended Readers

The intended readers of this document are software developers and system administrators that will be working with microservices running under edgeEngine within a cluster of edge-enabled devices.

In order to get the full benefit of this tutorial, the intended readers should be familiar with the following:

  • a basic understanding of the fundamentals of the edgeEngine Runtime. (You can read the key concepts behind the edgeEngine Runtime here).
  • Working at the command line in a terminal window.
  • using the wget command
  • the basics of working with Node.js®
  • installing Node.js® packages using npm
  • working with git source control management

What You'll Be Doing

In this tutorial, you be shown how to install the edgeEngine Runtime on a computer running Linux. Also, you'll be shown how to install the edgeEngine Runtime on a Raspberry Pi computer running the Raspbian operating system and on a computer running macOS.

Once the edgeEngine Runtime is installed, you'll install the mimik-edge-cli tool and use it to execute a simple command against the edgeEngine Runtime.

Technical Prerequisites

This tutorial has the following prerequisites.

  • If you're planning to install the edgeEngine Runtime on Linux, you'll need access to a Linux computer that running Ubuntu 18.04 or Ubuntu 20.04.2. Also, that computer needs to have wget, Node.js®, npm and git installed.
  • If you're planning to install the edgeEngine Runtime on Raspberry Pi, you'll need access to a Linux Raspberry Pi computer running the Raspian operating system. That computer needs to have wget, Node.js®, npm and git installed.
  • If you're planning to install the edgeEngine Runtime on a computer running macOS, that computer needs to have wget, Node.js®, npm and git installed. (You can read instructions on how to install wget on a computer running macOS here.)

Installing the edgeEngine Runtime on Linux

In this set of instructions, you're going to install the edgeEngine Runtime on a Linux computer.

Step 1: Download the latest version of edgeEngine Runtime for Linux onto the machine in which you plan to install the edgeEngine Runtime. The release versions of the edgeEngine Runtime are listed here.

In this case we'll download the .tar file for edgeEngine Version: 3.0.0 for Linux/Ubuntu like so:

wget https://github.com/edgeEngine/edgeengine-linux/releases/download/v3.0.0/edge-linux-v3.0.0.tar

Step 2: Extract the contents of the .tar file in the target directory by executing the following command:

tar xvf edge-linux-v3.0.0.tar

In the example above, we're extracting the file tar xvf edge-linux-v3.0.0.tar which will put the contents of the tar file into the directory edge-v3.0.0

Step 3: Navigate the directory into which the contents of the .tar file was extracted. In this case:

cd edge-v3.0.0

Step 4: Start the edgeEngine Runtime by executing the script in the file, ./start.sh using the following command:

sh ./start.sh

BE ADVISED: The script, ./start.sh will ask you to provide the machine's administrator password in order to execute the tasks therein.

Executing the shell script will start the edgeEngine Runtime as a process which will send log information to the terminal window on an ongoing basis, similar to the following.

Executing the shell script will start the edgeEngine Runtime as a process which will send log information to the terminal window on an ongoing basis, similar to the following.

[2021-08-31 14:06:42.934] [linux] [info] nodeName: linuxlab
[2021-08-31 14:06:42.934] [System] [info] edge SDK starts ...
Database does not exists .//.edge/.cache/.cert-db, will now create
Opened database successfully
Table created successfully
[2021-08-31 14:06:43.395] [System] [info] [initial_supernode_discovery]: starts
[2021-08-31 14:06:45.425] [System] [info] [initial_supernode_discovery]: supernode found:
d3e44f2121fc4b371f05503dc478c31356d18b7849c5ed406df95e38
192.168.86.36
[2021-08-31 14:06:45.425] [System] [info] serve as supernode
[2021-08-31 14:06:45.426] [System] [info] [request__mts_token] starts
[2021-08-31 14:06:45.651] [System] [info] [api_client_request] correlationId=b2595c44-c8dc-f19d-6fe6-5739b5ccb428@0, method=POST, host=mst.mimik360.com, uri=/mST/v1/oauth/token
[2021-08-31 14:06:45.703] [System] [info] [api_client_response] correlationId=b2595c44-c8dc-f19d-6fe6-5739b5ccb428@0, method=POST, host=mst.mimik360.com, uri=/mST/v1/oauth/token, statusCode=201
[2021-08-31 14:06:45.704] [System] [info] [request__mts_token] ends
[2021-08-31 14:06:45.859] [System] [info] [api_client_request] correlationId=452548f6-bcc4-f664-b141-1c9efee2db34@0, method=POST, host=mds.mimik360.com, uri=/mDS/v1/nodes

The edgeEngine Runtime is now running.

Installing the edgeEngine Runtime on Raspberry Pi and the Raspian operating system

The steps for installing the edgeEngine Runtime on a Raspberry Pi computer running the Raspian operating system are similar to the steps you took when installing the edgeEngine Runtime under Linux as described above here. Only, in the case of installing under Raspian you will use the latest version of the .tar file specific to Raspian.

You'll find the latest release of the edgeEngine Runtime .tar file for Raspian on GitHub here.

Installing the edgeEngine Runtime on macOS

The steps for installing the edgeEngine Runtime on the macOS operating system are similar to the steps you took when installing the edgeEngine Runtime under Linux as described above here. Only, in the case of installing under macOS, you will use the latest version of the .tar file specific to macOS.

You'll find the latest release of the edgeEngine Runtime .tar file for macOS on GitHub here.

Installing the mimik-edge-cli tool

Step 1: Execute the following command in a terminal window of the computer in which you want to install the mimik-edge-cli tool.

npm install -g @mimik/mimik-edge-cli

You will get output in the terminal window similar to the following:

1: /usr/sbin/node-v14.17.5-linux-x64/bin/mimik-edge-cli -> /usr/sbin/node-v14.17.5-linux-x64/lib/node_modules/@mimik/mimik-edge-cli/bin/run
2: + @mimik/mimik-edge-cli@1.1.0
3: added 173 packages from 89 contributors in 10.339s

Step 2: Execute the following command to get the current version of mimik-edge-cli. Executing this command will verify that the program has been installed.

mimik-edge-cli -v

You will get output in the terminal window similar to the following:

@mimik/mimik-edge-cli/1.1.0 linux-x64 node-v14.17.5

Step 3: Execute the following command to test that the edgeEngine Runtime is accessible to mimik-edge-cli:

mimik-edge-cli account get-me

If all is well, you'll get output in the terminal window similar to the following:

{
"accountId": "",
"linkLocalIp": "10.132.0.113",
"name": "install-mimk-cli-vm",
"nodeId": "ca8d035ed9340b164617b72419e4d5fb484b263fd674968490c1ee7c",
"supernodeTypeName": "_mk-v15-4996e4c2442cc796f2c0ddb4e5e1627d._tcp",
"version": "v3.0.0"
}

Congratulations! You've learned how to install the edegEngine runtime on Linux, Raspian and MacOS. Also you've learned how to install the mimik-edge-cli took and verified that it works against the edgeEngine Runtime.

Was this article helpful?

© mimik technology, Inc. all rights reserved