Shiny Server in a myDRE Workspace

Shiny Server in a myDRE Workspace

Version = 2023-02-02

This instruction is used to get Shiny Server up and running in a Workspace. For your actual workloads you might need other size VMs.  Also there is much more to be configured, but being able to get Shiny up and running is a good place to start. All the instructions below are in a TXT file at the end and can be downloaded/uploaded to the Workspace, it saves a bit of typing.
Please note, the Shiny Server is only available within the same Workspace the Shiny server is running.

With the default installation below, starting the Linux VM with shiny from the user portal is sufficient, you can then access it from another VM in the same workspace.

Setting things up

  1. Created a new WS
  2. Deployed 2 VMs
    1. Ubuntu 22 VM: Standard_B2ms (2 cores, 8Gb)
    2. Windows-Base 1.0.5: Standard_B2s (2 cores, 4 Gb)
  3. Domain whitelist via ticket request (https://support.mydre.org) the domains below
      for R
  1. r-project.org
  2. rstudio.com
  3. rstudio.org
  4. ac.at
  5. posit.co
      for Ubuntu updates/packages
  1. azure.archive.ubuntu.com
  2. packages.microsoft.com

Installing shiny

Using instructions for Ubuntu 18.04+ (https://posit.co/download/shiny-server/)
  1. Connect to Linux via Bastion SSH
    If Bastion is not available, RDP via the Windows VM

install shiny R package

  1. sudo su
  2. sudo apt-get update
  3. sudo apt-get upgrade
  4. sudo apt-get install r-base
  5. sudo su - -c "R -e \"install.packages('shiny', repos='https://cran.rstudio.com/')\""

install Shiny server

  1. sudo apt-get install gdebi-core
  2. wget https://download3.rstudio.org/ubuntu-18.04/x86_64/shiny-server-1.5.20.1002-amd64.deb
  3. sudo gdebi shiny-server-1.5.20.1002-amd64.deb

Running shiny

  1. sudo start shiny-server
  2. sudo stop shiny-server


Connect to shiny server

  1. In mydre.org user portal identify IP-address of Linux VM = <linux_IP>
  2. Connect to Windows VM
  3. cmd > proxy settings
  4. Add in "use the proxy server except ..." <linux_IP>
  5. Open browser: http:\\<linux_IP>:3838