Support

Setting up RStudio Server Pro's Launcher feature with the Local plugin

Follow

Motivation

This article is meant to help R admins to get familiar with the RStudio Launcher by showing how to setup the most basic configuration.  

This walk-through may also be valuable for debugging, or for those who wish to progressively build a more complex environment. The article focuses on the minimum requirements in order to confirm that the Launcher service is working properly in their environment. 

Background

The Local plugin will start new R sessions within the same server.  Unlike its previous versions, RStudio Server Pro will connect to local sessions of R via the Launcher service, instead of starting the R process directly.

Assumptions

This article assumes the following:

  •  The R admin has already installed and configured the latest version of RStudio Server Pro (version 1.2.1787 or higher), and at least one version of R.  If that is not the case, please refer to the product's Admin Guide before starting. 
  • The RStudio Server Pro license that will be used for this exercise is authorized for use with the Launcher.  Evaluation licenses will be authorized by default.  Use the command sudo rstudio-server license-manager status to verify.  There should be a line in the output that says: Enable-Launcher: 1
  • This setup is being tested in a Dev or Test installation of RStudio Studio Pro.  The idea is that the R admin will expand, or even automate, the steps in this article to match to the requirements of their Production environment.

Configuration

The configuration entails updating two configuration files and then starting the services.

1. Add the following lines to the /etc/rstudio/rserver.conf file:

launcher-address=127.0.0.1
launcher-port=5559
launcher-sessions-enabled=1
launcher-default-cluster=Local

2. Replace content of /etc/rstudio/launcher.conf with the following:

[server]
address=127.0.0.1
port=5559
server-user=rstudio-server
authorization-enabled=1
thread-pool-size=4
enable-debug-logging=1
admin-group=rstudio-server
[cluster]
name=Local
type=Local
exe=/usr/lib/rstudio-server/bin/rstudio-local-launcher

3. Restart the RStudio Server Pro service

sudo rstudio-server restart

 4. Start the RStudio Launcher service

sudo rstudio-launcher start

Expected Results

Instead of immediately opening an R session, when clicking on New Session, the Launcher dialog box will show up.  Select Start Session.  

local-session.png

Further explanation

The name "Local"

The cluster name is derived from the name variable(s) in the launcher.conf file.  That becomes the reference for two settings:

  1. The reference name to be used in other configuration files, such as in the default cluster setting inside rserver.conf: launcher-default-cluster=Local
  2. Name in the dialog box drop down box

 

Comments