Skip to content

MG-67 - Update Magistrala compose with SuperMQ compose#76

Merged
dborovcanin merged 23 commits intomainfrom
mg67-subtree
Mar 19, 2025
Merged

MG-67 - Update Magistrala compose with SuperMQ compose#76
dborovcanin merged 23 commits intomainfrom
mg67-subtree

Conversation

@felixgateru
Copy link
Contributor

@felixgateru felixgateru commented Mar 3, 2025

What type of PR is this?

This is a refactor as it changes the Magistrala compose use the SuperMQ compose.

What does this do?

This pr:

  • Adds a SuperMQ package in Magistrala
  • Updates the Magistrala Compose to include the SuperMQ compose.
  • Removes redundant and repeated env variables.

Which issue(s) does this PR fix/relate to?

Have you included tests for your changes?

No, this is manually tested.

Did you document any new/modified feature?

No

Notes

@felixgateru felixgateru closed this Mar 4, 2025
@felixgateru felixgateru reopened this Mar 4, 2025
@felixgateru felixgateru marked this pull request as ready for review March 4, 2025 12:07
@dborovcanin
Copy link
Contributor

@felixgateru Please resolve conflicts.

Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please include only the Docker folder and the .env file as a subtree.

Additionally, provide documentation on how to add or update the subtree. For example, if the SuperMQ Docker folder is updated, outline the steps to synchronize those changes with the master branch

@arvindh123
Copy link
Contributor

arvindh123 commented Mar 6, 2025

Please include only the Docker folder and the .env file as a subtree.

Additionally, provide documentation on how to add or update the subtree. For example, if the SuperMQ Docker folder is updated, outline the steps to synchronize those changes with the master branch

We can make the subtree stick to specific tag or version of SMQ

If we need to change version to new version of SMQ, then we can send a PR with git subtree updating to newer version

@felixgateru felixgateru force-pushed the mg67-subtree branch 2 times, most recently from b5d28ca to ce5bb2d Compare March 11, 2025 08:51
Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

In magistrala dockers , except nginx and addons directory, I think rest of the directory can be removed. Please check and remove the directory if not needed

Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please remove docker/nginx/snippets , docker/ssl/authorization.js and docker/ssl/dhparam.pem from magistrala

Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need
SMQ_CERTS_
SMQ_VAULT_
SMQ_JOURNAL_
In magistrala ?

@felixgateru
Copy link
Contributor Author

Do we need SMQ_CERTS_ SMQ_VAULT_ SMQ_JOURNAL_ In magistrala ?

We need SMQ_JOURNAL_ and SMQ_CERTS but this is updated with this:
#75

I will remove the SMQ_VAULT ones

Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ENV is have mixed of both SMQ and MG, We need to come up with better way for ENVs.
Lets to this later.

Copy link
Contributor

@dborovcanin dborovcanin left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is rather dangerous, let's not mess up with someone else's repository. Instead, let's do something like this (I may have missed some steps):

  1. Shallow clone and use --sparse to download only Docker directory:
git clone --depth 1 --filter=blob:none --sparse https://github.com/absmach/supermq.git
cd supermq
git sparse-checkout set docker

Then, move this docker directory inside MG docker:

mv docker ../docker/supermq-docker
cd ..
rm -r supermq

Also, update Makefile to include SMQ overrides there.

Copy link
Contributor

@arvindh123 arvindh123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please fix CI

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

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
…into ./docker/supermq-docker

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Comment on lines +249 to +251
fetch_supermq:
@./scripts/supermq.sh

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Add this to CI, so it performs chek if there are changes in the SMQ compose is up to date.

Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
Signed-off-by: Felix Gateru <felix.gateru@gmail.com>
@dborovcanin dborovcanin merged commit be6d8de into main Mar 19, 2025
3 checks passed
@dborovcanin dborovcanin deleted the mg67-subtree branch March 19, 2025 11:37
@codecov
Copy link

codecov bot commented Mar 19, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 33.35%. Comparing base (8599fa6) to head (cc83595).
Report is 6 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main      #76      +/-   ##
==========================================
- Coverage   33.52%   33.35%   -0.17%     
==========================================
  Files          89       91       +2     
  Lines       13184    12527     -657     
==========================================
- Hits         4420     4179     -241     
+ Misses       8236     7927     -309     
+ Partials      528      421     -107     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Make Magistrala use SuperMQ Compose

3 participants