Motey is a fog node agent which is able to start virtual containers and can act autonomous.
Switch branches/tags
Nothing to show
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
docs
motey-docker-image
motey-rpi-docker-image
motey
performance_tests
resources/images
samples
scripts
tests
webclient
.dockerignore
.editorconfig
.gitignore
.travis.yml
AUTHORS.rst
CHANGELOG.rst
LICENSE
MANIFEST.in
README.rst
main.py
setup.py

README.rst

Motey

Build status of the master branch Build status of the development branch

What is Motey

Motey is a fog node agent which is able to start virtual containers and can act autonomous.

Installation

Dependecies

Motey is using python 3.5 or newer. All the necessary requirements are in motey-docker-image/requirements.txt. A separate MQTT server is optional but recommended.

Docker

The easiest way to use Motey is to run the docker container.

# pull the docker container.
$ docker pull neoklosch/motey

# run the container
$ docker run -ti -v /var/run/docker.sock:/var/run/docker.sock -p 5023:5023 -p 5024:5024 -p 5090:5090 neoklosch/motey

# to enter the container
$ docker exec -ti <container_name> bash

Motey need a MQTT broker to communicate with other nodes. Therefore a MQTT server has to started.

# pull the docker container.
$ docker pull toke/mosquitto

# run the container and load the config file from the scripts folder
$ docker run -p 1883:1883 -p 9001:9001 -v ./scripts/config:/mqtt/config:ro toke/mosquitto

The ip of the server has to be configured in the config.ini file of Motey.

Install manually Linux

# clone Motey repo
$ git clone https://github.com/Neoklosch/Motey.git

# enter Motey folder
$ cd Motey

# build application
$ python3 setup.py build

# install application
$ python3 setup.py install

Using Motey

By default Motey is executed as a daemon. It can be started, stopped and restarted via the cli tool.

# start the service
$ motey start

# stop the service
$ motey stop

# restart the service
$ motey restart

You also can start Motey in foreground.

# start the application
$ python3 /opt/motey/main.py

How does it works

Motey Architecture

Motey Architecture

Communication

Motey provide several endpoints to communicate with the system.

Capabilities Engine
You can communicate with the capabilities engine via ZeroMQ. In the default configuration port 5090 is exposed as a ZeroMQ subscriber. You can connect to them witho one ore more ZeroMQ publisher to add or remove capabilities.
REST API
A REST API is provided on port 5023. Endpoints are /v1/service to upload a YAML blueprint and get informations about the status of a service, /v1/capabilities to add capabilities, which is basically another possiblity to communicate with the capabilities engine and /v1/nodestatus to get the current node status.
MQTT
Motey will try to connect to a MQTT broker on startup. Default config is set to url 172.17.0.3 and port 1883. This can be configured by modifing the config.ini file.