Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Vagrant is nice because your environment becomes disposable and version controlled.

If you mess up your db config while performance tuning, for example, just call vagrant destroy and vagrant up.



The version control aspect is really great.

It's really nice to be able branch, commit, merge, go back, whatever with your installed infrastructure. This gets even better if you use puppet or chef (or even the shell) for provisioning of infrastructure in concert with vagrant.

Doing the same thing with snapshots and VM clones with VirtualBox alone is similar to zipping your project periodically as a backup strategy. Yeah,, it works, but it has no granularity.

Bottom line though, it feels very liberating at any point to be able to flip the fuckit bit, do a vagrant destroy and vagrant up and just start over. It makes for painless experimentation on your VM, among other things. Once you've got what you want, you can formalize it in your Vagrantfile, puppet manifests or other versioned artifacts of development.

Is good.


Huh, so can you "branch" a VM with vagrant? Like say I want to make some incompatible/lossy changes to my database schema, can I fork my dev environment, do my migrations to the new schema, and then go back if I don't like it?


Vagrant works by describing a machine or group of machines. It hands off to Chef or Puppet, which then do the job of bringing the naked machine up to something nearly identical to your production environment.

You can snapshot to binary blob too, but having code that rebuilds from scratch is a great way to smoke out certain classes of dependency conflicts. It also provides assurance that if a hurricane turns some data centre into lego bricks, you can rebuild an identical setup somewhere else with a single command.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: