Continuous deployment: about virtual machines

Continuous deployment: about virtual machines

January 16, 2023 | Next part |

The objective

We want to create a reusable environment to deploy our code on multiple machines. We want all machines accessible via SSH. Our goal is to have the flexibility to choose any available machine for deployment. By setting up our home network machines, we can later configure cloud deployments more easily.

We’ll create a Linux virtual machine (VM) on both Windows and Mac computers. The Linux VM will serve as the standardized OS for configuring and deploying code from the command line. It ensures compatibility with the necessary tools, even if the host OS is outdated.

To simplify the process, we’ll script the VM creation, including software installation, for a repeatable and hassle-free configuration experience.

Which Linux to pick?

The remaining question is which Linux flavor to choose. With numerous options available, it can be overwhelming. We require a distro that is:

  • Designed for server usage, with a command line interface instead of a graphical user interface.
  • Lightweight for smooth installations and operations.
  • Well-supported, providing software availability and reliable answers to questions.

Here are a few popular choices:

  • Ubuntu Server: It offers long-term support, utilizes the apt package manager, and has instant VM options. However, concerns have been raised about its use of Snap packages and proprietary elements.
  • Rocky Linux: Developed by the founder of CentOS, it offers long-term support.
  • Alma Linux: Another CentOS-based distro, community-driven and utilizing the RPM package manager.
  • Alpine Linux: Known for its small footprint and fast startup, it is commonly used for containers. It has unique aspects such as the APK package manager and the Ash shell instead of Bash.

In this tutorial, we will work with Alpine Linux unless we encounter limitations. Like a Choose Your Adventure novel, choose your path to get started and set up the VM on either a Windows or Mac host.