Automating Server Builds

Updated by Linode Written by Linode

Contribute on GitHub

Report an Issue | View File | Edit File

Why You Should Automate Server Builds

Manually configuring systems is a good way to learn, but it’s also a time consuming process which is prone to human error. There are multiple ways to automate deploying new systems and various degrees to which that automation can be applied.

For example, if your needs are relatively straightforward and concise, a shell script or Linode StackScript could be all that is necessary. For more complex solutions, configuration orchestration and management exists to deploy and manage fleets of systems and services across multiple regions, networks, and service providers.

Working with a Golden Image

Using a golden image as a configuration base is a frequent starting point in cloud environment automation. This helps quickly deploy multiple systems which are exactly identical. Across the industry, golden images are also referred to as master, base, or clone images, among other terms. Irrespective of name, the idea behind a golden disk is simple: create the desired image and preserve it for cloning/deploying to other servers, thereby simplifying the deployment process and eliminating configuration gap.

Cloning your Linode disk.

Create a Golden Image

  1. Create a new Linode.
  2. Configure all packages, applications, and system settings as desired.
  3. Remove any system users you don’t want to appear on your duplicated systems.
  4. Shut down the Linode and either:
  5. Store your golden image. This can be done in a variety of ways. A few examples are:

Restore a Golden Image

  1. Copy the duplicate disk to your other Linodes, either using the Linode API or manually. If you’re using a Linode Backups snapshot, you would restore it to the desired Linodes.
  2. Create configuration profiles on those additional Linodes to boot using the duplicated disk.
  3. Any user credentials from the golden image will also be on the duplicated disks so you should change the new system’s root password.
  4. Update the new Linode’s hostname.
  5. If your golden system was configured to use a static IP address, you’ll also need to reconfigure the IP address on your duplicated disks.

Third-Party Tools

Golden disks are capable of handling automated server builds for most individuals and small businesses, but if you work for a large business that manages dozens of Linodes, you may need to turn to third-party configuration management and orchestration tools, such as:

There are plenty of other third-party configuration management tools to be used should the above options not suit your needs.

Join our Community

Find answers, ask questions, and help others.

comments powered by Disqus

This guide is published under a CC BY-ND 4.0 license.