How can we create our desired config of Droplets instead of pre-defined config?

January 22, 2018 747 views
Deployment Scaling

I would like to create our own desired config of droplets, Is it possible to do or what.

1 Answer

There are a few ways that you can create Droplet's pre-configured with the software and applications you want. The first would be to use a "cloud-config" script to pre-install and configure what you need on first boot. The scripts can be entered when you create the Droplet:

DigitalOcean Control Panel

This allows you to write reusable scripts that will get you up and running quickly. Check out this GitHub repo for a number of examples: https://github.com/digitalocean/do_user_scripts

Another option for creating a pre-configured Droplets is to take a snaphot of one that you've already set up. You can then use that as the base for any new Droplets that you create. For more general info on snapshots, see this tutorial: DigitalOcean Backups and Snapshots Explained.

You can also automate the process with tools like Packer, which help you build reusable Droplet Snapshots. See: How To Create DigitalOcean Snapshots Using Packer on Ubuntu 16.04

This tutorial provides an explanation for how backup and snapshots work on DigitalOcean. Additionally, it includes information on how to scale, backup, and clone out servers with snapshots.
Have another answer? Share your knowledge.