Vagrant 1.4
vagrantup.com
vagrantup.com
Learning Vagrant @ http://sysadmincasts.com/episodes/4-vagrant
Create a Vagrant box with Veewee @ http://sysadmincasts.com/episodes/5-create-a-vagrant-box-wit...
Learning Puppet with Vagrant @ http://sysadmincasts.com/episodes/8-learning-puppet-with-vag...
Managing Iptables with Puppet @ http://sysadmincasts.com/episodes/18-managing-iptables-with-...
Other than that, I agree it's almost like just using VBox directly.
As soon as you get this consistent workflow, then you can teach it to your entire organization and the whole company knows that ANY project in the company can be worked on using this workflow without any dependencies on their own machine.
And if ops decides to suddenly change the dev environment from VirtualBox to say... AWS... nothing changes! I've had large companies (200+ developers) switch from VirtualBox to VMware to AWS for their dev environments without their developers ever really noticing.
That is pretty cool.
Of course, on top of this, you get a lot of nice things: you get provisioners, you get automatic network configuration, you get the entire plugin community, you don't have to worry about stability on your own because you tap the collective stability of thousands of users, etc.
But the real power is workflow.
Presumably this is also mostly used with Linux. How do people manage Windows licenses with Vagrant?
No, it's very useful for desktop, and especially embedded development. It lets you have consistent images to test your code against.
Presumably this is also mostly used with Linux. How do people manage Windows licenses with Vagrant?
No, it's very popular on both Windows and OS-X. Virtualbox is most popular on both platforms (because it is free).
No, I think that they meant with Windows Guests (hence the license question).
I don't think that Vagrant is used much for coding Windows applications, but rather coding Linux (web) applications from Windows hosts.
I've never used it, but it looks like there is a way to use this for Windows Guests as well: http://www.thomasvjames.com/2013/09/create-a-windows-base-bo...
YMMV
With vagrant primary mode of interaction is through ssh (although it supports showing GUI on vagrant up). So I don't think it is a good fit for developing Windows or desktop applications.
I needed to spin up 5 servers, a load balancer and 2 groups of 2 backend servers. I needed to provision them with Chef, have full name resolution, and be able to access the servers from my host machine.
Here's my Vagrantfile
Vagrant.require_plugin "vagrant-chef-zero"
Vagrant.require_plugin "vagrant-berkshelf"
Vagrant.require_plugin "landrush"
last_ip_octet = 10
DOMAIN = "vagrant.dev"
Vagrant.configure("2") do |config|
config.landrush.enable
config.chef_zero.chef_repo_path = "./"
config.omnibus.chef_version = '11.8.0'
config.vm.box = "opscode_ubuntu-12.04_provisionerless"
config.vm.box_url = "https://opscode-vm.s3.amazonaws.com/vagrant/opscode_ubuntu-12.04_provisionerless.box"
%w{default metrics}.each do |backend|
(1..2).each do |i|
config.vm.define "be_#{backend}_#{i}".to_sym do |cfg|
last_ip_octet += 1
cfg.vm.hostname = "be-#{backend}-#{i}.#{DOMAIN}"
cfg.vm.network :private_network, :ip => "192.168.33."+last_ip_octet.to_s
cfg.vm.provision :chef_client do |chef|
chef.node_name = "be-#{backend}-#{i}"
chef.add_role "backend_#{backend}"
end
end
end
end
config.vm.provision :shell, :inline => "/usr/bin/apt-get update --fix-missing"
config.vm.define :lb do |cfg|
last_ip_octet += 1
lb_ip = "192.168.33."+last_ip_octet.to_s
cfg.vm.hostname = "lb.#{DOMAIN}"
cfg.vm.network :private_network, :ip => lb_ip
cfg.vm.provision :chef_client do |chef|
chef.node_name = "lb"
chef.add_role "lb"
end
end
end
This utilizes a few vagrant plugins, vagrant-chef-zero, vagrant-berkshelf, and landrush which are one liners each to install. After that, I can type vagrant up # build my stack from scratch
vagrant destroy # destroy my stack
vagrant ssh lb # ssh into the lb instance
vagrant provision # execute chef (puppet, ansible, bash, etc)
Can you show me equivalent code that fulfills all my requirements using VirtualBox directly and will allow me to change a couple lines to spin this same infrastructure up in AWS or using VMWare?Vagrant isn't very good as a piece of software, it's very good as a standard, because it can be used as a standard description of a development environment.
Ok. Let's see the code to do that.
In your About page, please describe the typical USAGE SCENARIOS of your software and how does it help in those cases exactly.
I'm sorry you couldn't find that!
I'm SURE it's a fine tool and I'm just trying to help you communicating it better. :)
Well, it's 2013 and you're on HN. If you don't already know what Vagrant is, then perhaps you're not the most qualified information seeker.
"If you're a developer, Vagrant will isolate dependencies and their configuration within a single ==>disposable<=="
"If you're an operations engineer, Vagrant gives you a ==>disposable<== environment"
All I can infer from the page is that this is a tool for building throwaway/local environments running on VM's on my desktop. But there isn't any context given on how this relates to my production environments, i.e. getting from Vagrant instance to production, there's a disconnect there for me.
Perhaps not, but there's this wonderful tool called Google to help find out more. Also Wikipedia: http://en.wikipedia.org/wiki/Vagrant_(software)
Perhaps if you have enough time to patronise others you could use it more fruitfully to be constructive.
Sure, but where's the fun in that?
In any case, there's the evergreen "using X in production" Google search. Substitute X gor Vagrant and you'll be well on your way of knowing if it's a good idea or not and how to do it.
Whether I SHOULD HAVE known about Vagrant, I'll let you decide. ;)
Sadly, their Docker support is just a provisioner. :( I can do that myself too in a shell script.
To use docker on my mac I have replaced Vagrant with boot2docker (http://github.com/steeve/boot2docker). I didn't need all the moving parts anyway - the VM is always the same, the application-specific bits are all defined inside the containers.
It looks like they're also working on a script to automate this - like a mini-Vagrant but which always boots the same image :)
Anyone aware of an open source alternative to the official VMWare provisioner?
Really? Half as good as the host machine sounds about just fine.
I'm thrilled with how vagrant helps the process locally, but at the same time want to do as little as possible in vagrant because it's not applicable/involved when I provision/manage a box @ Linode or Digital Ocean.
Am I under-utilizing vagrant? Or missing a greater benefit by limiting its role?
Too many things break - it's simply not worth the trouble of upgrading and finding all the gotchas scattered all over the place in my config files and code.
vagrant-spec includes a acceptance suite that we're going to be building up in order to test more of the features in a black box manner. It is slow to run but if we verify that things are passing before a release, we should be able to catch most daily use cases.
Vagrant 1.4 is the first release to run through vagrant-spec and while there are some early bug reports in some fringe areas of Vagrant trickling in, Vagrant seems to be a drop-in upgrade for most users. This shows that it is working, to some extent. And it'll only get better.
Of course, if you're nervous about it, it doesn't hurt to wait for a 1.4.1 or so on.
This is awesome, I can't wait. I've been waiting for this!
Most of my projects right now have had all of their Vagrant plugin dependencies, including Vagrant itself, in the Gemfile because I wanted to make sure any developer could get a workable development environment without worrying too much about Vagrant versions. On one hand I like the fact that I can install up-to-date plugins this way, but on the other hand I just want it to work out of the box.
Although I doubt we'll be able to get away from this. More likely it will cause other frustrations such as needing to override a plugin with a monkey patch, etc.
It's cool to think that the only requirement for anybody to jump into a Gradle project is to have the JDK installed. "git clone <project>", "./gradlew assemble" is all it takes for you to fetch all your dependencies and build the project.
I think it'd be interesting to see if Vagrant could incorporate something like this; it sounds like it would help your use case.
Sounds like a commercial. Many people have good things to say about Gradle's functionality, but too bad about the programming language I have to use with it, i.e. Groovy, at an old 1.x version, with a bloated grammar spec using an old 2.x version of Antlr, i.e. http://svn.codehaus.org/groovy/trunk/groovy/groovy-core/src/...
Too bad I can't use a language with a simplified easy-to-remember grammar, like Scala, to program Gradle.
The latest Gradle release notes http://www.gradle.org/docs/current/release-notes always mention both Groovy and Scala when describing how to build projects, but all the build script example code is in that Groovy language. Will Gradle ever expose an API so developers can choose to use the same language for the build scripts as they do for the projects they're building? Perhaps even ship Gradle with different build language options?
Vagrant made setting that up really easy. In fact, the hardest part was scripting different responses for whether the machine was already up or not, and the new Machine-Readable Output will make that far, far easier.
Thanks for making a great tool better!
I'd honestly just like to use bundler for it, since it's almost certainly better than anything anyone's likely to make to replace it, but using bundler to run vagrant is currently considered bad for some reason and outputs a frightening warning.
Its something that certainly needs to be solved, but I think solutions needs more time to mature in my head as well as others.
Installing the vagrant-chef-zero plugin, for example, is a real PITA because the dependency resolution doesn't deal with a json dependency correctly leading to it or chef zero failing to load unless you install them in a very specific order.
On the other end of the spectrum, when you're writing a Vagrantfile it's technically almost impossible to know what's going to happen when a user starts it up because of all the hooks plugins can throw in, and you can't tell Vagrant not to load a plugin (which would be an incomplete solution anyways, since I can't know what plugins or plugin versions will have bad interactions).
I know you wrote vagrant, so you have a more inside perspective on this, but as a user and occasional plugin writer, it feels like with a gemfile I can specify a state of the world that's considerably less screwed up than the completely random world any given user's install of Vagrant might be.
https://github.com/phinze/homebrew-cask/pull/2027
$ brew update
$ brew cask install vagrant