148 Commits

Author SHA1 Message Date
Felix Gateru eb14615cf5 MG-344 - Update Provision Service (#386)
* feat: update provison service

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: remove duplicate env variables

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* ci: make fetch_supermq

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* docs(README.md): update README

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

---------

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2026-02-28 17:55:22 +01:00
dusan c9b3107ad9 NOISSUE - Update SMQ version
Signed-off-by: dusan <borovcanindusan1@gmail.com>
2025-12-31 11:04:52 +01:00
Arvindh f44903b63b NOISSUE - Add user verification env to Rules Engine (#312)
* add user verification env to RE

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add user verification env to Alarms, Reports

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
2025-09-16 10:51:35 +02:00
Dusan Borovcanin 3cd9774a91 NOISSUE - Fix typo
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-07-18 11:48:27 +02:00
Arvindh 148e2fbb7f NOISSUE - Remove Vault scripts and compose (#246)
* remove vault from MG

Signed-off-by: Arvindh <arvindh91@gmail.com>

* rename env in readme

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
2025-07-08 14:18:32 +02:00
Dusan Borovcanin c35bc42210 NOISSUE - Fix typos
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-06-06 14:05:18 +02:00
Felix Gateru 68e58fc499 NOISSUE - Fix volume path (#164)
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-05-20 18:44:46 +02:00
Arvindh c9a51947a3 NOISSUE - Update Timescale DB and queries (#147)
* updated timescaledb and queries

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add pgx connection pool

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add pgx config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add pgx config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* add pgx config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix message sdk and sql migration

Signed-off-by: Arvindh <arvindh91@gmail.com>

* updated pgx pool set config

Signed-off-by: Arvindh <arvindh91@gmail.com>

* clean up values

Signed-off-by: Arvindh <arvindh91@gmail.com>

* clean up values

Signed-off-by: Arvindh <arvindh91@gmail.com>

* change pgclient in test

Signed-off-by: Arvindh <arvindh91@gmail.com>

* remove comments

Signed-off-by: Arvindh <arvindh91@gmail.com>

* fix test

Signed-off-by: Arvindh <arvindh91@gmail.com>

---------

Signed-off-by: Arvindh <arvindh91@gmail.com>
2025-05-14 10:40:53 +02:00
Arvindh 53ef51326a NOISSUE - Override supermq-base-net with magistrala-base-net (#148)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2025-05-12 12:02:37 +02:00
Dušan Borovčanin 08d727bf6e NOISSUE - Update RE message handling (#116)
* Refactor RE

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Use Publisher only where possible

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Simplify message payload

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update Lua code and message preprocessing

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix JSON parsing

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update SMQ dependency

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove case that is never going to happen

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove SenML part

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Reorder functions

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Updarte RE setup AND Timescale writer

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Use NATS instead of brokers

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix pubsub

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix RE publishers

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update JS config description

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix configs and remove unused code

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix linter remarks

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

---------

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-04-15 20:12:27 +02:00
Ian Ngethe Muchiri edf835b73a MG-659 - Add message storage to Rules Engine (#112)
* add save senml function

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add multiple pubsubs

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove ununsed constant

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add domain id to message

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* use full words for prefixes

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update prefixes

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2025-04-11 16:25:41 +02:00
Nataly Musilah 478c9907db NOISSUE - Add Readers GRPC Endpoints (#87)
* add ui prefix

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* add grpc backend

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* revert email utility and ui

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* update env variables and docker-composes

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* update env variables

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* add middleware folder

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* fix linter

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* ui commented

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* resolve comments and conflicts

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* resolve comments pt2

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* remove token from request

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* resolve comments

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* revert makefile and docker changes

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* force open grpc conn

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* fix linter

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* refactor components

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* fix tests

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* fix query issue

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* update protoc

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* rename variables

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* remove unused envs

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* use senml and json types for the messages struct

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* remove repetitive message fields

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* update protoc version

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

* return ui to docker

Signed-off-by: Musilah <nataleigh.nk@gmail.com>

---------

Signed-off-by: Musilah <nataleigh.nk@gmail.com>
2025-04-09 11:34:14 +02:00
Ian Ngethe Muchiri 3a892108e1 MG-597- Add writers integrations (#104)
* add gopher-lua-libs library

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update postgres writer

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2025-04-04 10:41:49 +02:00
Dušan Borovčanin d6477a484f NOISSUE - Update YAML files (#100)
* Rename yml to yaml extensions

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update Docker project name

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update SMQ YAML files

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update Mockery

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update Mockery version

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove mocks before running Mockery

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update check order

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix tests

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

---------

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2025-04-01 10:41:26 +02:00
Felix Gateru be6d8deef7 MG-67 - Update Magistrala Compose with SuperMQ Compose (#76)
* chore: update compose with supermq override

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: remove duplicate env variables

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* ci(check-license.yaml): ignore rabbitmq files

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: add supermq docker file

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* feat: add update option to make file

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor(supermq-docker-compose.override.yml): fix errors in files

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: add amend commit to fetch and update commands

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: add supermq dependency update script

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: update SuperMQ dependency files

* fix: remove reverted changes to Makefile

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor(supermq.sh): remove git staging and commit from script

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: remove redundant docker config files

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: remove redundant files, update compose p[roject directory

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: update project dir path

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: update nginv env file variable, remove redundant nginx config files

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore: include journal and certs to mg compose

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: update script to use sparse checkout and move docker files into ./docker/supermq-docker

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: update docker compose file

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* feat(Makefile): add fetch_supermq to run recipe

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor(supermq.sh): clean up

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* chore(go.mod): remove toolchain definition

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* ci(build.yml): add check for supermq dependency

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* ci: move check to ci

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

---------

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-03-19 12:37:51 +01:00
Ian Ngethe Muchiri 9b18f5580a NOISSUE - Fix env variable naming (#77)
Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2025-03-03 16:29:25 +01:00
Dušan Borovčanin 9636f356fe NOISSUE - Add UI to the compose (#56)
* NOISSUE - Bump github.com/authzed/authzed-go from 1.2.1 to 1.3.0 (#55)

Bumps [github.com/authzed/authzed-go](https://github.com/authzed/authzed-go) from 1.2.1 to 1.3.0.
- [Release notes](https://github.com/authzed/authzed-go/releases)
- [Commits](https://github.com/authzed/authzed-go/compare/v1.2.1...v1.3.0)

---
updated-dependencies:
- dependency-name: github.com/authzed/authzed-go
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>

* Add RE to default compose

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix remarks

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update compose and move Journal to it

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2025-02-11 10:30:14 +01:00
Ian Ngethe Muchiri 89eaa8e09f NOISSUE - Fix readers env Prefix(#46)
* update timescale

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove omitempty to mess resp

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* remove domain_id

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* update tests

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2025-01-24 10:56:54 +01:00
Felix Gateru ec71a5edfd MG-28 - Align Bootstrap with SuperMQ (#31)
* refactor: aligh bootstrap with new supermq architecture

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* feat: add sdk and update api docs

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: rename env variables

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* style: add empty line to config files and bootstrap docker compose file

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: add supermq sdk to magistrala sdk

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* refactor: extend supermq sdk in magistrala sdk

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* reafctor: update responses

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

* ci: update api docs dir in swagger-ui deployment

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>

---------

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
2025-01-10 14:56:17 +01:00
Ian Ngethe Muchiri 3f0bb258c7 NOISSUE - Update Rules Service (#32)
* update re service

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* add status update for rules

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* revert docker compose changes

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2025-01-09 09:56:45 +01:00
Dušan Borovčanin 3bbb25bd64 NOISSUE - Remove SuperMQ duplicates (#23)
* Update docker-compose to use SuperMQ

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove duplicate services

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update Bootstrap

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update other services to use SMQ

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Switch config prefix to SMQ

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove leftovers

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove duplicate interface definitions

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove unused actions

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove unused API docs

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Resolve linter comments

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix provision

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

---------

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-12-31 11:04:17 +01:00
Dušan Borovčanin 57c3ecb175 MG-13 - Magistrala Rules engine (#16)
* Add initial Rules Engine model

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* WIP - Add API layer

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Add async consumer

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Use Named queries and single topics

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Update rules listing

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Enable consumers with no transformer

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Move RE to addons

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Fix HTTP server host

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove unused code

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

* Remove cache for the time being

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>

---------

Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-12-27 20:00:50 +01:00
Nataly Musilah 0019f71b46 MG-2426 - Replace generic Clients in Users service (#2436)
Signed-off-by: Musilah <nataleigh.nk@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-10-30 19:19:31 +01:00
Dušan Borovčanin eb881690c7 MG-2443 - Move Auth to the middleware (#2444)
Signed-off-by: 1998-felix <felix.gateru@gmail.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Felix Gateru <felix.gateru@gmail.com>
Co-authored-by: Arvindh <arvindh91@gmail.com>
Co-authored-by: Arvindh <30824765+arvindh123@users.noreply.github.com>
2024-10-17 16:24:53 +02:00
Steve Munene 61eca8a371 NOISSUE - Update certs (#2464)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
2024-10-14 22:45:12 +02:00
Steve Munene e5765c6a9b MG-2359 - Replace Vault with Absmach certs (#2425)
Signed-off-by: nyagamunene <stevenyaga2014@gmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
Co-authored-by: b1ackd0t <28790446+rodneyosodo@users.noreply.github.com>
Co-authored-by: Dušan Borovčanin <dusan.borovcanin@abstractmachines.fr>
2024-10-14 15:51:15 +02:00
JMboya 2eccae8097 MG-2380 - Pass env files to vault script (#2387)
Signed-off-by: JeffMboya <jangina.mboya@gmail.com>
2024-09-02 11:32:55 +02:00
Arvindh d23e005618 NOISSUE - Fix Journal database path in Docker composition (#2376)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-08-06 14:25:35 +02:00
Dušan Borovčanin 5412bddfcf MG-2187 - Simplify Magistrala core repository (#2338)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-07-15 17:38:48 +02:00
b1ackd0t 0794363a3c MG-1965 - Process Event Logs (#2057)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
2024-06-27 16:38:20 +02:00
Veddy 4ae799ec39 MF-2299 - Update influxdb2 volumes path (#2300)
Co-authored-by: Veddy <veddy@qq.com>
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-06-24 18:38:05 +02:00
b1ackd0t 19c1261e81 NOISSUE - Add property based testing to notifiers API (#2175)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2024-04-29 16:07:57 +02:00
Dušan Borovčanin 658003080e NOISSUE - Update Docker and Compose versions (#2159)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-04-10 12:02:36 +02:00
Arvindh 5d0cb70df8 NOIISUE - Update Vault setup scripts to support Vault CLI (#2091)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-02-22 10:09:50 +01:00
Arvindh ab4206cc93 NOISSUE - Vault operations with app role authentication (#2084)
Signed-off-by: Arvindh <arvindh91@gmail.com>
Signed-off-by: arvindh123 <arvindh91@gmail.com>
2024-02-20 15:59:55 +01:00
Arvindh 21c5813a96 NOISSUE - Fix provision configuration loading (#2078)
Signed-off-by: Arvindh <arvindh91@gmail.com>
2024-02-19 13:20:47 +01:00
Dušan Borovčanin 79ef28a9ce NOISSUE - Update dependencies (#2061)
Signed-off-by: Dusan Borovcanin <borovcanindusan1@gmail.com>
2024-01-23 13:09:07 +01:00
b1ackd0t 5590695e4b NOISSUE - Expose Timescale on 5433 (#208)
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-12-25 15:27:35 +01:00
b1ackd0t 0ecf5aa746 NOISSUE - Update mTLS support (#134)
Make sure MTLS support works after the new auth changes
2023-12-11 11:13:41 +01:00
b1ackd0t e0cd2ceb55 NOISSUE - Update Readers Documentation (#113)
* feat(readers): remove jaeger URL

Remove JAEGER URL and align documentation

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* docs: update description

Update the description of message readers in the `readers/README.md` file. This commit clarifies that message readers provide implementations of various `message readers` and consume normalized (in `SenML` format) Magistrala messages from data storage. Additionally, it highlights that message readers expose an HTTP API for message consumption. For more detailed information on the usage of `reader` and a comprehensive understanding of Magistrala, please refer to the [official documentation][doc].

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 13:01:31 +01:00
b1ackd0t 658fd373ba NOISSUE - Update Certs service configuration and docs (#112)
The commit modifies the configuration files and Docker Compose files related to the "certs" service. The changes include updating URLs, adjusting the log level, and modifying the SDK certs URL. This refactor ensures that the service operates with the correct settings and improves the overall functionality.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-12-04 12:26:43 +01:00
b1ackd0t 4f1b7ea614 NOISSUE - Update env vars for events store (#91)
- Rename env vars `MG_ES_STORE_TYPE` to `MG_ES_TYPE`
- Rename env var `MG_ES_STORE_URL` to `MG_ES_URL`
- User one env variables `MG_ES_URL` instead of every service having their own env variables
- Config default env var for `MG_ES_URL` at code level to be `nats://localhost:4222` instead of `redis://localhost:6379/0`

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-11-29 11:29:22 +01:00
b1ackd0t a0c40ba462 NOISSUE - Update Copyright Notice (#39)
* chore(license): update copyright notices

Add CI check for non go files to check that the files contain a license

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* fix(ci): log failed files

When the CI fails during check for license header, log the failed file to console so that someone can check on the actual file. Also simplify the grep check to make it more human readable and understandable

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-11-17 12:37:30 +01:00
b1ackd0t 44408395e6 NOISSUE - Fix renaming issues (#17)
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-11-02 14:48:13 +01:00
Dušan Borovčanin 7922ce80ba Fix Cassandra Writer setup (#23)
Signed-off-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>
Co-authored-by: dborovcanin <dusan.borovcanin@abstractmachines.fr>
2023-11-01 19:16:27 +01:00
Ian Ngethe Muchiri 0907074922 NOISSUE- Fix renaming of mainflux-server to magistrala-server (#15)
* fix renaming of mainflux-server

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

* generate certs

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>

---------

Signed-off-by: ianmuchyri <ianmuchiri8@gmail.com>
2023-11-01 13:03:17 +01:00
dusanb94 7066101996 Rename Mainflux to Magistrala
Signed-off-by: dusanb94 <dusan.borovcanin@mainflux.com>
2023-10-26 12:50:56 +02:00
b1ackd0t 8b185d205b MF - 1758 - Sync With Benchmark Testing (#1912)
* feat(docker): add trace ration and max conn

This adds a new environment variable `MF_JAEGER_TRACE_RATIO` to the `docker/.env` file. The variable is used to set the ratio of requests traced.

Additionally, this commit also adds a new environment variable `MF_POSTGRES_MAX_CONNECTIONS` for configuring the maximum number of connections for the Postgres database.

These changes are made to enhance the configuration and scalability of the core services.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

* Remove comment to trace ratio

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reduce postgres max connection to 100

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
2023-10-24 18:59:49 +02:00
b1ackd0t 43a263d7da NOISSUE - Introduce NATS Jetstream as Default ES (#1907)
* Refactor message broker implementation

This commit refactors the Nats message broker implementation to include pubsub options. These changes include:

- Adding `Option` func that takes in the URL and prefix
- Implement `WithStream` option which can create a different stream for nats stream
- Implement `WithExchange` option which can create a different exchaange for rabbitmq channel
- Implement `WithPrefix` option which allows to you change the publisher prefix

These changes improve the organization and readability of the codebase.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Use redis URL to configure username, password and db

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Make event store configurable on dev deployment

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix adds options to messaging `PubSub` interface

Adding options to PubSub interface allows the use of messaging
package to do es.

The changes in this commit ensure that the code handles errors
properly and provides more informative error messages when
encountering unexpected types.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add NATS event publisher implementation

This commit adds the implementation of the NATS event publisher.

The NATS event publisher is responsible for publishing events
to a NATS messaging system. It uses the `messaging`
package to interact with the messaging system.

The implementation includes the following features:

- Publishing events to NATS using the `Publish` method.
- Marshaling events to JSON before publishing.
- Setting the message subject and headers based on the event.
- Handling errors during publishing.

This implementation is built with the `!rabbitmq` build tag,
which means it will only be compiled if the `rabbitmq` build tag
is not present.

The NATS event publisher is part of the Mainflux events package
and provides support for the Mainflux NATS events source service functionality.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add RabbitMQ event publisher implementation

This commit adds the implementation of the RabbitMQ event publisher.

The RabbitMQ event publisher is responsible for publishing events
to a RabbitMQ messaging system. It uses the `messaging`
package to interact with the messaging system.

The implementation includes the following features:

- Publishing events to RabbitMQ using the `Publish` method.
- Marshaling events to JSON before publishing.
- Setting the message subject and headers based on the event.
- Handling errors during publishing.

This implementation is built with the `rabbitmq` build tag,
which means it will only be compiled if the `rabbitmq` build tag
is present.

The RabbitMQ event publisher is part of the Mainflux events package
and provides support for the Mainflux RabbitMQ events source service functionality.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add configurable implementation for events store

This commit adds a new file `brokers_*.go` which contains the implementation for the different event store. The file includes functions for creating a new publisher and subscriber using different es store.

This commit also includes an `init` function that logs a message indicating that the binary was built using the respective package as the events store.

The purpose of this commit is to add support for alternative events store.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix build flags

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Refactor Makefile and Semaphore configuration

The Makefile has been refactored to include the `MF_ES_STORE_TYPE` tag in the `go build` command. Additionally, the Semaphore configuration has been updated to include a new task for compiling with Redis as the broker type.

This commit addresses the need to compile the codebase with Redis as the event store type and includes the necessary changes in the Makefile and Semaphore configuration.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Reduced due to memory on testing

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix tests for es

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix grammar

Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix linting

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* feat(docker): update environment variables for message broker

The commit updates the environment variable `MF_ES_STORE_TYPE` in the `docker/.env` file. The variable is changed from `${MF_MQTT_BROKER_TYPE}` to `${MF_MESSAGE_BROKER_TYPE}` to accurately reflect the type of message broker being used. This change ensures that the correct message broker is configured for the Event Store.

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* feat: Update docker environment variables

- Removed the unused MF_ES_URL variable in the .env file
- Updated the MF_ES_STORE_TYPE and MF_ES_STORE_URL variables in the .env file to match the MF_MESSAGE_BROKER_TYPE and MF_NATS_URL variables respectively

Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Fix after rebase

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Add godocs for option parameters for brokers

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* pass by value exchange and prefix names

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* Rename option functions

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* move variables to constants

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

* fix: option example comment

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>

---------

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Sammy Kerata Oina <44265300+SammyOina@users.noreply.github.com>
2023-10-24 17:22:53 +02:00
b1ackd0t 059b954047 NOISSUE - Refactor Redis URI (#1898)
* Replace Nats with Nats Jestream For PubSub

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>

* Refactor Redis client connection

Use a single Redis URI to connect to Redis where the URI contains
host, port, database and possibly username and password.

This is to simplify environment variable configuration.

Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: Rodney Osodo <socials@rodneyosodo.com>
Signed-off-by: Rodney Osodo <28790446+rodneyosodo@users.noreply.github.com>
2023-10-23 17:25:57 +02:00