Commit Graph

552 Commits

Author SHA1 Message Date
Aleksandar Novaković 88b30626dd MF-174 - Add logger interface and go-kit logger implementation (#212)
* Add logger interface and go-kit logger implementation

Add wrapper logger interface and wrap go-kit logger in it. Add
tests for info, warn, error and log methods. Add log filtering by
level.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Refactor logger and replace go-kit logger with wrapper

Replace go-kit logger from services with logger wrapper. Refactor
code in logger wrapper. Remove unnecessary subpackage, methods and
log levels.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2018-04-04 10:15:23 +02:00
Drasko DRASKOVIC 301d855015
Add CA cert (#215)
Signed-off-by: drasko <drasko.draskovic@gmail.com>
2018-04-04 02:29:29 +02:00
Dušan Borovčanin 7a193829f4 MF-139 - Expose metrics from all services (#213)
* Expose metrics from normalizer service

Add service interface in order to expose method to be monitored.

Signed-off-by: Dušan Borovčanin <borovcanindusan1@gmail.com>

* Refactor normalizer

Add metrics to normalizer service without exporting its internals.

Signed-off-by: Dušan Borovčanin <borovcanindusan1@gmail.com>
2018-04-03 20:25:49 +02:00
Dejan Mijić 523716b090 Rename NATS subjects for HTTP & normalizer (#207)
* Change NATS subject name

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Change normalizer subscription name

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-03-22 23:59:15 +01:00
Dejan Mijić 36ca9015ff Handle wrong type unmarshalling (#206)
* Update the contributing guide

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Handle wrong type unmarshalling

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-03-22 23:53:43 +01:00
Drasko DRASKOVIC a6dfc26959 Simplify Makefile (#205)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-03-22 13:10:11 +01:00
Dušan Borovčanin 924f6f120a Fix blinker tests (#193)
* Fix blinker tests

Signed-off-by: Dušan Borovčanin <borovcanindusan1@gmail.com>

* Add protobuf generated files to .gitignore

Signed-off-by: Dušan Borovčanin <borovcanindusan1@gmail.com>
2018-03-20 09:14:54 +01:00
Drasko DRASKOVIC 2c1c94af9b
Fix #195 (#196)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-03-20 00:09:44 +01:00
Dejan Mijić f5fbd6f22a Add protobuf (#192)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-03-19 10:14:43 +01:00
Aleksandar Novaković 55bdc029c3 Add service startup message (#190)
* Add service startup message

Add startup message to manager, http, coap and normalizer services.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>

* Remove startup message from CoAP adapter

Remove startup message from CoAP adapter. Remove overhead startup
message variable.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2018-03-18 13:54:54 +01:00
Dejan Mijić e42d422410 Fix golint warnings (#189)
* Fix goling warnings

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Bump version to 0.1.2

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-03-16 14:06:12 +01:00
Nikola Marčetić bf5d1544b6 Fixed docker composition (#187)
Signed-off-by: nmarcetic <n.marcetic86@gmail.com>
2018-03-16 13:52:51 +01:00
Max Peng 8876acbfec Fix docker compose failing start issue (#185)
* Fix docker compose failing start issue

* Delete unused code

* Fix nginx config issue
2018-03-16 09:59:13 +01:00
anovakovic01 250505700b Fix normalizer output queue (#184)
Fix normalizer output queue by changing subject to normalized.
Version updated from 0.1.0 to 0.1.1.

Signed-off-by: Aleksandar Novakovic <anovakovic01@gmail.com>
2018-03-15 14:23:20 +01:00
Drasko DRASKOVIC 5cb169f7f8 Add Makefile and ARM support (#178)
* Add Makefile and ARM support

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Add Docker build

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-03-13 09:26:59 +01:00
Dejan Mijić ccd8965d6f Use PostgreSQL as primary persistence solution (#175)
* Use normalizer as stream source

Renamed 'writer' service to 'normalizer' and dropped Cassandra
facilities from it. Extracted the common dependencies to 'mainflux'
package for easier sharing. Fixed the API docs and unified environment
variables.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Use docker build arguments to specify build

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Remove cassandra libraries

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Update go-kit version to 0.6.0

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Fix manager configuration

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Refactor docker-compose

Merged individual compose files and dropped external links. Remove CoAP
container since it is not referenced from NginX config at the moment.
Update port mapping in compose and nginx.conf. Dropped bin scripts.
Updated service documentation.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Drop content-type check

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Implement users data access layer in PostgreSQL

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Bump version to 0.1.0

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Use go-kit logger everywhere (except CoAP)

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Improve factory methods naming

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Implement clients data access layer on PostgreSQL

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Make tests stateless

All tests are refactored to use map-based table-driven tests. No
cross-tests dependencies is present anymore.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Remove gitignore

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Fix nginx proxying

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Mark client-user FK explicit

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Update API documentation

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Update channel model

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Add channel PostgreSQL repository tests

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Implement PostgreSQL channels DAO

Replaced update queries with raw SQL. Explicitly defined M2M table due
to difficulties of ensuring the referential integrity through GORM.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Expose connection endpoints

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Fix swagger docs and remove DB logging

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Fix nested query remarks

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Add unique indices

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-03-11 18:06:01 +01:00
Drasko DRASKOVIC b23ecb64e5
Merge pull request #167 from mainflux/coap
Update CoAP README
2018-02-17 16:15:26 +01:00
Drasko DRASKOVIC 03b020ae87 Update CoAP README
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-02-17 16:14:28 +01:00
Drasko DRASKOVIC 255d1c03b1
Merge pull request #162 from chombium/mainflux-161
replaced glide with dep dependency manager
2018-02-14 22:23:58 +01:00
Jovan Kostovski 7fe8100d6b replaced glide with dep dependency manager
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-14 18:28:42 +01:00
Drasko DRASKOVIC 6d9c92596c
Merge pull request #158 from bblagojevic94/mainflux-157
Export normalize method from writer service inside cassandra package
2018-02-10 17:50:18 +01:00
Bojan Blagojevic 3ac88b05a8 Export normalize method from writer service inside cassandra package
Signed-off-by: Bojan Blagojevic <datiglavaradi@gmail.com>
2018-02-10 15:45:53 +01:00
Drasko DRASKOVIC f84958834e
Merge pull request #148 from chombium/mainflux-147
Various bin script fixes
2018-02-06 10:44:02 +01:00
Jovan Kostovski 7723b92ba7 added the CoAP server
Signed-off-by: Jovan Kostovski <chombium@gmail.com>

Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 02:14:22 +01:00
Jovan Kostovski 3072d054ee added back the coap service
Signed-off-by: Jovan Kostovski <chombium@gmail.com>

Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 02:13:22 +01:00
Jovan Kostovski b4a51ae0a2 reverted the removal of the coap service
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski f277074d42 added desc. of the Cassandra create keyspaces cmd
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski 2f1b999727 removed the cleaning
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski ce86fbbe90 added desc. how to create the Cassandra keyspaces
Signed-off-by: Jovan Kostovski <chombium@gmail.com>

In the README.md it is written that the install script will guide the user how to setup the infrastructure
for running Mainflux, but there was a missing description on which Cassandra keyspacess are needed and how to create them.
2018-02-06 01:48:38 +01:00
Jovan Kostovski 615ba9267d clean up before/after compile and installation
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski 10113bd354 fixed the link to the contribution guide
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski c691ee06f0 show help and exit if no argument is provided
Signed-off-by: Jovan Kostovski <chombium@gmail.com>

bugfix for the case where the script was started without an argument.
The help was printed, but the _mainflux_docker was called as well, which
was causing the following error:
./mainflux-docker.sh: line 163: $1: unbound variable
2018-02-06 01:48:38 +01:00
Jovan Kostovski 23a3a5f194 added a .gitignore file
Signed-off-by: Jovan Kostovski <chombium@gmail.com>

Added a .gitignore file with the build folder in it, so that
if someone bulds Mainflux localy the build folder does not end
up in the repo.
2018-02-06 01:48:38 +01:00
Jovan Kostovski 6f202a9f83 #105 removed the Coap service from the build
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Jovan Kostovski 74f890128d fixed a typo
Signed-off-by: Jovan Kostovski <chombium@gmail.com>
2018-02-06 01:48:38 +01:00
Nikola Marčetić 6099da59e6
Merge pull request #154 from mainflux/docker-clean
Add `clean` function to docker-compose script
2018-02-05 10:47:31 +01:00
Drasko DRASKOVIC 0255a4cd61 Add `clean` function to docker-compose script
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-02-05 02:33:51 +01:00
Drasko DRASKOVIC 411cbf575a
Merge pull request #146 from mainflux/issue-145
Fix 403 errors handling
2018-01-26 20:56:05 +01:00
Dejan Mijic 5d715aa984
Fix 403 errors handling
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-01-26 20:50:31 +01:00
Drasko DRASKOVIC 30f7dda491
Merge pull request #144 from kelvinji2009/master
fix external_link dependency for http adaptor service
2018-01-18 17:45:27 +01:00
kelvinji ff5d77722c fix external_link dependency for http adaptor service
Signed-off-by: kelvinji <kelvinji2009@gmail.com>
2018-01-14 18:40:20 +08:00
Dejan Mijic b6eac477b4
Fix code linting
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-01-13 18:25:58 +01:00
Dejan Mijić 7cc03be424
Close response body properly (#143) 2018-01-13 18:15:41 +01:00
Drasko DRASKOVIC 4f467dcdde Add HTTP auth check (#128)
* Add HTTP auth check

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Add HTTP auth via Manager Client

Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>

* Change the way manager client is injected

Instead of relying on modifying service structure, manager client is
injected through handler factory method, and store as a variable in that
module.

Signed-off-by: Dejan Mijic <dejan@mainflux.com>

* Update dockerignore

Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2018-01-07 14:42:38 +01:00
Drasko DRASKOVIC d413508b25 Fix #116: remove base values from C* tables (#140)
Signed-off-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
2018-01-06 22:36:44 +01:00
Drasko DRASKOVIC 8036c74207
Merge pull request #138 from mainflux/mainflux-137
Remove redundant endpoints from manager
2018-01-05 09:11:10 +01:00
Dejan Mijic 3b57ebf532
Fix manager client implementation
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-12-29 11:10:31 +01:00
Dejan Mijic 15e9745517
Fix middleware method signature
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-12-29 10:56:59 +01:00
Dejan Mijic f30c9725aa
Move contributing guide to .github folder
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-12-29 10:49:03 +01:00
Dejan Mijic 4c97094427
Update the API handlers
Signed-off-by: Dejan Mijic <dejan@mainflux.com>
2017-12-29 10:47:43 +01:00