pm

command module
v0.0.0-...-1665488 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 19, 2019 License: GPL-3.0 Imports: 3 Imported by: 0

README

Project Manager

Travis branch Codacy Badge Go Report Buffalo GoDoc

Introduction

PM is a project manager component of the I1820 platform. It builds things, projects, things to project relationship, and project's dockers. Each project consists of two dockers one of them provides a sandbox for user scripts that are in python and based on ElRunner and another runs redis as in-memory storage for user scripts. It builds these dockers in localhost and uses Linux sockets for communicating with docker host.

PMs can run on many hosts to provide load balancing. To distribute requests among them, you can use vulcand. this feature still in development phase so it would be better not to use it now 😂

This component provides API based on HTTP ReST so other components can utilize these APIs for creating and destroying things and projects.

PM requires only MongoDB to persist things and projects data.

Assets

An asset is a new concept that is added recently to PM. assets are sensors or actuators that are connected into things. Assets can send or receive data based on their kind. Assets are stored as a map between their name and their information in things structure.

Connectivities

Each connectivity represents a way for other platforms to integrate with I1820. Connectivities are stored as a map between their platform code name (ttn code name of The Things Network platform) and their information. Please note that each platform has its specific information.

Up and Running

To build this module from source do the following steps

  1. Make sure MongoDB and Vernemq are up and running.

  2. Check the configuration in .env file. (You can use .env.example as an example configuration). Please note that pm passes these configuration to project's dockers so they must work there too.

  3. Run 🏃

go build
./pm
  1. Create MongoDB indexes
buffalo task mongo

To use this module you can use its docker or build from source after that, you must do the following things to provide the foundation for project creation. You can use runme.sh to these works for you.

  1. Non-Root user access for docker
sudo usermod -aG docker $USER
  1. Create projects network
docker network create -d bridge --subnet 192.168.72.0/24 --gateway 192.168.72.1 i1820
  1. Pull required images
docker pull i1820/elrunner
docker pull redis:alpine

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL