throwaway
By:
throwaway

How would you automate the creation and destruction of droplets?

April 2, 2018 182 views
DigitalOcean Clustering API

Connected to this question: https://www.digitalocean.com/community/questions/can-you-make-an-erlang-cluster-with-digitalocean-droplets

How would you automate the create and destruction of droplets? Every time one is created they automatically have certain packages installed, perhaps using packer, and then get added to an erlang cluster. How might I go about all of this?

2 Answers

You can use a tool such as doctl -- https://github.com/digitalocean/doctl and some shell scripts

Another solution is to use Hashicorp's Terraform - https://www.digitalocean.com/community/tutorials/how-to-use-terraform-with-digitalocean

Terraform is a tool for building and managing infrastructure in an organized way. It can be used to manage DigitalOcean droplets and DNS entries, in addition to a large variety of services offered by other providers. It is controlled via an easy to use command-line interface, and can run from your desktop or a remote server. Terraform works by reading configuration files that describe the components that make up your application environment or datacenter...
Have another answer? Share your knowledge.