How do you script a custom droplet?
I’d like to be able to write some scripts to completely automate the creation of WordPress droplets on Ubuntu Server. But, I’d like customized WordPress droplets that are not currently offered in the Digital Ocean droplet creation UI.
For example…I’d like the WordPress droplets to run on Nginx on Ubuntu instead of Apache. The Digital Ocean WordPress application runs on Apache while the LEMP application install does not include WordPress.
Neither instance has a firewall enabled - which Digital Ocean does recommend doing once the droplet is created.
Neither instance includes Varnish, which may help with page load times.
While I can look up how to manually enable the firewall, how to install WordPress on LEMP and even how to install Varnish…I would like to be able to script all of this (starting with using the Digital Ocean v2 API) so that I can create my own web UI to start an instance of WordPress on LEMP with Varnish and the firewall configured and ready to go.
Doing this all via scripting seems like it would save a lot more time than manually setting everything up for each server.
How would you go about doing this? Are there any tutorials on scripting this sort of thing?