-
Notifications
You must be signed in to change notification settings - Fork 11
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
Use docker-py module in place of compose file #25
Conversation
Hi @uosl @leoank , |
I have a few doubts -
|
|
Regarding error handling, you should check if you can get the exit code from running |
I created the issue #26. This means you won't need to validate that the dockerfiles exist since they'll be included with intermine_boot. @22PoojaGaur You are welcome to include it in this PR, or tackle it later, depending on what you prefer. |
I don't see any good places to put unit tests in the changes so far. If you write tests for obtaining the envvars, you'd basically be testing |
My first thought is do you wait for the |
ok. It can be the case. I think the command starts the container and returns control. I am not sure whether it keeps the process running in container. When I did separately I was in control of letting it run, maybe that's why it was possible. Let me read more about command and see if it's a possible issue. |
Firstly, I think it would be a good idea to pass When using For the other containers you'll be using
I found this stackoverflow answer, which make it seem the error message occurs when the string contains |
@22PoojaGaur Here's some things you should make sure is done in this PR after you merge master into your branch (to get the changes from #27):
Please let me know if anything is unclear! |
I have handled these points. |
Hi @uosl Thanks for the hint, The issue with sed was resolved. But after that the script seems to get stuck on creating postgres database I dug a little deeper, After that, I went ahead to look the container status and details which shows this error. (This occurs on both master branch and issue branch so I think this might not be a problem though) Do you have an idea what might be causing that. |
Alright, so I believe the When using docker-compose, I'm guessing it binds the I think this happens because the containers aren't connected with each other, and we need to use the docker network API. I hope this made sense; please let me know (here or on chat) if you're having trouble figuring out the documentation! |
Hi @uosl I looked into it and found out that compose file makes a network with name docker-intermine-gradle_default. So, I created a docker network with name But it does not solve the issue. after some searching it appears the linking in docker-py does not work as expected. This issue details it https://stackoverflow.com/questions/37144357/link-containers-with-the-docker-python-api I will try the solution suggested there if that solves the problem and let you know in case problem is not resolved. |
It may be worth to try passing |
ok, I can give it a try. I have set up the name as per compose file intermine_postgres, intermine_solr and so on. As far as I read, setting up aliases helps to refer them by alias name. |
Hi @uosl Finally everything is working! There are few minor things in my mind which I'll fix ->
|
Great to hear! 🎉
Have you tried passing Hopefully |
Refactored the code and added log statements for intermine builder. |
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 implementation looks great! 🚀
I added some comments, mostly small things we can clean up (I know 11 sounds like a lot, but I promise most of them are quick 😅).
@uosl handled all comments. |
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.
Thanks! Great job [=
This PR is for issue #2
Done -
Todo -