Posts

Showing posts with the label Ubuntu

How to Create a VM on Ubuntu with Terraform, Libvirt, and QEMU: Solving Real-World Issues

Image
Creating virtual machines (VMs) on Linux using Terraform and Libvirt is an excellent way to automate infrastructure, but the process can come with its fair share of challenges. In this article, I’ll walk you through how to set up a VM on Ubuntu using Terraform, Libvirt, and QEMU, and explain all the real-world issues I faced and solved along the way. Table of Contents Introduction Prerequisites Installing Required Packages Setting Up the Libvirt Pool Preparing the QCOW2 Image Writing the Terraform Configuration Common Errors and How to Fix Them Managing AppArmor Final Working Script Introduction Virtualization is a key component of modern infrastructure. With tools like Libvirt and QEMU, you can run lightweight VMs on a local or remote Linux host. Terraform adds the power of Infrastructure as Code to define and deploy VMs automatically. But things rarely work the first time. Prerequisites Ubuntu Linux (20.04 or later) A user with sudo privileges Terraform installed ( sudo apt install t...

Setting Up HashiCorp Vault on Ubuntu: A Beginner's Guide

Image
HashiCorp Vault  is an open-source tool designed to manage and control access to sensitive information such as API keys, passwords, certificates, and other secrets. It’s an essential component in a secure infrastructure, enabling organizations to store and tightly control access to tokens, passwords, certificates, and encryption keys for protecting secrets and other sensitive data. This guide covers the installation and configuration of Vault on an Ubuntu system, along with examples of how to use Vault to manage secrets. Whether you are a developer, system administrator, or DevOps engineer, this article will help you get started with Vault and integrate it into your workflow. Table of Contents Installation Prerequisites Installing Vault on Ubuntu Configuring Vault Managing Secrets with Vault Working with policies Integrating Vault with Applications Best Practices for Using Vault Securing Vault with TLS Troubleshooting Common Issues Troubleshooting with "Permission de...