-
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
Support HTTPS connection to Jupyter notebook #144
Conversation
Basic aiidalab container comes with HTTP, but users might want to add HTTPS. Here we just modify the code that tries to connect to Jupyter Notebook to determine whether it is ready.
Codecov Report
@@ Coverage Diff @@
## main #144 +/- ##
==========================================
- Coverage 87.03% 86.27% -0.76%
==========================================
Files 9 9
Lines 879 889 +10
==========================================
+ Hits 765 767 +2
- Misses 114 122 +8
Flags with carried forward coverage won't be shown. Click here to find out more.
Continue to review full report at Codecov.
|
The aiidalab-launch tool is designed for local invocation not necessarily for serving the service via a proxy over the wider network. I must admit that I am having a bit of a hard time following the use case, maybe you can elaborate a little bit? Either way, I have no problem with accepting a slight patch to the tool if it unblocks the effort as long as it does not increase the complexity disproportionally. Is this PR ready for review or comment or are you still experimenting? In the latter case I'd suggest to change it into draft stage, otherwise, please request my review and I will have a closer look at the implementation. |
@csadorf this is ready for review. Well, having https in local environment is good for testing it out, and also when using Besided local development, I have another server where I am essentially serving Aiidalab application within our VPN for members of our group. Here again having HTTPS is very much desirable. Also I am not yet ready to dive into full-blown production deployment so using |
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.
It looks this PR introduces a few unrelated changes to the logging behavior and verbosity. Would you mind removing those or alternatively justify why they should be part of this change set? Thank you!
Yes, sorry about that. I added justification in comments but am happy to submit those in separate PR. However, there is no "functional" change to logging behaviour, I just changed a logging level of a couple of statement to make the '-vv' level more useful. |
Ok, fair enough. Feel free to leave the adjustments in the PR. |
You wouldn't need to patch a running container, we could adjust it before the start. But I agree, this is esoteric enough that the effort is likely not justified. If you come up with a good solution to test it, I'd of course welcome it.
I'd suggest to simply return it and then toggle an attribute on the |
I didn't know how to return from an async function, but it was quite easy in the end. 😄 We now print the correct protocol both at the and of the start command and also in the output of the status command. 🎉 |
@danielhollas Thanks for the contribution! I just released this feature in https://github.com/aiidalab/aiidalab-launch/releases/tag/v2022.1015 . |
Thanks so much @csadorf ! : 💖 |
Basic aiidalab container comes with HTTP, but users might want to add HTTPS.
Here we just modify the code that tries to connect to Jupyter Notebook to determine whether it is ready.
I am currently playing with HTTPS for local development in our Docker image built on top of AiiDAlab-docker-stack, see ispg-group/aiidalab-ispg-docker-stack#6 if that is of interest.
TODO:
jupyter-notebook
in/opt/start-notebook.sh
, see the PR linked above.@staticmethod
so I did not not how to cleanly pass info from it without larger refactor.