News for hackers. Stuff that matters.
Re:Why Vagrant? by mitchellh on Saturday November 30, 2013 @11:51PM (#6826171)
Creator of Vagrant here. Pleasantly surprised to see Vagrant on top of HN! Vagrant has matured a lot in the past year (since it has been on HN) both in the core but also in the community. There are now tons of plugins available, there is an O'Reilly book out, and much more. Most importantly, I think, is that the project has added 3 more core committers in the past few months.

And Vagrant 1.4 is also under heavy development with tons of great new features and bug fixes upcoming. See my Twitter stream for more info.

If you have any questions, feel free to ask. And thanks for the support!

Re:Why Vagrant? by codelust on Sunday December 01, 2013 @02:46AM (#6826535)
Hey Mitchell,

Thank you for producing such an awesome piece of software. I have been doing my local development on a Vagrant box for about a year now and in that time I have been able to move from OS X to Linux almost seamlessly thanks to Vagrant.

The only problem I have with it is the slowness of the default shared folders mechanism. Guess I need to bite the bullet one of these days switch to NFS.

Re:Why Vagrant? by mitchellh on Sunday December 01, 2013 @11:17AM (#6827850)
Howdy. Thanks, and I hear you with the synced folders stuff.

In the next version of Vagrant (1.4), synced folder implementations can actually be standalone plugins: https://twitter.com/mitchellh/status/405442194573516801

This will allow us to much more quickly add in more implementations of this mechanism, some of which may provide excellent performance at the expense of perhaps being more difficult to setup or slower to start up. But the importance is that the framework is now _there_.

I think we'll see this improve greatly. :)

Re:Why Vagrant? by rschmitty on Sunday December 01, 2013 @09:00AM (#6827280)
This kinda goes against the grain of Vagrant, but VMware + NFS + PHP still seemed slow to me and I switched things around to use Samba. Now my code/tests run "locally" to the VM and I edit code over samba
Re:Why Vagrant? by aidos on Sunday December 01, 2013 @06:10AM (#6826862)
Vagrant makes the nfs setup very easy to do. The performance difference is day and night when you have disk access. Even things like 'git status' is significantly faster. If you install the vb guest plugin it will make things even easier [1]. Issue I've run into is that I any get it working on a colleagues Mavericks host - there's all sorts broken on there though....

https://github.com/dotless-de/vagrant-vbguest

Re:Why Vagrant? by steveax on Sunday December 01, 2013 @03:23AM (#6826612)
Are you using Virtualbox VMs, or VMware VMs? My seat-of-the-pants experience is that VMware shares are more performant.
Re:Why Vagrant? by codelust on Sunday December 01, 2013 @04:29AM (#6826709)
Virtualbox VMs. Never tried the VMware ones.

The performance is acceptable most of the times, other than when I am running one of those PHP frameworks that includes a million files to process each request.

Re:Why Vagrant? by loevborg on Sunday December 01, 2013 @05:21AM (#6826783)
I'm seeing the same problem, running the phpunit tests from a PHP framework inside a Vagrant box (Ubuntu 12.04 as host and guest, VirtualBox provider, current vagrant). The tests run >3 times slower than on the physical machine. I have no idea what is causing the sluggishness.
Re:Why Vagrant? by amccloud on Sunday December 01, 2013 @02:56AM (#6826555)
NFS is no silver bullet. In exchange for performance and reliability you lose some production/development parity. You need to special case your provisioning script to guard against any FS permission changes.
Re:Why Vagrant? by codelust on Sunday December 01, 2013 @04:34AM (#6826717)
That's the reason why I gave it up the last time I tried it. IIRC, there's a requirement to run 'vagrant up' with sudo and that does things which I don't like.

Maybe, I'll try something like leaving the files on the guest and mount it on the host using SSHFS. My write performance will take a hit when I am editing files, but, if I can get rid of the sluggishness it will be worth it.

Re:Why Vagrant? by xmonkee on Sunday December 01, 2013 @01:20AM (#6826361)
Is there any way to automatically generate a provisioning script based on what was installed on the guest machine? For example, I do "vagrant ssh" and then install my whole development environment and it creates a script to do it every time based on what changed?
Re:Why Vagrant? by candeira on Sunday December 01, 2013 @01:58AM (#6826444)
Look at blueprint: https://github.com/devstructure/blueprint/

Right now it has frontends for bcfg2, cfengine, chef, puppet and shell scripts. It's not perfect, but it does a pretty good job of giving you a base set of provisioning rules you can then refine by hand.

Re:Why Vagrant? by mitchellh on Sunday December 01, 2013 @01:34AM (#6826394)
Not within Vagrant itself. This is really the realm of configuration management tools. As far as I know, no tools do this reverse engineering because it is a fundamentally very difficult problem, but many of the config mgmt tools make it very easy to translate shell commands to rudimentary scripts for their systems.
Re:Why Vagrant? by jsmeaton on Sunday December 01, 2013 @01:58AM (#6826443)
Vagrant doesn't, but blueprint[0] seems to be a decent tool for generating puppet manifests. I haven't used it personally, but an Ops guy at work has had some success with it.

[0]http://devstructure.com/blueprint/

Re:Why Vagrant? by mryan on Sunday December 01, 2013 @05:05AM (#6826758)
Puppet has some limited support for generating manifests based on the state of an existing system: http://docs.puppetlabs.com/man/resource.html
Re:Why Vagrant? by jmathai on Sunday December 01, 2013 @12:49AM (#6826303)
I guess I'm surprised not everyone is already using Vagrant.

Thanks for such an awesome piece of software.

Re:Why Vagrant? by stollercyrus on Sunday December 01, 2013 @02:22AM (#6826485)
For me the biggest barrier to adopting Vagrant was getting my rails stack setup in an easily reproducible way. It took me a while to get my laptop environment setup the way I like, so I was hesitant to have to start that process again.

Some of my friends had the same problem, so I put together some scripts to automate Vagrant + Rails: https://github.com/cyrusstoller/gardenbed

Re:Why Vagrant? by yeukhon on Sunday December 01, 2013 @03:41AM (#6826636)
Well, Vagrant is a utility that wraps popular virtual managers such as virtualbox and vmware under a single user interface (the vagrant command line) and provide configurations to setup a VM along with user-defined boostrap scripts (puppet, chef, ansible, salt, bash script, etc).

Based on the way you describe you situation, I think the barrier is in configuration management. That is, writing a puppet or an ansible script is still very time consuming. A vagrant machine in general is nothing more than a vanilla server after a full install.

For me, I am beginning to investigate the possibility to create a system package (e.g. debian package) for all the apps I need to run. I think FPM will help.

Re:Why Vagrant? by stollercyrus on Sunday December 01, 2013 @03:52AM (#6826659)
Right. I'd like to help people jumpstart this time consuming process. I'm interested to see your approach as well.
Re:Why Vagrant? by yeukhon on Sunday December 01, 2013 @05:54AM (#6826823)
Yeah. AWS marketplace is excellent. Imagine Vagrant has a bunch of modules available. :)

People are already sharing their, for example, wordpress installation, on github. But I am more interested in modules.

Re:Why Vagrant? by bobx11 on Sunday December 01, 2013 @09:42AM (#6827400)
I asked for a refund of the VMWare plugin the same day I purchased it, over a week ago and have received no response. It doesn't work reliably compared to the virtualbox one and requires windowsesque multiple restarts to make it work at all.
Re:Why Vagrant? by modernerd on Sunday December 01, 2013 @01:04PM (#6828342)
A counterpoint for anyone reading this who is considering the paid VMWare plugin: it works flawlessly for me.

On my MacBook Pro with Mavericks, it uses less CPU than my VirtualBox Vagrant boxes and feels snappier overall (boxes start and stop faster, Apache/nginx feel quicker, shared file updates are fast). It was definitely worth the money for me – not having to deal with flaky Mavericks support in VirtualBox alone is worth the price.

For anyone building their own VMWare boxes with Packer and Fusion, note that there's a known issue with shared folders in the current version of VMWare Tools (6.0.2). The workaround is to download Fusion Tools version 6.0.1 and install that instead, as mentioned here: https://communities.vmware.com/thread/462543 Here's a shell script to automate that under Ubuntu if you need to: https://gist.github.com/anonymous/c641a4b0c4ef7b45f07e

Re:Why Vagrant? by mitchellh on Sunday December 01, 2013 @10:23AM (#6827561)
I'm sorry about that. I just completed this for you. :)
Re:Why Vagrant? by SkyMarshal on Sunday December 01, 2013 @12:38AM (#6826284)
Any support coming for Salt, Ansible, and/or Docker?
Re:Why Vagrant? by HeyImAlex on Sunday December 01, 2013 @01:49PM (#6828586)
Though it's worth mentioning that Ansible is supported as a provisioner out of the box now, you can actually use vagrant with any configuration management system you can imagine; just set the target ip to 127.0.0.1, ssh port to 2222, user to vagrant, and ssh key file to ~/.vagrant.d/insecure_private_key.

(Thats for boxes set up with the default configuration, obviously it would be a little different if you were running a more complex system.)

Re:Why Vagrant? by hunvreus on Sunday December 01, 2013 @01:14AM (#6826355)
Re:Why Vagrant? by mitchellh on Sunday December 01, 2013 @01:35AM (#6826400)
Salt is supported already in Vagrant (since 1.2 or 1.3). Ansible as well!

A docker provisioner is actually making its way into core for 1.4. If you want to know what that looks like take a look at "Vocker" (the plugin).

Re:Why Vagrant? by SkyMarshal on Sunday December 01, 2013 @02:39PM (#6828848)
Thanks! The front page only mentions Chef and Puppet, so fwiw this isn't clear at a glance.
Re:Why Vagrant? by chewxy on Sunday December 01, 2013 @01:29AM (#6826378)
Salty Vagrant is good, apart from the silly name - I use it: https://github.com/saltstack/salty-vagrant
Re:Why Vagrant? by askedrelic on Sunday December 01, 2013 @12:28AM (#6826259)
Should I upgrade to VirtualBox 4.3 yet or stick with 4.2? I remember you cautioning about new things not being as stable in 4.3.
Re:Why Vagrant? by mitchellh on Sunday December 01, 2013 @01:35AM (#6826396)
The only issues I hear about 4.3 are people who have _upgraded_ (not fresh installed) to Mavericks on OS X. Personally, a fresh install of 4.3 on Mavericks and I have no issue.

YMMV, however.

Re:Why Vagrant? by vinu76jsr on Sunday December 01, 2013 @02:18AM (#6826479)
Mavericks and VB 4.3(4.3.2) doesn't really go hand in hand together, I wasted several hour the day before on trying to configure it properly to no avail, downgraded to 4.2 later on. It's better to stick with 4.2 if you are on mavericks.
Re:Why Vagrant? by garrettdreyfus on Sunday December 01, 2013 @09:57PM (#6831180)
I also have no problems with a fresh install of Mavericks and VB 4.3
Re:Why Vagrant? by sdnguyen90 on Sunday December 01, 2013 @02:29AM (#6826500)
I was also unsuccessful in getting 4.3 to work on Mavericks. Ended up reinstalling 4.2 and everything worked fine
Re:Why Vagrant? by foobarqux on Sunday December 01, 2013 @09:30AM (#6827364)
How do you ensure security of Vagrant images?
Re:Why Vagrant? by emocakes on Sunday December 01, 2013 @05:51AM (#6826818)
how about you fix the issue with the vmware workstation provider -> https://github.com/mitchellh/vagrant/issues/2239