Skip to content
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

NOISSUE - Sync Env Veriables With Docker Deployment #1841

Merged
merged 11 commits into from
Jul 31, 2023

Conversation

rodneyosodo
Copy link
Member

@rodneyosodo rodneyosodo commented Jul 4, 2023

What does this do?

  1. Add service db env variable to be different from the default env variables. This had already been done for InfluxDB for example for timescale readers and writers the db env variable is envPrefixDB = "MF_TIMESCALE_"
  2. Fixed Cassandra httpserverconfig to be envPrefixHttp as the default and envPrefix as the alternative
  3. Removed SignRSABits and SignHoursValid from certs as they are not used
  4. Remove initialization of things auth cache in mqtt as it is not used
  5. Change things grpc config from MF_THINGS_AUTH_GRPC_ to MF_THINGS_GRPC_
  6. Changed Cassandra config not to start with prefix DB_ for example from DB_CLUSTER to CLUSTER same as Postgres
  7. Added env config for MF_(service)_HTTP_SERVER_CERT and MF_(service)_HTTP_SERVER_KEY as they had not been used

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

No issue

List any changes that modify/break current functionality

Ensure configs are passed on docker-compose file. There is no change to the functionality of the system

Have you included tests for your changes?

No

Did you document any new/modified functionality?

Yes

Notes

N/A

@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #1841 (610fce2) into master (57d47fe) will decrease coverage by 0.05%.
Report is 1 commits behind head on master.
The diff coverage is 100.00%.

❗ Current head 610fce2 differs from pull request most recent head 9908c67. Consider uploading reports for the commit 9908c67 to get more accurate results

@@            Coverage Diff             @@
##           master    #1841      +/-   ##
==========================================
- Coverage   67.34%   67.30%   -0.05%     
==========================================
  Files         119      118       -1     
  Lines        9411     9358      -53     
==========================================
- Hits         6338     6298      -40     
+ Misses       2402     2392      -10     
+ Partials      671      668       -3     
Files Changed Coverage Δ
pkg/sdk/go/certs.go 76.19% <ø> (ø)
pkg/sdk/go/groups.go 75.60% <ø> (ø)
pkg/sdk/go/users.go 76.37% <ø> (ø)
things/clients/service.go 73.82% <ø> (ø)
internal/env/parser.go 100.00% <100.00%> (+13.55%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@rodneyosodo rodneyosodo force-pushed the NOISSUE-env branch 3 times, most recently from 5a16b72 to 6437219 Compare July 10, 2023 12:26
@@ -106,7 +107,7 @@ func main() {
// Create new http server
httpServerConfig := server.Config{Port: defSvcHttpPort}

if err := env.Parse(&httpServerConfig, env.Options{Prefix: envPrefix, AltPrefix: envPrefixHttp}); err != nil {
if err := env.Parse(&httpServerConfig, env.Options{Prefix: envPrefixHttp, AltPrefix: envPrefix}); err != nil {
Copy link
Contributor

Choose a reason for hiding this comment

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

@rodneyosodo @dborovcanin We have planned to remove AltPrefix everywhere
Can we remove in this PR

Copy link
Collaborator

Choose a reason for hiding this comment

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

If we have all the prefixes set correctly now, we can remove it in this PR.

Comment on lines +156 to +157
MF_COAP_ADAPTER_SERVER_CERT=
MF_COAP_ADAPTER_SERVER_KEY=
Copy link
Contributor

@arvindh123 arvindh123 Jul 19, 2023

Choose a reason for hiding this comment

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

@rodneyosodo , Are these two variables needed ?
because you have added MF_COAP_ADAPTER_HTTP_SERVER_CERT

Copy link
Member Author

Choose a reason for hiding this comment

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

Yes. They are added already

Copy link
Contributor

Choose a reason for hiding this comment

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

@rodneyosodo , These two variables not used, Please double check again and remove them

Copy link
Member Author

Choose a reason for hiding this comment

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

I have implemented it to use TLS if they are provided

Copy link
Contributor

Choose a reason for hiding this comment

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

Okay, Got it

@rodneyosodo rodneyosodo force-pushed the NOISSUE-env branch 2 times, most recently from e8e6bdb to bd024de Compare July 24, 2023 19:36
internal/env/parser.go Outdated Show resolved Hide resolved
internal/env/parser.go Outdated Show resolved Hide resolved
@rodneyosodo rodneyosodo force-pushed the NOISSUE-env branch 4 times, most recently from d53bcb6 to 2997cb9 Compare July 28, 2023 13:00
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
@drasko
Copy link
Contributor

drasko commented Jul 28, 2023

@arvindh123 is this one OK for merge? Please review and test.

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.

LGTM

rodneyosodo and others added 2 commits July 31, 2023 14:35
Copy link
Contributor

@drasko drasko left a comment

Choose a reason for hiding this comment

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

LGTM

@drasko drasko merged commit 3e7bac4 into absmach:master Jul 31, 2023
1 check passed
rodneyosodo added a commit to rodneyosodo/magistrala that referenced this pull request Aug 3, 2023
* Initial Commit: Sync Env Veriables With Docker Deployment

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

* Sync Env Vars With Master

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

* Remove Altprefix

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

* Rename HttpPort to HTTPPort

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

* Fix envPrefixDB After Rebase

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

* Remove Server Parse

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

* Add Provision For TLS on CoAP

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

* Fix Exit After Defer

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

* Remove Unused Function

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

* Document Undocumentated Env Variables

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

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
WashingtonKK pushed a commit to WashingtonKK/magistrala that referenced this pull request Aug 4, 2023
* Initial Commit: Sync Env Veriables With Docker Deployment

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

* Sync Env Vars With Master

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

* Remove Altprefix

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

* Rename HttpPort to HTTPPort

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

* Fix envPrefixDB After Rebase

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

* Remove Server Parse

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

* Add Provision For TLS on CoAP

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

* Fix Exit After Defer

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

* Remove Unused Function

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

* Document Undocumentated Env Variables

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

---------

Signed-off-by: rodneyosodo <blackd0t@protonmail.com>
Co-authored-by: Drasko DRASKOVIC <drasko.draskovic@gmail.com>
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.

5 participants