Vagrant is free and open-source software for creating and configuring virtual development environments. It can be considered a wrapper around virtualization software such as VirtualBox and configuration management software such as Chef, Salt and Puppet.1
Vagrant provides easy to configure, reproducible, and portable work environments built on top of industry-standard technology and controlled by a single consistent workflow to help maximize the productivity and flexibility of you and your team.2
Table of contents
Download Vagrant - Mac OS X, Windows, Debian, CentOS for the proper OS, and run the installer...
sudo VBoxManage extpack install --replace Oracle_VM_VirtualBox_Extension_Pack-XXX.vbox-extpack sudo VBoxManage extpack cleanup
- Vagrant::Hostsupdater - This plugin adds an entry to your /etc/hosts file on the host system.
You currently only need the hostname and a :private_network network with a fixed IP address.
config.vm.network :private_network, ip: "192.168.3.10" config.vm.hostname = "www.testing.de" config.hostsupdater.aliases = ["alias.testing.de", "alias2.somedomain.com"]
Instead of building a virtual machine from scratch, which would be a slow and tedious process, Vagrant uses a base image to quickly clone a virtual machine. These base images are known as "boxes" in Vagrant, and specifying the box to use for your Vagrant environment is always the first step after creating a new Vagrantfile.3
vagrant box - This is the command used to manage (add, remove, etc.) boxes.
vagrant box add xxx/yyy
vagrant init centos/7
The primary function of the Vagrantfile is to describe the type of machine required for a project, and how to configure and provision these machines. Vagrantfiles are called Vagrantfiles because the actual literal filename for the file is Vagrantfile (casing does not matter unless your file system is running in a strict case sensitive mode).4
Vagrant.configure(VAGRANTFILE_API_VERSION) do |config| # set auto_update to false, if you do NOT want to check the correct # additions version when booting this machine config.vbguest.auto_update = false # do NOT download the iso file from a webserver config.vbguest.no_remote = true end
- Ansible is a free software platform for configuring and managing computers. It combines multi-node software deployment, ad hoc task execution, and configuration management.5
- SaltStack makes software for complex systems management at scale. SaltStack is the company that created and maintains the Salt Open project and develops and sells SaltStack Enterprise software, services and support. Easy enough to get running in minutes, scalable enough to manage tens of thousands of servers, and fast enough to communicate with them in seconds.6
- Puppet is an open source configuration management utility.7
- Chef is an automation platform that transforms infrastructure into code. Stop thinking in terms of physical and virtual servers. With Chef, your real asset is the code that brings those servers and the services they provide to life. An automated infrastructure can accelerate your time to market, help you manage scale and complexity, and safeguard your systems.8
# Vagrant .vagrant/
Vagrant, auto-update VirtualBox Guest Additions - vagrant-vbguest is a Vagrant plugin which automatically installs the host's VirtualBox Guest Additions on the guest system. - https://github.com/dotless-de/vagrant-vbguest
Just go to the directory where your Vagrantfile is located. And type the following:
vagrant plugin install vagrant-vbguest
- (Python) Development Environments with Vagrant and Ansible - How to use Vagrant and Ansible together to build a powerful, flexible and portable development environment
- Automatically download and install VirtualBox guest additions in Vagrant
- Introducing Scotch Box – A Vagrant LAMP Stack That Just Works
- FreeBSD Vagrant: Creating a FreeBSD 11 base box (virtualbox) – pt. 1