pachadotdev / analogsea

Digital Ocean R client
https://pacha.dev/analogsea/
Apache License 2.0
154 stars 24 forks source link

Easy way to create or re-use image #94

Closed hadley closed 9 years ago

hadley commented 9 years ago

e.g.

d <- droplets()
i <- images(FALSE)
if ("revdep" %in% names(droplets)) {
  revdep <- d$revdep
} else if ("revdep" %in% names(i)) {
  revdep <- droplet_create("revdep", "8gb", image = i$revdep)
} else {
  revdep <- droplet_create("revdep", "8gb", region = "nyc1", cloud_config = "ubuntu")
}
sckott commented 9 years ago

Good idea. I'm forgetting, where does revdep come from

hadley commented 9 years ago

That's just an example droplet name

sckott commented 9 years ago

k, thx

sckott commented 9 years ago

@hadley is this https://github.com/sckott/analogsea/blob/master/R/reuse.R what you had in mind?

hadley commented 9 years ago

Yes, but I'd call it droplet_reuse and I wouldn't use variable names for the messages

sckott commented 9 years ago

ok