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
  hosts: [ 'debops_service_rstudio_server' ]
  become: True

  environment: '{{ inventory__environment | d({})
                   | combine(inventory__group_environment | d({}))
                   | combine(inventory__host_environment  | d({})) }}'

  roles:

    - role: debops.etc_services
      tags: [ 'role::etc_services', 'skip::etc_services' ]
      etc_services__dependent_list:
        - '{{ rstudio_server__etc_services__dependent_list }}'

    - role: debops.apt_preferences
      tags: [ 'role::apt_preferences', 'skip::apt_preferences' ]
      apt_preferences__dependent_list:
        - '{{ nginx__apt_preferences__dependent_list }}'
        - '{{ cran__apt_preferences__dependent_list }}'
        - '{{ java__apt_preferences__dependent_list
              if cran__java_integration|bool else [] }}'

    - role: debops.ferm
      tags: [ 'role::ferm', 'skip::ferm' ]
      ferm__dependent_rules:
        - '{{ nginx__ferm__dependent_rules }}'

    - role: debops.python
      tags: [ 'role::python', 'skip::python' ]
      python__dependent_packages3:
        - '{{ nginx__python__dependent_packages3 }}'
      python__dependent_packages2:
        - '{{ nginx__python__dependent_packages2 }}'

    - role: debops.nginx
      tags: [ 'role::nginx', 'skip::nginx' ]
      nginx__dependent_servers:
        - '{{ rstudio_server__nginx__dependent_servers }}'

    - role: debops.java
      tags: [ 'role::java', 'skip::java' ]
      java__install_jdk: True
      when: cran__java_integration|bool

    - role: debops.cran
      tags: [ 'role::cran', 'skip::cran' ]
      cran__dependent_packages:
        - '{{ rstudio_server__cran__dependent_packages }}'

    - role: debops.rstudio_server
      tags: [ 'role::rstudio_server', 'skip::rstudio_server' ]