Live data from Hacker News

Vagrant: Create and configure portable development environments

vagrantup.com

11–20 of 80 posts

Re: Vagrant: Create and configure portable development environments

#11

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 n…

There 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.

Re: Vagrant: Create and configure portable development environments

#13
post #10

Vagrant creator here. What a pleasant surprise to see this pop up on HN this morning (it was unexpected, to be sure). I just want to shamelessly say that if you're more of a book person, the Vagrant O'Reilly book I wrote was just released this week, and it is a great way to get started: http://shop.oreilly.com/product/0636920026358.do Thanks! (And, hopefully as you know, as an author I make barely any royalties on an…

That's interesting. Have you ever considered Leanpub before you went with Oreilly?

I was approached by O'Reilly very early. I wasn't even considering writing a book prior to that. However, my experience with O'Reilly has been _fantastic_. I was never writing the book for money, I was writing it for publicity and to help push the project forward. For these reasons, O'Reilly was the clear winner.

Additionally, everyone I've ever worked with at O'Reilly has been very professional, and they've been doing a great job helping push the book forward. They even rushed the production process (editing, indexing, proofreading, printing, etc.) from their typical timelines down to only a couple weeks so the book would be fully ready for VelocityConf in a couple weeks. And they did it! I'll be at VelocityConf signing books.

:)

Re: Vagrant: Create and configure portable development environments

#14

I haven't done much research, but is there a way to share a running instance with others? Can I configure/setup/tinker-with an instance, suspend it and share that with someone?

Yes, you can run `vagrant package` and it'll turn it into a single file format that can be sent to other people to reuse.

Re: Vagrant: Create and configure portable development environments

#15

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 n…

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.

Re: Vagrant: Create and configure portable development environments

#16
post #10

Earlier quoted context omitted.

That's interesting. Have you ever considered Leanpub before you went with Oreilly?

I was approached by O'Reilly very early. I wasn't even considering writing a book prior to that. However, my experience with O'Reilly has been _fantastic_. I was never writing the book for money, I was writing it for publicity and to help push the project forward. For these reasons, O'Reilly was the clear winner. Additionally, everyone I've ever worked with at O'Reilly has been very professional, and they've been doi…

Great, congratulations then. Vagrant is a fantastic tool.

Re: Vagrant: Create and configure portable development environments

#17
We switched from hand-configured boxes and a long, "full stack local" setup document to chef + vagrant at my current company (http://parse.ly).

Though it caused some kicking & screaming on the development team, the end result is that every developer has the same development environment, which pretty much matches our deployment environment (in Rackspace Cloud). I also just kicked off our summer intern class, and the interns were able to get productive with our codebase in 1 day despite not having much experience with modern Python web development, because pretty much every local setup step was automated.

I consider the tool invaluable. I don't even install any databases or tools directly on my laptop any longer. With its handy port forwarding feature, you can put all your DBs on a VM, yet still connect w/ CLI clients via your host machine. Then when you do "vagrant halt", all your DBs shut down at once and you free all those resources / memory / etc.

Also, one suggestion -- look into the debug logging level that you can set with an environmental variable. The only thing I found frustrating about Vagrant were situations where it would hang/fail but it wouldn't be clear why. It turns out their debug logging is quite good.

Re: Vagrant: Create and configure portable development environments

#18
post #4

Its a great little tool. I have been using it for a over a year now and it simplifies the dev environment issues by sandboxing it. In general, it allows you to isolate your development servers and other such programs and libraries in a sandbox. You can use the editors, browsers etc on your local machine however the servers and other heavy lifting can be done by the vm in the sandbox env. I think this is still bleedin…

On my Mac, using VMware was rougly 4 times faster than VirtualBox, particularly when running very long puppet scripts and using memory. I was very happy to pay for the VMware Fusion support and to buy VMware Fusion in the first place (it is 10x better than Parallels for the VM client drivers alone). The tricky bits for me were, at least a few months ago, some of the commands were different and of course the base OS VMs should be different given different client drivers. But it is possible to have one Vagrantfile serve both VirtualBox and VMware Fusion, so devs can choose which environment works best for them.

Re: Vagrant: Create and configure portable development environments

#19
Vagrant is a nice tool, but I don't like the closed-open source part of it. There are 289 open issues and 79 open pull requests on github right now. It feels like there is a huge community out there who want to move this project forward, but there is the bottleneck of having only one committer who wants to have too much control over it. It's fine and the author can do what he wants, but I'm wondering what the project could achieve if it was more open to contributions and more people could actively work on it.

As a user, looking at those 289 open issues with only one developer, I don't feel at all encouraged to open a new one or send a pull request, because I just see a huge pile of things that the committer will have to wade through before getting to mine.

Re: Vagrant: Create and configure portable development environments

#20
It looks like Vagrant is designed to help out web developers more than anything else.

I develop primarily for microcontrollers, and it can be a pain to manage toolchains for different architectures. Would Vagrant help with that? Does anyone have an examples of using Vagrant like this?

Post reply on HN