Here we will walk you through how to create a Virtual Machine (VM) on a project with RStudio running.
Time to complete: About 5 minutes
Click the Start button to move to the next step.
First we will download the shell file to your cloud shell directory to
run the shiny application. These 2 commands will pull in the shell file
vmshiny.sh and run it (may take a minute or 2)
gsutil cp gs://streamline-startup-scripts/vmshiny.sh ./
source vmshiny.shIf this fails, you need to request access to
gs://streamline-startup-scripts.
The vmshiny.sh is running a docker pull command on a Docker image
that we created running shiny that is based on
https://github.com/rocker-org/rocker-versioned2. Then the script runs
docker with -p 3838:3838 which forwards the port 3838 to the Cloud
Shell.
This URL should open up in a new window with the shiny application.
Click the Web Preview Icon
and change
the port to 3838 since that’s what Shiny typically runs on, including
this docker container.
Then add /create_vm to the end of the URL to navigate to that
application if the initial page is simply the Shiny landing page.
Done!