Skip to main content

Vagrant

Vagrant is an open-source tool for building and managing virtualized development environments. It provides a simple and consistent workflow for creating reproducible and portable environments, making it easier for developers to work on projects across different operating systems.


🌟 Key Features​

  • Reproducibility: Define environments as code using a Vagrantfile.
  • Portability: Works with multiple providers (VirtualBox, VMware, Hyper-V, Docker).
  • Provisioning: Supports shell scripts, Ansible, Chef, Puppet, and more for automated setup.
  • Isolation: Each project can have its own isolated environment.
  • Community: Large ecosystem of pre-built boxes and plugins.

πŸš€ Common Commands​

  • vagrant init β€” Initialize a new Vagrant environment.
  • vagrant up β€” Start and provision the environment.
  • vagrant halt β€” Stop the running machine.
  • vagrant destroy β€” Remove the environment.
  • vagrant ssh β€” SSH into the running machine.


πŸ“ Notes​

  • Vagrant is ideal for development and testing, not for production.
  • The Vagrantfile is the core configuration file for defining environments.
  • Plugins extend Vagrant’s functionality (e.g., for disk resizing, synced folders, etc.).