Report this

What is the reason for this report?

Dynamic DO Droplets' creation and configuration of

Posted on May 29, 2019

Currently I’m developing an API REST with NodeJS. What I want to do is everytime an User register in my system, create a new droplet, deploy and run an instance of the API REST previously mentioned and add a new DNS record for that new Droplet.

I don’t know if I can achieve that requirement with tools like Chef or Terraform.

Any ideas?

Thanks in advance.



This textbox defaults to using Markdown to format your answer.

You can type !ref in this text area to quickly search our full set of tutorials, documentation & marketplace offerings and insert the link!

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

You could integrate your API with the digital ocean API and create a new Droplet (with the help of the request module).

https://developers.digitalocean.com/documentation/v2/#droplets

You could use the same API to create your DNS records by the looks of things.

https://developers.digitalocean.com/documentation/v2/#domain-records

I imagine that you’re probably already aware that this level of automation is risky business (given that you could incur significant charges if your API is insecure).

Good luck!

The developer cloud

Scale up as you grow — whether you're running one virtual machine or ten thousand.

Get started for free

Sign up and get $200 in credit for your first 60 days with DigitalOcean.*

*This promotional offer applies to new accounts only.