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.
π Useful Linksβ
- Vagrant - Development Environments Made Easy
- Vagrant GitHub
- Vagrant CLI autocompletion
- vagrant-disksize - A Vagrant plugin to resize disks in VirtualBox
- Vagrant Boxes - Pre-built base images
π Notesβ
- Vagrant is ideal for development and testing, not for production.
- The
Vagrantfileis the core configuration file for defining environments. - Plugins extend Vagrantβs functionality (e.g., for disk resizing, synced folders, etc.).