Closed valentinumbach closed 7 years ago
Thanks @valentinumbach , I updated the image_family only recently on dev so good to see what it has affected downstream.
You may be better off using gce_vm
as that is what gce_vm_container
wraps with some defaults, so you can choose whatever image you like, and then call the rocker/rstudio
image which I think uses Ubuntu. cron
should be installed within the Docker image so install ok for the templates in the package so I'll investigate if that isn't launching. (via the Dockerfiles
)
I did use gce_vm
but it only allows defining the image_family
, not image_project
(it will throw an error). since gce_vm_container
always defaults to cos-cloud
(previously google-containers
with gci
prefix I believe), it's impossible to use anything other but Container-Optimized OS images.
Hmm it should allow that, try calling even more directly via gce_vm_create()
- that allows image_family
and image_project
. Will investigate but gce_vm()
should also accept them.
Revisting this,
The container optimised images that gce_vm_container
calls must all come from the image family cos-cloud
as specified here. cron
or anything shouldn't be installed in the root of these containers, the intention is that cron
is installed within the containers running on them - these can be Ubuntu, Debian or whatever. The rocker/rstudio
docker image is based on Ubuntu.
The example was most likely failing as there was a missing cron service start
line in the Dockerfiles - sorry you got caught up with that.
If you want to specify your own image_project
or image_family
then gce_vm_create
can be called directly, which is what gce_vm_container
wraps setting some defaults. If you want to install RStudio server then I suggest running rocker/rstudio
.
The article is being updated now as I now have public images that do this all for you, so will be much simpler to set up in the future https://cloudyr.github.io/googleComputeEngineR/articles/single-scheduler.html
Sounds good. We can close this issue then.
The example given at https://cloudyr.github.io/googleComputeEngineR/articles/single-scheduler.html fails because
gce_vm_container
(incontainer.R
) defaults to image_familycos-cloud
(Container-Optimized OS), and this parameter can not be overridden. The Google Container-Optimized OS does not support package managers likeapt-get
(https://cloud.google.com/container-optimized-os/docs/resources/faq#what_is_the_software_package_manager_for_container-optimized_os). Thereforecron
is not installed duringdocker_build
in the example, which means scheduling viacronR
is impossible.I have replaced the default
image_project
withdebian-cloud
and the defaultimage_family
withdebian-8
(https://github.com/valentinumbach/googleComputeEngineR/commit/7584784ca070b8bc7afb85bd9d2244a86d37c806). Nowcron
is installed duringdocker_build
, but I cannot get RStudio Server to run on the Debian image. Possibly Ubuntu would be a better choice? (This setup worked for me: https://github.com/grantmcdermott/rstudio-compute-engine).