Open ctb opened 6 years ago
You need to add https://github.com/jupyterhub/nbrsessionproxy to the things installed (and activated) in the user's environment.
It's a little bit more complicated, because of lack of network isolation. In binder, RStudio listens only on localhost, and jupyter listens on 0.0.0.0 & proxies back authenticated requests. Here, there's no network isolation, so everyone could talk to everyone's RStudio...
If RStudio supports listening on Unix sockets, this would work!
Apparently it can listen on Unix sockets, but it's a feature of RStudio Pro :( https://github.com/rstudio/rstudio/issues/1635
Two ways out of this:
owner
filter (or requivalent nftables packet metainformation filter) to block all local packets to the rstudio port, except packets from processes running as the same user. I don't like either option, since it adds complexity to the stack. I also love both options, since they let me play with linux networking in funky ways :D
The best way to do this however is to convince RStudio to support listening on unix sockets in the AGPL version.
Also /cc @ryanlovett, who did most of nbrsessionproxy.
The best way to do this however is to convince RStudio to support listening on unix sockets in the AGPL version.
Agreed.
One could run RStudio Server on the same machine The Littlest JupyterHub is running on, and then users could manually visit either RStudio Server directly or through their notebook server on /user-redirect/proxy/8787 (i.e. the RStudio Server port). In both cases they'd need to login.
I'm going to close this as out of scope for TLJH since it is difficult to do correctly. However, this is a really important use case, so if you have a specific class or something that would use this, we should talk about making another JupyterHub distribution targetted at that use case...
my understanding is that this basically requires docker. I'd be interested in a JupyterHub distribution that was docker based and could run on Jetstream, for this and other reasons. We wouldn't need Kubernetes, would we?
But, no hurry, of course!
@ctb yeah, docker is the easiest way to do this. https://github.com/jupyterhub/jupyterhub-deploy-docker exists and should work for this, but it needs a little bit more love & care I think.
I would also like to use TLJH to run R Studio for 2-6 classes/semester each under 50 students and a variety of skills training workshops throughout the year (for campus and non-campus participants).
I would use R studio via TLJH in the same way it is used in Data8. I provide an interact link to the Rmd file (that originates in a github repo), students click on the link work on their analysis code file in an interactive manner, knit the file to PDF and download. Then as they progress they can login and start a new Rmarkdown file on their own.
Around 2012-13 my campus setup a virtual computing environment for programs like Mathematica, but our wifi infrastructure sucked so noone used the VLC. IT shut it down and are not willing to discuss starting it back up again. I hope to use this as a demonstration of the increased need for a virtual computing server and get it back going.
A quick thought here - if RStudio is officially not supported by TLJH, I think we should have a note in the documentation somewhere saying this. A lot of people will probably want RStudio so I'd rather just be up front and tell them "this probably isn't for you if you need RStudio". What do you all think?
I agree with @choldgraf - while i would love to see a Rstudio version of what TLJH can do if this isn't the way then that's fine. Does this mean that the solutions being discussed after the workshop aren't going to pan out (at least in time for the fall semester?) I just found out that Rstudio server pro is free for teaching purposes. I got a license and everything.
hey all - just a note that I edited the top-level comment to reflect the current status of this issue. Folks were discussing a Docker-based approach, but I'll leave further conversation about that for a different project, since TLJH is explicitly not using Docker. Feel free to edit if there are better ways to word this
A quick thought here - if RStudio is officially not supported by TLJH, I think we should have a note in the documentation somewhere saying this. A lot of people will probably want RStudio so I'd rather just be up front and tell them "this probably isn't for you if you need RStudio". What do you all think?
I think this remains an actionable item.
@ctb +1, I agree. Let's close thist once the doc has been added.
Thanks for looking back at this issue, I fully agree now that we should keep it open, sorry for the noise!
It seems though there has been progress, that its actually possible with RStudio, because https://github.com/rstudio/rstudio/pull/14938 is merged.
Together with https://github.com/jupyterhub/jupyter-rsession-proxy/pull/151, this is probably doable in a tljh environment.
e.g. support RStudio inside of this JupyterHub a la https://github.com/binder-examples/r
inquiring minds would like to know ;)
Status update 1 (added by CH)
Currently it is not possible to simply use RStudio with TLJH because it requires a feature that is only available in the "paid" version of RStudio (listening on Unix sockets), see https://github.com/jupyterhub/the-littlest-jupyterhub/issues/18#issuecomment-402564721
Status update 2 (added by consideratio)
It seems to become possible thanks to: