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

RStudio-server installation script #58

Closed
ck37 opened this issue Jul 24, 2015 · 10 comments
Closed

RStudio-server installation script #58

ck37 opened this issue Jul 24, 2015 · 10 comments

Comments

@ck37
Copy link
Contributor

ck37 commented Jul 24, 2015

It would be nice if we provided a simple RStudio-server installation script. It's a very handy service that I think a lot of people may use, although maybe not worth auto-enabling by default.

The commands are essentially:

wget https://download2.rstudio.org/rstudio-server-0.99.467-amd64.deb
sudo gdebi rstudio-server-0.99.467-amd64.deb
sudo adduser rstudio

I will try to implement this sometime if someone doesn't beat me to it.

And in theory, we might be able to use instance meta-data (http://docs.aws.amazon.com/AWSEC2/latest/UserGuide/ec2-instance-metadata.html) so that people can add a tag for "rstudio-server" when creating the instance so that the script runs without requiring an ssh and manual execution. Not sure how to implement that yet though.

@cboettig
Copy link
Member

You can also take a look at the recipe we use in the rocker project: https://github.com/rocker-org/rocker/blob/master/rstudio/Dockerfile

Minor differences -- we query RStudio's data to look up which is the latest version, and we symlink the pandoc binaries installed by RStudio. We found having separate installations of pandoc in and outside of rstudio could lead to unexpected behavior due to version differences, etc when using rmarkdown functions in and out of RStudio. (also, I think adduser will prompt for info unless you include some other arguments? Note that you cannot just do useradd instead because RStudio server will fail to launch if it cannot find a home directory for the user. Of course using oski would probably sidestep these issues).

Also just thought I'd note that we had to get permission from RStudio to distribute their product packaged with other software in binary form (e.g. an image or container) to meet with their trademark rules. They were very nice and accommodating about this and maybe that's already been taken care of for BCE.

@paciorek
Copy link
Contributor

Chris, if you do create the script, please link to it from
http://bce.berkeley.edu/downloads.html, where there are some other add-on
scripts to add functionality to BCE.

On Fri, Jul 24, 2015 at 10:42 AM, Carl Boettiger notifications@github.com
wrote:

You can also take a look at the recipe we use in the rocker project:
https://github.com/rocker-org/rocker/blob/master/rstudio/Dockerfile

Minor differences -- we query RStudio's data to look up which is the
latest version, and we symlink the pandoc binaries installed by RStudio. We
found having separate installations of pandoc in and outside of rstudio
could lead to unexpected behavior due to version differences, etc when
using rmarkdown functions in and out of RStudio. (also, I think adduser
will prompt for info unless you include some other arguments? Note that you
cannot just do useradd instead because RStudio server will fail to launch
if it cannot find a home directory for the user. Of course using oski
would probably sidestep these issues).

Also just thought I'd note that we had to get permission from RStudio to
distribute their product packaged with other software in binary form (e.g.
an image or container) to meet with their trademark rules. They were very
nice and accommodating about this and maybe that's already been taken care
of for BCE.


Reply to this email directly or view it on GitHub
#58 (comment).

@aculich aculich added this to the fall-2015 must haves milestone Sep 21, 2015
@aculich aculich self-assigned this Oct 2, 2015
@aculich
Copy link
Contributor

aculich commented Oct 2, 2015

@aculich will handle the non-technical issues
@ryanlovett will handle the technical issues

@cboettig
Copy link
Member

Just tested this on the Fall-2015 release and it is working rather nicely!

Perhaps you would consider adding /usr/lib/rstudio-server/bin/: into the PATH so it can be launched with just rserver?

@ryanlovett
Copy link
Contributor

Technical issue fixed by 4546ff8.

Ryan

On Tue, Oct 13, 2015 at 1:44 PM, Carl Boettiger notifications@github.com
wrote:

Just tested this on the Fall-2015 release and it is working rather nicely!

Perhaps you would consider adding /usr/lib/rstudio-server/bin/: into the
PATH so it can be launched with just rserver?


Reply to this email directly or view it on GitHub
#58 (comment).

@paciorek
Copy link
Contributor

I'm trying this out now using fall-2015 and having an issue with having the
rstudio-server processes launch. I think there should be an 'rserver'
process running but it's not.

Any ideas?

ubuntu@ip-172-31-24-188:~$ sudo rstudio-server status
● rstudio-server.service - RStudio Server
Loaded: loaded (/etc/systemd/system/rstudio-server.service; enabled;
vendor preset: enabled)
Active: active (running) since Thu 2016-04-14 21:50:51 UTC; 11s ago
Process: 3066 ExecStop=/usr/bin/killall -TERM rserver (code=exited,
status=0/SUCCESS)
Process: 3081 ExecStart=/usr/lib/rstudio-server/bin/rserver (code=exited,
status=0/SUCCESS)
Main PID: 3082 (rserver)
CGroup: /system.slice/rstudio-server.service
└─3082 /usr/lib/rstudio-server/bin/rserver

Apr 14 21:50:51 ip-172-31-24-188 systemd[1]: Starting RStudio Server...
Apr 14 21:50:51 ip-172-31-24-188 systemd[1]: Started RStudio Server.
ubuntu@ip-172-31-24-188:$ sudo rstudio-server verify-installation
ubuntu@ip-172-31-24-188:
$ ps aux | grep rstudio
rstudio+ 3158 0.4 0.6 192452 6884 ? Ssl 21:51 0:00
/usr/lib/rstudio-server/bin/rserver
ubuntu 3180 0.0 0.2 8212 2108 pts/8 S+ 21:51 0:00 grep
--color=auto rstudio
ubuntu@ip-172-31-24-188:~$ sudo rstudio-server stop
rsession: no process found

On Wed, Oct 14, 2015 at 1:28 PM, Ryan Lovett notifications@github.com
wrote:

Technical issue fixed by 4546ff8.

Ryan

On Tue, Oct 13, 2015 at 1:44 PM, Carl Boettiger notifications@github.com
wrote:

Just tested this on the Fall-2015 release and it is working rather
nicely!

Perhaps you would consider adding /usr/lib/rstudio-server/bin/: into the
PATH so it can be launched with just rserver?


Reply to this email directly or view it on GitHub
#58 (comment).


Reply to this email directly or view it on GitHub
#58 (comment).

@cboettig
Copy link
Member

@paciorek What you show looks good to me, though I haven't tested the BCE script recently. I believe the reason you're seeing rsession: no process found is because you haven't yet logged into the RStudio instance in the browser. (e.g. I get matching output to what you show above if I just use launch the rocker/rstudio docker image and exec into it. Once I log in through the browser, rstudio-server stop restarts the rsession instead of erroring with no process found

@paciorek
Copy link
Contributor

Hmm, well, when I try to log on via the browser, the browser window
immediately hangs and gives nothing back.

Also, I hadn't realized it until just now but it looks like rstudio-server
is already installed in BCE-2015-fall. When I start a brand new instance
and do not try to install the rstudio-server .deb and then check on the
rstudio-server process status, things are as I previously described.

On Thu, Apr 14, 2016 at 3:07 PM, Carl Boettiger notifications@github.com
wrote:

@paciorek https://github.com/paciorek What you show looks good to me,
though I haven't tested the BCE script recently. I believe the reason
you're seeing rsession: no process found is because you haven't yet
logged into the RStudio instance in the browser. (e.g. I get matching
output to what you show above if I just use launch the rocker/rstudio
docker image and exec into it. Once I log in through the browser, rstudio-server
stop restarts the rsession instead of erroring with no process found


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#58 (comment)

@paciorek
Copy link
Contributor

Never mind, I think it's just that I forgot to tell the instance to open
the port.

On Thu, Apr 14, 2016 at 3:30 PM, Chris Paciorek paciorek@stat.berkeley.edu
wrote:

Hmm, well, when I try to log on via the browser, the browser window
immediately hangs and gives nothing back.

Also, I hadn't realized it until just now but it looks like rstudio-server
is already installed in BCE-2015-fall. When I start a brand new instance
and do not try to install the rstudio-server .deb and then check on the
rstudio-server process status, things are as I previously described.

On Thu, Apr 14, 2016 at 3:07 PM, Carl Boettiger notifications@github.com
wrote:

@paciorek https://github.com/paciorek What you show looks good to me,
though I haven't tested the BCE script recently. I believe the reason
you're seeing rsession: no process found is because you haven't yet
logged into the RStudio instance in the browser. (e.g. I get matching
output to what you show above if I just use launch the rocker/rstudio
docker image and exec into it. Once I log in through the browser, rstudio-server
stop restarts the rsession instead of erroring with no process found


You are receiving this because you were mentioned.
Reply to this email directly or view it on GitHub
#58 (comment)

@paciorek
Copy link
Contributor

I believe we now provide rstudio-server.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

5 participants