Vagrant
Vagrant (2010) is an open-source software product for building and maintaining portable virtual development environments. The core idea behind its creation lies in the fact that the environment maintenance becomes increasingly difficult in a large project with multiple technical stacks.
Vagrant manages all the necessary configurations for the developers in order to avoid the unnecessary maintenance and setup time, and increases development productivity. Vagrant is written in the Ruby language, but its ecosystem supports development in almost all major languages.
Vagrant uses "Provisioners" and "Providers" as building blocks to manage the development environments. Provisioners are tools that allow users to customize the configuration of virtual environments. Puppet and Chef are the two most widely used provisioners in the Vagrant ecosystem. Providers are the services that Vagrant uses to set up and create virtual environments. Support for VirtualBox, Hyper-V, and Docker virtualization ships with Vagrant, while VMWare and AWS are supported via plugins.
Vagrant sits on top of virtualization software as a wrapper and helps the developer interact easily with the providers. It automates the configuration of virtual environments using Chef or Puppet, and the user does not have to directly use any other virtualization software.
Machine and software requirements are written in a file called Vagrantfile[1] to execute necessary steps in order to create a development-ready box. Box is a format and an extension ( .box) for Vagrant environments that is copied to another machine in order to replicate the same environment.
Installation[edit]
- macOS:
brew install vagrant - Ubuntu:
apt install vagrant
Vagrant Basic commands[edit]
vagrant up[2]vagrant up --debugorVAGRANT_LOG=loud vagrant upfor debugging
purposes[3]
vagrant initvagrant destroyvagrant sshvagrant roles enablevagrant box add:vagrant box add bento/ubuntu-20.04vagrant box listvagrant reloadvagrant statusvagrant box updatevagrant provision
Help[edit]
Related terms[edit]
See also[edit]
- Vagrant,
Vagrantfile,vagrant status,vagrant init,vagrant up,vagrant box,vagrant --help,vagrant box list,vagrant ssh,vagrant reload,vagrant halt - Virtualization: CPU Virtualization, KVM, Xen, AWS Nitro System, VirtualBox, multipass, containers, Vagrant, Packer, Hyper-V, VMware, Parallels, Bhyve, Virtual machine, IBM LPARs
- HashiCorp: HCP, Terraform, Vault, Nomad, Vagrant, Sentinel, Consul, Packer, Waypoint, Boundary, Mitchell Hashimoto, Armon Dadgar
Advertising: