gitmyhub

vagrant

Ruby ★ 27k updated 6d ago

Vagrant is a tool for building and distributing development environments.

Vagrant lets you define a complete development environment in a single config file so every developer on your team gets an identical virtual machine with one command, eliminating the 'works on my machine' problem.

RubyVirtualBoxVMwareDockerAWSsetup: moderatecomplexity 3/5

Vagrant is a tool for creating and managing development environments — essentially isolated, reproducible virtual machines or containers that you can spin up on your laptop with a single command.

The problem it solves: "it works on my machine" is a classic frustration in software development. When developers on a team use different operating systems, software versions, or configurations, code behaves differently across machines. Vagrant solves this by letting you describe your entire development environment in a configuration file (called a Vagrantfile), which can be committed alongside your code. Anyone on the team runs one command and gets an identical environment.

You define what operating system, installed software, and settings you want in the Vagrantfile, and Vagrant handles creating a virtual machine (a software-simulated computer running inside your real one) that matches those specs exactly. It can create environments on local virtualization tools like VirtualBox or VMware, in cloud providers like AWS or OpenStack, or using containers.

You'd use Vagrant when you want every developer on your project to have the same setup, or when you need to test your software in a controlled environment without affecting your main computer. It's written in Ruby, but you use it through the command line regardless of your own language. Two commands — vagrant init and vagrant up — are enough to get a configured environment running.

Where it fits