2 ms·
Vagrant looks interesting but I am not sure why I would use it. Almost all of my work involves using Clojure and I default to using Postgres except in exception
by mark_l_watson 13y ago
Vagrant looks interesting but I am not sure why I would use it. Almost all of my work involves using Clojure and I default to using Postgres except in exceptional circumstances. It is so easy to have the same setup on my OS X and Linux laptops as my servers. I have never run into any compatibility problems, at least that I am aware of.
Vagrant looks more useful for systems with lots of moving parts.
I am starting a new project with Node.js, Meteor and MongoDB - also an easy to set up stack. I will keep Vagrant in mind, but I hope I don't need it.
- phamilton 13y agoVagrant 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.
- a3n 13y agoThe 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.
- ibrahima 13y agoHuh, 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?
- jacques_chester 13y agoVagrant 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.
- jweir 13y agoThere are many beautiful aspects of Vagrant. These are true whether you work solo or with a team. * If your machine is OS/X, but you deploy to Ubuntu then you aren't developing in a realistic environment. Using Vagrant you get to work with OS/X tools, but run your app on an Ubuntu(or whatever) OS. I use NFS file share, edit on the Mac, run in the VM. * Keeps your machine clean. If you work on multiple projects, perhaps running different versions of Node, Ruby, MySQL, Reis, PostGres, etc, you keep them isolated to their VM. * You can experiment. Want to try your app out in Arch, a different version of Ubuntu, etc? Spin up a new VM or clone an existing VM. * Have a new machine? Copy over your VMs and start working right away. * The environment it setup as a script. Have a new developer for your application? Just send them the scripts to spin up a new VM. I use Bash scripts to configure my VM's, or you can use Chef or Puppet.
- bdcravens 13y agoI like to be able to script my environment and put it in a git repo for others who may join the team, or myself (when I repave my machine, for example). Also I've found the upfront effort to write the recipe (I tend to write lean recipes, rather than use community ones, as I see a lot of bloat and unneeded dependencies) helps me identify dependencies early on. (For example, say I need Selenium or Jenkins - my local machine's Java has been long working, so the cleanroom environment helps me identify gotchas I wouldn't otherwise see until deployment)