1
0
mirror of https://github.com/mainflux/mainflux.git synced 2025-04-28 13:48:49 +08:00

55 lines
1.7 KiB
YAML
Raw Normal View History

MF-780 - Use Normalizer as a lib (#915) * Use Normalizer as a lib To normalize messages on the consumer side, Normalizer is moved to the internal pkgs. Writers being message consumers are modified to do message normalization instead of subscribing to normalized messages subject. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Fix logging middleware for readers and writers Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove normalizer interface Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Use Normalizer in writers As we agreed on #919, we'll use normalizer as an interface and provide the default SenML implementation. Because of that, Normalizer is removed from `internal` and we'll use the project structure proposed in the aforementioned issue. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Fix tests Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove unused batch settings from influxDB reader Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update docs Move Normalizer service to `addons`. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Rename channels input topic Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update Noramlizer docs Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove commented code Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update readers logging Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update addons docker-compose files Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update topcis explanations Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-10-31 14:04:47 +01:00
# Copyright (c) Mainflux
# SPDX-License-Identifier: Apache-2.0
# This docker-compose file contains optional MongoDB and MongoDB-writer services
# for Mainflux platform. Since these are optional, this file is dependent of docker-compose file
MF-780 - Use Normalizer as a lib (#915) * Use Normalizer as a lib To normalize messages on the consumer side, Normalizer is moved to the internal pkgs. Writers being message consumers are modified to do message normalization instead of subscribing to normalized messages subject. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Fix logging middleware for readers and writers Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove normalizer interface Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Use Normalizer in writers As we agreed on #919, we'll use normalizer as an interface and provide the default SenML implementation. Because of that, Normalizer is removed from `internal` and we'll use the project structure proposed in the aforementioned issue. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Fix tests Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove unused batch settings from influxDB reader Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update docs Move Normalizer service to `addons`. Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Rename channels input topic Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update Noramlizer docs Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Remove commented code Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update readers logging Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update addons docker-compose files Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com> * Update topcis explanations Signed-off-by: Dušan Borovčanin <dusan.borovcanin@mainflux.com>
2019-10-31 14:04:47 +01:00
# from <project_root>/docker. In order to run these services, execute command:
# docker-compose -f docker/docker-compose.yml -f docker/addons/mongodb-writer/docker-compose.yml up
# from project root. MongoDB default port (27017) is exposed, so you can use various tools for database
# inspection and data visualization.
version: "3.7"
networks:
docker_mainflux-base-net:
external: true
volumes:
mainflux-mongodb-db-volume:
mainflux-mongodb-configdb-volume:
services:
mongodb:
image: mongo:3.6-jessie
container_name: mainflux-mongodb
restart: on-failure
environment:
MONGO_INITDB_DATABASE: ${MF_MONGO_WRITER_DB_NAME}
ports:
- ${MF_MONGO_WRITER_DB_PORT}:${MF_MONGO_WRITER_DB_PORT}
networks:
- docker_mainflux-base-net
volumes:
- mainflux-mongodb-db-volume:/data/db
- mainflux-mongodb-configdb-volume:/data/configdb
mongodb-writer:
image: mainflux/mongodb-writer:latest
container_name: mainflux-mongodb-writer
depends_on:
- mongodb
restart: on-failure
environment:
MF_MONGO_WRITER_LOG_LEVEL: ${MF_MONGO_WRITER_LOG_LEVEL}
MF_NATS_URL: ${MF_NATS_URL}
MF_MONGO_WRITER_PORT: ${MF_MONGO_WRITER_PORT}
MF_MONGO_WRITER_DB_NAME: ${MF_MONGO_WRITER_DB_NAME}
MF_MONGO_WRITER_DB_HOST: mongodb
MF_MONGO_WRITER_DB_PORT: ${MF_MONGO_WRITER_DB_PORT}
ports:
- ${MF_MONGO_WRITER_PORT}:${MF_MONGO_WRITER_PORT}
networks:
- docker_mainflux-base-net
volumes:
NOISSUE - Adding subtopics filtering in writer services (#1072) * Add feature of filtering by subtopics in writer Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Fix mistake Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Refactoring writer sevices Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Rename variables related to filter (channels & subtopics) Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Set default value of filtering when configuration file doesn't exist Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Add a blank line at the end of the file Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Refactor loading filters configuration (moving into writer package, merge both loading methods & returning error) Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Remove useless log Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Change type of variables (channels & subtopics) and simplify loading method Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Add logging error when loading filters Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Simplify return configuration in loading method Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Merge both filter files into one file Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Move loading subjects into writer package Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Add subscribe to selected subjects Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Edit README of writer services Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Keep only subscribe loop Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Use full NATS subjects Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> * Edit comment in subjects files Signed-off-by: Jonathan Dreyer <jonathan.dreyer@cleanenergie.ch> Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2020-03-30 18:24:27 +02:00
- ./subjects.toml:/config/subjects.toml