Spawning multiple droplets from single image

January 29, 2015 840 views

Is it possible to craft a custom image based on the regular ubuntu droplet, then spawn X amount of them programmatically.

That way I would only have to setup one VM, but scale it out to as many as I need on the fly without having to install/setup each on individually.

2 Answers

Yes, you can spin up a droplet, install whatever you like on it, and then take a snapshot of it. Then, whenever you need to replicate that setup, create a new droplet off the snapshot instead of the OS image. A snapshot is a complete copy of a Droplet's filesystem, so it contains everything that was on the Droplet.

You can use the List a User's Images API call to list your images - including snapshots - to get the image ID for the snapshot which you can then supply as the image ID when creating a new Droplet.

Brilliant! By chance know how much it cost to hold a single snapshot image.

  • Right now, snapshots are completely free of charge. The price for snapshots will be $0.02 per GB of snapshot storage per month, however, we'll make sure that all users are notified before we actually start charging for them.

Have another answer? Share your knowledge.