DEBOPS.RSTUDIO_SERVER(5)

NAME
debops.rstudio_server - Manage RStudio Server using Ansible

SYNOPSIS

debops run service/rstudio_server [--limit group,host,...] [--diff] [--check] [--tags tag1,tag2,...] [--skip-tags tag1,tag2,...] [<ansible-playbook options>] ...

DESCRIPTION

RStudio <https://www.rstudio.com/> is an Integrated Development Environment for the R programming language.

This Ansible role can be used to deploy RStudio Server, which is RStudio implemented as a web application accessible in a browser.

GETTING STARTED

  Installation issues

The RStudio Server is not available through an APT repository, upstream releases a .deb package along with the sources. The role will check if the rstudio-server package is available through APT; otherwise the .deb package will be downloaded directly from the project's website and installed using dpkg. The package integrity is checked via SHA256 checksum. The package can also be provided via a local APT repository if desired.

  Example inventory

To configure a host for RStudio Server, it needs to be in the [debops_service_rstudio_server] Ansible group:

# Optional Java support in R environment
# See 'debops.cran' role for mode details
[debops_service_java]
hostname
[debops_service_rstudio_server]
hostname

  Example playbook

If you are using this role without DebOps, here's an example Ansible playbook that uses the debops.rstudio_server role:

---
- name: Manage RStudio Server service
  collections: [ 'debops.debops', 'debops.roles01',
                 'debops.roles02', 'debops.roles03' ]
  hosts: [ 'debops_service_rstudio_server' ]
  become: True
  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'
  roles:
    - role: keyring
      tags: [ 'role::keyring', 'skip::keyring',
              'role::cran', 'role::nginx', 'role::rstudio_server' ]
      keyring__dependent_apt_keys:
        - '{{ cran__keyring__dependent_apt_keys | d([]) }}'
        - '{{ nginx__keyring__dependent_apt_keys | d([]) }}'
      keyring__dependent_gpg_keys:
        - '{{ rstudio_server__keyring__dependent_gpg_keys | d([]) }}'
    - role: etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ rstudio_server__etc_services__dependent_list }}'
    - role: apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ nginx__apt_preferences__dependent_list }}'
        - '{{ cran__apt_preferences__dependent_list }}'
    - role: ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'
    - role: python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ nginx__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ nginx__python__dependent_packages2 }}'
    - role: nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_servers:
        - '{{ rstudio_server__nginx__dependent_servers }}'
    - role: java
      tags: [ 'role::java', 'skip::java' ]
      java__install_jdk: True
      when: cran__java_integration | bool
    - role: cran
      tags: [ 'role::cran', 'skip::cran' ]
      cran__dependent_packages:
        - '{{ rstudio_server__cran__dependent_packages }}'
    - role: rstudio_server
      tags: [ 'role::rstudio_server', 'skip::rstudio_server' ]

DEFAULT VARIABLE DETAILS

Some of debops.rstudio_server default variables have more extensive configuration than simple strings or lists, here you can find documentation and examples for them.

  rstudio_server__allow_users

The rstudio_server__*_allow_users variables define a list of UNIX user accounts that should be added to the system group defined by the rstudio_server__auth_group. Accounts in this group will be able to login to the RStudio Server web application. Only already existing UNIX accounts will be added to the group, role does not create them automatically.

Each list entry can be a string containing an account name, or a YAML dictionary with specific parameters:

name
    The name of the UNIX account to include in the auth group.

state
    Optional. If not specified or present, the account will be added to the auth group.

  Examples

Allow specific UNIX accounts access to RStudio Server:

rstudio_server__allow_users:
  - 'user1'
  - name: 'user2'

  rstudio_server__*_conf

These variables specify the contents of the RStudio Server configuration files, located in /etc/rstudio/ directory. Each variable is a list with YAML dictionaries. Each entry can be written in a simple form where YAML dictionary key is the option name, and the value is the option value. More complex form can be defined using the parameters:

name
    The name of the option to set.

value
    The value of the option to set. If it's empty, it will be removed from the configuration file.

state
    Optional. If not specified or present, the option will be added in the configuration file. If absent, the option won't be included in the configuration file.

  Examples

Define options in the rserver.conf configuration file:

rstudio_server__rserver_conf:
  - 'www-address': '127.0.0.1'
  - name: 'www-port'
    value: '8787'

AUTHOR
Maciej Delmanowski

COPYRIGHT
2014-2024, Maciej Delmanowski, Nick Janetakis, Robin Schneider and others