Open damphyr opened 8 years ago
I am discovering the missing plugins one by one and cursing you all the way... :P
Also, berkshelf fails spectacularly on my OS X installation with convoluted git related errors, which is a big bummer.
Could this be partly solved with the following snippet?
required_plugins = %w( vagrant-omnibus, vagrant-berkshelf )
required_plugins.each do |plugin| system "vagrant plugin install #{plugin}" unless Vagrant.has_plugin? plugin end
Probably :)
@SvenBayer there is a whole thread on this issue where Vagrant is missing something like a Gemfile to automatically install missing plugins, with all kinds of more or less sophisticated workarounds ;-) https://github.com/mitchellh/vagrant/issues/1874
It's really sad that this mechanism is still not in yet :-(
@damphyr haha, rememeber our vagrant-plugin-bundler nightly hack session from 2 years ago at the camp?! :-)))
On the plugin dependencies: I wanted to save on the additional code for installing missing plugins and intended to "document" the plugin requirements here in the Vagrantfile. Also I wouldn't want a vagrant up
to install new plugins as a side effect, because plugins are global and would possibly break my other vagrant projects.
My way of dealing with that in projects is to distribute a "DevPack" like bills-kitchen for windows users, or a VM like linus-kitchen for linux users. Then I only refer to "needs (bills|linus)-kitchen version X.Y.Z)" in the README (which is clearly missing here -- sorry for that...). Also, there is no steves-kitchen yet Vassilis ;-)
Finally, I was already tempted to remove the Vagrantfile
for exactly the problems you are having now. You don't even need it as you can do the very same things using test-kitchen too, it's just a slighly different syntax:
It still uses the vagrant driver, but does not need any additional plugins (test-kitchen handles the installation of the omnibus chef client and also runs berkshelf on its own)
Last but not least: in the context of the new Policyfiles feature berkshelf will eventually get replaced by a pure ruby based dependency solver (= no need to compile libgecode on bundle install
which takes forever), but not sure when this is going to happen.
It would be super interesting for us (topic team) to take a look at the Policyfiles, but right now it seems not mainstream enough to me yet to replace berkshelf (e.g. there is no vagrant-policyfiles plugin yet, not sure if it works in a chef-serverless workflow, etc...)
Berkshelf is used but a standard Vagrant installation (e.g. brew install vagrant on OS X) does not have the plugin installed. This results in