New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: Add support to use TRANSPORTER
env var for monolith deployments
#29373
feat: Add support to use TRANSPORTER
env var for monolith deployments
#29373
Conversation
🦋 Changeset detectedLatest commit: f4e83c8 The changes in this PR will be included in the next version bump. This PR includes changesets to release 28 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Codecov Report
@@ Coverage Diff @@
## develop #29373 +/- ##
========================================
Coverage 46.66% 46.66%
========================================
Files 698 698
Lines 13071 13071
Branches 2226 2226
========================================
+ Hits 6099 6100 +1
- Misses 6652 6653 +1
+ Partials 320 318 -2
Flags with carried forward coverage won't be shown. Click here to find out more. |
apps/meteor/ee/tests/unit/apps/meteor/ee/server/local-services/instance/getTransporter.spec.ts
Show resolved
Hide resolved
To use that, you can use the `TRANSPORTER` env var adding "monolith+" to the transporter value. To use NATS for example, your env var should be: | ||
|
||
```bash | ||
export TRANSPORTER="monolith+nats://localhost:4222" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is there a real downside to just making it use transporter just like normal? This means if someone deploys this then wants to move to microservices they’ve got to now remove that instead of add microservices
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yeah I agree with Aaron
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the problem is the current TRANSPORTER
env var is used to turn micro services on.. that's why I came up with a different "protocol"..
Rocket.Chat/apps/meteor/server/lib/isRunningMs.ts
Lines 5 to 7 in ea4d8fd
export function isRunningMs(): boolean { | |
return !!process.env.TRANSPORTER?.match(/^(?:nats|TCP)/); | |
} |
the initial idea was to use a completely different env var.. I even used MONOLITH_TRANSPORTER
initially but then changed to current approach..
I'm open to change it though.. but if want to use same env var with same value we'd need a new way to trigger other micro services specific code.
this I believe will break at addOfflineNode btw .. nats transporter doesn't have an addOfflineNode method. nvm we shouldn't need instance_ip then anywayg |
i'll give it a try now |
5dd29af
to
390de59
Compare
…fferent-monolith-transporters
Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
MONOLITH_TRANSPORTER
env varTRANSPORTER
env var for monolith deployments
Co-authored-by: Debdut Chakraborty <debdut.chakraborty@rocket.chat>
…importer-messages-not-shown * 'develop' of github.com:RocketChat/Rocket.Chat: fix: Room history scroll position (#29335) fix: check for $addToSet to be not empty before passing update params (#29378) chore: update `badge-level-0` color (#29460) fix: Saving Business hour throws an alert (#29449) regression: emojiPicker position (#29408) chore: Update codeowners to add ownership of rest typings package to backend (#29437) fix: Removed agent access to already taken rooms (#28979) fix: `queuedForUser` endpoint not filtering by status (#29189) regression: Marketplace Selectors (#29443) chore: fix contextualbar size (#29441) chore: `ComposerBoxPopup` Items alignment (#29320) feat: add support for `MONOLITH_TRANSPORTER` env var (#29373) fix: Import progress page stuck at 0% (#29421) feat: access-marketplace permission (#29203) chore(ddp-client): freeze data emitted by the sdk (#29430) refactor: `Table` on Integrations Page (#29428) regression: Update `LoadingIndicator` colors (#29424) chore(meteor): Update mention style (#29426)
Proposed changes (including videos or screenshots)
Issue(s)
Steps to test or reproduce
Further comments