cloudyr / googleComputeEngineR

An R interface to the Google Cloud Compute API, for launching virtual machines
https://cloudyr.github.io/googleComputeEngineR/
Other
152 stars 41 forks source link

Mount GCE VM filesytems to GCS buckets #109

Open MarkEdmondson1234 opened 6 years ago

MarkEdmondson1234 commented 6 years ago

Via this https://github.com/GoogleCloudPlatform/gcsfuse/

reliscu commented 4 years ago

how do i install fuse in the first place on an rstudio template instance?

MarkEdmondson1234 commented 4 years ago

I haven't tried it yet, sorry.

reliscu commented 4 years ago

is it not possible to mount volumes on an rstudio server then? sorry, i'm new to the cloud computing thing, and a bit confused.

i guess i'm trying to figure out, if i used this command:

vm <- gce_vm(name = "lgg-analysis",
             template = "rstudio",
             username = "USERNAME",
             password = "PW",
             predefined_type = "n1-standard-1"
             )

... what OS am i using, so i can know which command to use to install gcfuse?

MarkEdmondson1234 commented 4 years ago

It should be possible, but I've not looked at it so don't know the details yet.

MarkEdmondson1234 commented 2 years ago

This is what to do to help satisfy both keeping storage separate from compute, but also being newbie friendly enough for those who don't care about it, just want my stuff to be there when I turn the VM back on. Bumping this up to prioritise it.

MarkEdmondson1234 commented 2 years ago

Steps:

  1. add to the Rstudio image the gcsfuse binary (create a GCS bucket if necessary?)
  2. launch and mount the RStudio home folder to the bucket
  3. update startup scripts
MarkEdmondson1234 commented 2 years ago

Using https://github.com/GoogleCloudPlatform/gcsfuse/issues/400 to install it in the Dockerfile. Won't need privileged access I think as its only the file systems within Docker Rstudio users will need.

It looks like if you don't specify a bucket it will dynamically link all buckets in the project, which I think is fine - maybe add a check to create a bucket if necessary

MarkEdmondson1234 commented 2 years ago

The latest image now includes gcsfuse which should be able to be started up from within RStudio's shell. Will look at a startup script

gcr.io/gcer-public/persistent-rstudio:f5afe87 onwards