Managing your Vagrant virtual machines
Laziness is the mother of invention and Stuart Burns is a past master at getting his machines to do all his work for him…
We have been experimenting with some new applications, with the intent of disposing of W them afterwards. Remember, it’s all about disposable but reproducible builds. We wanted something lightweight and completely controlled from the command line. Enter Vagrant.
The beauty of Vagrant is that there are no huge image files to manage. It requires nothing beyond a setup file containing the details needed to set up the disposable VMs, and VirtualBox to provide the underlying virtualisation platform. You could even give someone a copy of the Vagrant file and they could just run it and have the same setup.
To install Vagrant on Ubuntu – other distros and OSes are covered at https://developer.hashicorp.com/vagrant/install – use the following three commands: $ wget -O- https://apt.releases.hashicorp.com/gpg | sudo gpg --dearmor -o /usr/share/keyrings/hashicorparchive-keyring.gpg $echo “deb [arch=$(dpkg --print-architecture) signed-by=/usr/share/keyrings/hashicorp-archive-keyring.gpg] https://apt.releases.hashicorp.com $(lsb_release -cs) main” | sudo tee /etc/apt/sources.list.d/hashicorp.list $sudo apt update && sudo apt install vagrant