cloudyr.github.io icon indicating copy to clipboard operation
cloudyr.github.io copied to clipboard

docker-machine wrapper

Open cboettig opened this issue 8 years ago • 6 comments

Hi @leeper , Cloudyr team,

Would you be interested in a package wrapping the docker-machine interface?

docker-machine is essentially just a simple wrapper around the APIs of many common cloud computing platforms (listed below), giving you a more-or-less consistent interface for launching, controlling & stopping an instance with particular specifications on that platform with Docker running on it. Combined with @wch 's harbor package & rocker images this would let users deploy RStudio, Shiny, or long-running Rscripts on a desired platform with one or two lines of code.

A compelling use case for this would be the ability to deploy long-running code on any of these environments in a way that the machine will just shut down once the code has finished running and the results have been pushed to the appropriate place (e.g. S3, github, or similar), avoiding the need to monitor for when a long-running job finishes or incurring use charges for idle compute. (If you know of a better way to do that, I'm all ears).

Here's the platform list supported already by docker-machine:

Amazon Web Services Microsoft Azure Digital Ocean Exoscale Google Compute Engine Generic Microsoft Hyper-V OpenStack Rackspace IBM Softlayer Oracle VirtualBox VMware vCloud Air VMware Fusion VMware vSphere

cboettig avatar Sep 02 '17 16:09 cboettig

I would be all over this, sounds very cool. We spoke before about some kind of meta package over all the cloud services, this sounds like a way in.

Regarding https://github.com/wch/harbor I rely heavily on it but its not on CRAN so I currently import the functions.

I have literally just finished an App Engine application that would cover the use case you mention with long running code - it puts plumber in Rocker then deploys via flexible containers https://github.com/MarkEdmondson1234/serverless-R-API-appengine and I'm working on an RStudio version too https://github.com/MarkEdmondson1234/appengine-rstudio

MarkEdmondson1234 avatar Sep 02 '17 17:09 MarkEdmondson1234

Yess!! This would be really great! Travelling at the moment, so can't comment in depth but I'm with @MarkEdmondson1234 - we should definitely have this.

leeper avatar Sep 02 '17 19:09 leeper

@leeper Should I just create a repo in my own domain to put together a prototype and later transfer, or would it be better to start developing under cloudyr to begin with?

cboettig avatar Sep 04 '17 19:09 cboettig

For now, I've just put my prototype here: https://github.com/cboettig/dockermachine. Happy to transfer to cloudyr or flush out more there first. It should have basic functionality to install docker-machine on most platforms and make the usual commands.

cboettig avatar Sep 05 '17 02:09 cboettig

That sounds good - we can transfer later. I'm traveling but will take a look when I can.

leeper avatar Sep 05 '17 18:09 leeper

@cboettig This looks very useful. Would you have a similar package for talking to the docker client itself?

hongooi73 avatar Oct 22 '18 05:10 hongooi73