How to install MESG CLI/Engine(Ubuntu)
Introduction:
MESG is a framework for developers to build applications efficiently. It relies on two specific tools:
- The MESG SDK that connects services together
- The MESG Marketplace to bootstrap applications faster
MESG is centered around the concept of services made to be reusable within other applications and shared on a marketplace for others to use them. MESG Services have two responsibilities:
- Executing tasks that an application triggers
- Sending events to an application
Applications rely only on services managed by the MESG Engine, so developers can focus on applications’ business logic and nothing more.
Installation :
in this article, I will show how to install MESG CLI/Engine in the Ubuntu operation system. There are two methods are Automatic for CLI and advanced mode for Engine.
1-Automatic (CLI) :
MESG is using Docker so you need to make sure to have Docker installed on your machine.
- Download and install Docker CE.
sudo apt-get update
sudo apt-get install docker-ce
- Initialize Docker Swarm by running
docker swarm init
- In order to access to the Engine, you can use the MESG CLI and install it with
npm install -g mesg-cli
You can now run the MESG Engine with mesg-cli daemon:start
wait until its finish, so finally, MESG CLI has been installed with success.
2-MESG Engine only (advanced mode)
If you don’t want to use the CLI, you can start the Engine directly on Docker.
- Download and install Docker CE
- Initialize Docker Swarm by running
docker swarm init
- Run the following commands:
# Create local `.mesg` dir
mkdir -p $HOME/.mesg
# Start docker swarm
docker swarm init
# Download latest version
docker pull mesg/engine:latest
# Create the MESG network
docker network create engine -d overlay --label com.docker.stack.namespace=engine
# Start the MESG Engine
docker service create \
--network engine \
--mount source=/var/run/docker.sock,destination=/var/run/docker.sock,type=bind \
--mount source=$HOME/.mesg,destination=/root/.mesg,type=bind \
--publish 50052:50052 \
--label com.docker.stack.namespace=engine \
--name engine \
mesg/engine:latest
And it's done. you have successfully install MESG Engine.
Check the daemon logs by running: mesg-cli daemon:logs
For more help check :
Forum: https://forum.mesg.com/
Documentation: https://docs.mesg.com/guide/
Github: https://github.com/mesg-foundation