ThingMesh Broker

From Bright Things Wiki
Jump to: navigation, search

The ThingMesh Broker is a software module that provides a MQTT message broker service. It is essentially a dockerized version of Verne.MQ.

Docker containers are generally quite flexible and they can be run in a number of different ways. This document describes one possible approach.

Prerequisites

  • A working Docker server
  • A user account with access to that docker server

Install ThingMesh Broker

Since we have put a Docker image of the ThingMesh Broker on Docker Hub, installing ThingMesh Broker becomes a simple matter of pulling that image. That will look something like:

lth@ncpws04:~$ docker pull thingmesh/broker
Using default tag: latest
latest: Pulling from thingmesh/broker
d4e2b4997205: Pull complete 
584aa18ff67f: Pull complete 
a2d08a1962b1: Pull complete 
298f521f7cc7: Pull complete 
d83d3e72f6b9: Pull complete 
19a5a1d5c30d: Pull complete 
e25f2b8ad18a: Pull complete 
8fec26d01995: Pull complete 
89ec4506d62d: Pull complete 
1c08cc44da6b: Pull complete 
843e2bded498: Already exists 
8c00acfb0175: Already exists 
6c13b97bfeff: Already exists 
e42853cb54ba: Already exists 
ae000d416335: Already exists 
Digest: sha256:f63ec6266341747c5daec6625491f4373955c0511f26992907874a7cb711182c
Status: Downloaded newer image for thingmesh/broker:latest

Running ThingMesh Broker

After pulling the latest version of the ThingMesh Broker, the broker can be started with:

docker run --net=host -v ~/broker/etc:/etc/vernemq -v ~/broker/lib:/var/lib/vernemq --restart=always -tid thingmesh/broker

Vernemq is binding to an unbelievable number of ports, so rather than proxying all those ports, in this example I just bind to the hosts interface direct.