Giter Club home page Giter Club logo

devices-node's Introduction

FastyBird devices node

Build Status Code coverage PHP Licence Downloads total Latest stable PHPStan

What is FastyBird devices node?

Devices node is a core microservice for managing all connected devices, managing basic devices logic and exposing them for clients.

FastyBird devices node is an Apache2 licensed distributed microservice, developed in PHP with Nette framework.

Requirements

FastyBird devices node is tested against PHP 7.4 and ReactPHP http 0.8 event-driven, streaming plaintext HTTP server and RabbitMQ 3.7 message broker

Getting started

NOTE: If you don't want to install it manually, try docker image

The best way to install fastybird/devices-node is using Composer. If you don't have Composer yet, download it following the instructions. Then use command:

$ composer create-project --no-dev fastybird/devices-node path/to/install
$ cd path/to/install

Everything required will be then installed in the provided folder path/to/install

This microservice has several console command.

HTTP server
$ vendor/bin/fb-console fb:web-server:start

This command is to start build in web server which is listening for incoming http api request messages from clients and is listening for new data from exchange bus from other microservices.

Install with docker

Docker Image Version (latest by date) Docker Image Size (latest by date) Docker Cloud Build Status

Docker image: fastybird/devices-node

Use docker hub image

$ docker run -d -it --name devices fastybird/devices-node:latest

Generate local image

$ docker build --tag=devices-node .
$ docker run -d -it --name devices-node devices-node

Configuration

This microservice is preconfigured for default connections, but your infrastructure could be different.

Configuration could be made via environment variables:

Environment Variable Description
FB_APP_PARAMETER__EXCHANGE_HOST=127.0.0.1 RabbitMQ host address
FB_APP_PARAMETER__EXCHANGE_PORT=5672 RabbitMQ access port
FB_APP_PARAMETER__EXCHANGE_VHOST=/ RabbitMQ vhost
FB_APP_PARAMETER__EXCHANGE_USERNAME=guest Username
FB_APP_PARAMETER__EXCHANGE_PASSWORD=guest Password
FB_APP_PARAMETER__DATABASE_VERSION=5.7 MySQL server version
FB_APP_PARAMETER__DATABASE_HOST=127.0.0.1 MySQL host address
FB_APP_PARAMETER__DATABASE_PORT=3306 MySQL access port
FB_APP_PARAMETER__DATABASE_DBNAME=devices_node MySQL database name
FB_APP_PARAMETER__DATABASE_USERNAME=root Username
FB_APP_PARAMETER__DATABASE_PASSWORD= Password
FB_APP_PARAMETER__STORAGE_HOST=127.0.0.1 CouchDB host address
FB_APP_PARAMETER__STORAGE_PORT=1883 CouchDB access port
FB_APP_PARAMETER__STORAGE_USERNAME=null Username
FB_APP_PARAMETER__STORAGE_PASSWORD=null Password
FB_APP_PARAMETER__MQTT_HOST=127.0.0.1 VerneMQ host address
FB_APP_PARAMETER__MQTT_PORT=1883 VerneMQ access port
FB_APP_PARAMETER__MQTT_USERNAME=guest Username
FB_APP_PARAMETER__MQTT_PASSWORD=guest Password
FB_APP_PARAMETER__MQTT_CLIENTID=guest MQTT client ID
FB_APP_PARAMETER__SERVER_ADDRESS=0.0.0.0 HTTP server host address
FB_APP_PARAMETER__SERVER_PORT=8000 HTTP server access port
FB_APP_PARAMETER__SECURITY_SIGNATURE= Security token signature string

NOTE: In case you are not using docker image or you are not able to configure environment variables, you could edit configuration file ./config/default.neon

Initialization

This microservice is using database, and need some initial data to be inserted into it. This could be done via shell command:

$ vendor/bin/fb-console fb:initialize

This console command is interactive and will ask for all required information.

After this steps, microservice could be started with server command

Feedback

Use the issue tracker for bugs or mail or Tweet us for any idea that can improve the project.

Thank you for testing, reporting and contributing.

Changelog

For release info check release page

Maintainers


Adam Kadlec

Homepage https://www.fastybird.com and repository https://github.com/fastybird/devices-node.

devices-node's People

Contributors

akadlec avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.