-
Notifications
You must be signed in to change notification settings - Fork 3
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
docs: Managing microservices dependencies first draft #25
Conversation
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.
So far, good to me :-)
Signed-off-by: John Gomersall <thegoms@gmail.com>
Hi @raphael0202, @alexgarel , @stephanegigandet, @teolemon I've added a ports section which is something we discussed a while back. It would be good to go back to existing projects and adjust the port numbers to avoid clashes and add them to this list |
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
@john-gom there are services where we don't necessarily need other projects running to develop. This is the case for example for robotof, where we just need to get data for the mongoDB, same for search-a-licious you just need to import some ES data. But you might need it all to test integration. |
@alexgarel (typed with Neuralink™) |
Hi @alexgarel , yes there are different levels of dependency. If we have hard dependencies like mongodb and redis then maybe these should be in their own separate repos? Certainly something to discuss some more... |
Signed-off-by: John Gomersall <thegoms@gmail.com>
One issue that I noticed when testing the PoC in the I don't know if this works with all projects, but one option might be to require using |
Hi @hangy , there shouldn't be a need to run any scripts locally when dependencies are pulled in, I'll have to investigate what's going on if that is the case with openfoodfacts-auth |
Don't worry. Maybe I mixed something up or made a mistake. Will have another look tomorrow! |
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Hi all, I've had an idea regarding not loading dependencies into the parent folder. We could introduce a "DEPS_DIR" environment variable and if this is not set then dependencies will load into a "deps" directory of the current project, thus avoiding going to the parent of the current directory. If someone wants to develop on multiple projects simultaneously then they could set the DEPS_DIR to the parent of their working directories. Code might be something like this:
If there is recursion then the recursed project will still be cloned into the deps folder but it won't continue recursing because the "{PROJECT1}_RUNNING" variable will be set. It does make it a little bit more complicated, but at least people who are just working on one repo won't see side effects in the parent of their working folder and might avoid issues with online development environments like codepages. What do other think? cc @hangy @alexgarel @stephanegigandet @raphael0202 @teolemon |
Good idea @john-gom If someone wants more granularity, he can even use symlinks in the deps/ folder to reuse an existing directory. |
Signed-off-by: John Gomersall <thegoms@gmail.com>
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.
Great, thanks !
Just two small remarks.
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
Signed-off-by: John Gomersall <thegoms@gmail.com>
# Use override here to ensure this is not inherited from the environment | ||
override DOCKER_COMPOSE=COMPOSE_PROJECT_NAME=${PROJECT1_PROJECT_NAME} COMPOSE_FILE="${PROJECT1_COMPOSE_FILE}" docker compose |
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.
This will also affect ordinary commands, won't it ?
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.
If I understand it well, in off-server we have to define a OFF_SERVER_PROJECT_NAME ?
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.
Not yet. It is only a problem when you are working on a project that needs to be pulled in as a dependency as you don't want any environment variables from the depending (parent) project to overwrite your own.
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.
Cool !
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.
Do you have the source for the chart. Can you put it there, or a reference URL ?
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.
What
ADR for service dependencies
TBA: We should proably create a team for people who should review these and add that to the CONTRIBUTORS file