Lead Image © lightwise, 123RF.com

Lead Image © lightwise, 123RF.com

Automating deployments on Proxmox with OpenTofu and cloud-init

Go-Between

Article from ADMIN 84/2024
By
Use OpenTofu and cloud-init to deploy virtual machines in a Proxmox hypervisor and populate them automatically with services.

In the old days, before virtualization was practical, if you wanted to run a service, you installed an operating system (OS) on a physical machine and then manually installed the service. If more than one instance of the OS was required, you needed to purchase additional computers and repeat the process manually. As you might imagine, administering a large fleet of computers this way is unworkable in the long run, so automation tools were created. Fully Automatic Installation (FAI) [1] is a good example of an early, generic tool for deploying Linux distributions over a sizable number of machines.

Tools such as FAI created for physical machines are of use when deploying virtual machines, as well, as are distro-specific tools (e.g., autoinstall for OpenBSD [2], preseed for Debian [3], Kickstart for Enterprise Linux-compatible distributions [4], etc.). However, these tools might take a bit too long to build the environment you want to your specifications, because installing every OS from the ground up is a slow process.

In this article, I demonstrate the capabilities of modern automation tools through example. I deploy a set of web servers and a reverse proxy in a virtual environment hosted by a Proxmox VE hypervisor. (See the "Why Proxmox?" box if you are not familiar with it.)

Why Proxmox?

Proxmox VE is a hypervisor intended to be installed on your hardware on which virtual machines and containers are deployed. Proxmox is a commercial distribution, and therefore a paid subscription is required for accessing the production-ready repositories. Non-production repositories are available free of charge and without restrictions and are quite

...
Use Express-Checkout link below to read the full article (PDF).

Buy this article as PDF

Express-Checkout as PDF
Price $2.95
(incl. VAT)

Buy ADMIN Magazine

SINGLE ISSUES
 
SUBSCRIPTIONS
 
TABLET & SMARTPHONE APPS
Get it on Google Play

US / Canada

Get it on Google Play

UK / Australia

comments powered by Disqus