Skip to content

Neoklosch/Motey

Repository files navigation

Motey

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

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

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.

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.

# 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

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

Motey Architecture

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.

About

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

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published