Giter Site home page Giter Site logo

kitchen-vagrant's Introduction

Kitchen::Vagrant

Gem Version CI

A Test Kitchen Driver for HashiCorp Vagrant.

This driver works by generating a single Vagrantfile for each instance in a sandboxed directory. Since the Vagrantfile is written out on disk, Vagrant needs absolutely no knowledge of Test Kitchen. So no Vagrant plugins are required.

Requirements

Vagrant

Vagrant version of 2.4 or later.

Installation

The kitchen-vagrant driver ships as part of Chef Workstation. The easiest way to use this driver is to use it with Chef Workstation.

If you want to install the driver directly into a Ruby installation:

gem install kitchen-vagrant

If you're using Bundler, simply add it to your Gemfile:

gem "kitchen-vagrant"

... and then run bundle install.

Configuration and Usage

See the kitchen.ci Vagrant Driver Page for documentation on configuring this driver.

Development

Pull requests are very welcome! Make sure your patches are well tested. Ideally create a topic branch for every separate change you make. For example:

  1. Fork the repo
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Added some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

Authors

Created by Fletcher Nichol ([email protected])

License

Apache 2.0 (see LICENSE)

kitchen-vagrant's People

Contributors

akissa avatar arangamani avatar bborysenko avatar cheeseplus avatar clintoncwolfe avatar dependabot-preview[bot] avatar dependabot[bot] avatar fnichol avatar gaelik avatar jhx avatar jkugler avatar kuniwak avatar lamont-granquist avatar legal90 avatar mconigliaro avatar mwrock avatar powerschill avatar robbkidd avatar sethvargo avatar shortdudey123 avatar stromweld avatar tas50 avatar tknerr avatar tmatilai avatar toddiuszho avatar tyler-ball avatar vkarve-chef avatar xmik avatar xorima avatar zuazo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

kitchen-vagrant's Issues

Feature: Make vagrantfile_erb overwriteable using environment variable

regarding: https://github.com/test-kitchen/kitchen-vagrant/blob/master/lib/kitchen/driver/vagrant.rb#L44

It would be nice to be able to globally (e.g. not tied to a single .kitchen.yml setup) specify a custom Vagrantfile-template e.g. using some ENV variable to a custom template.

Reason:
A user may have more system resources and wants generally vagrant to allocate more memory and cpu to improve test-kitchen performance while other users are happy with the default.

Alternatives:
Setting driver values in ~/.kitchen/config.yml

Version string 1.0.0.alpha.2 causes vagrant to throw stack traces

While this does not seem to be an issue when invoked via test-kitchen, attempting to 'vagrant up' a box seems to cause vagrant to spew a stack trace due to the version string.

/opt/vagrant/embedded/lib/ruby/2.0.0/rubygems/version.rb:191:in `initialize': Malformed version number string lxc (ArgumentError)
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:273:in `new'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:273:in `block (2 levels) in find'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:270:in `map'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:270:in `block in find'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:416:in `block in with_collection_lock'
    from /opt/vagrant/embedded/lib/ruby/2.0.0/monitor.rb:211:in `mon_synchronize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:415:in `with_collection_lock'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/box_collection.rb:263:in `find'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/vagrantfile.rb:157:in `block in machine_config'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/vagrantfile.rb:190:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/vagrantfile.rb:190:in `machine_config'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/vagrantfile.rb:45:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:497:in `machine'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/plugin/v2/command.rb:168:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/plugin/v2/command.rb:192:in `call'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/plugin/v2/command.rb:192:in `block in with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/plugin/v2/command.rb:174:in `each'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/plugin/v2/command.rb:174:in `with_target_vms'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/commands/up/command.rb:67:in `block in execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:238:in `block (2 levels) in batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:236:in `tap'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:236:in `block in batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:235:in `synchronize'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:235:in `batch'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/plugins/commands/up/command.rb:58:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/cli.rb:42:in `execute'
    from /opt/vagrant/embedded/gems/gems/vagrant-1.6.2/lib/vagrant/environment.rb:252:in `cli'
    from /opt/vagrant/bin/../embedded/gems/gems/vagrant-1.6.2/bin/vagrant:166:in `<main>'

Enable use of vagrant-cachier plugin

The vagrant-cachier plugin is compelling to speed up test-kitchen runs. We should support its use. Looks like the configuration has to be enabled in the Vagrantfile. I propose driver_config option:

use_vagrant_cachier

It should be true or a hash. If true, use the default configuration from vagrant-cachier (scope and cache type). If a hash, each key would map to one of the cache options in the configuration.

It may be a good idea to default to :machine scope, though, as we're already doing multi-VM for test-kitchen.

No way to set get the "guest" option set in the generated Vagrantfile

I am attempting to use test kitchen to bring up a windows guest. In order for the vagrant-windows plugin to be able to do its job, the "guest" option needs to be set to :windows in the Vagrantfile. For example:

Vagrant.configure("2") do |c|
  c.vm.box = "my_windows_box"
  c.vm.box_url = "http://someplace/my_windows_box.box"
  c.vm.guest = :windows   # <-- Need to set this
  #... more settings
end

I've successfully been able to get a windows VM to come up and for chef to successfully run a recipe that I want to test by hacking my installed copy of kitchen-vagrant to write the guest setting into the Vagrantfile. (I also used the existing use_vagrant_provision: true setting, just in case anyone else comes across this and wonders how I was able to get it to work). As far as I can tell so far, this one small issue is the only thing that would prevent people from being able to use test kitchen with windows guests.

Missing gem version of vagrant

I'm unable to run test-kitchen after installing and initializing it. Seems like vagrant is expected to be installed as a gem.

$ bundle exec kitchen test
-----> Starting Kitchen (v1.1.1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ShellOut::ShellCommandFailed
>>>>>> Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant --version ----
STDOUT:
STDERR: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': vagrant is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/bin/vagrant:22:in `<main>'
---- End output of vagrant --version ----
Ran vagrant --version returned 1
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details

kitchen.log

I, [2014-01-15T13:22:40.114361 #38525]  INFO -- Kitchen: -----> Starting Kitchen (v1.1.1)
E, [2014-01-15T13:22:40.482654 #38525] ERROR -- Kitchen: ------Exception-------
E, [2014-01-15T13:22:40.482875 #38525] ERROR -- Kitchen: Class: Kitchen::ShellOut::ShellCommandFailed
E, [2014-01-15T13:22:40.482996 #38525] ERROR -- Kitchen: Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant --version ----
STDOUT: 
STDERR: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': vagrant is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/bin/vagrant:22:in `<main>'
---- End output of vagrant --version ----
Ran vagrant --version returned 1
E, [2014-01-15T13:22:40.483082 #38525] ERROR -- Kitchen: ---Nested Exception---
E, [2014-01-15T13:22:40.483146 #38525] ERROR -- Kitchen: Class: Mixlib::ShellOut::ShellCommandFailed
E, [2014-01-15T13:22:40.483211 #38525] ERROR -- Kitchen: Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant --version ----
STDOUT: 
STDERR: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/bundler-1.5.2/lib/bundler/rubygems_integration.rb:240:in `block in replace_gem': vagrant is not part of the bundle. Add it to Gemfile. (Gem::LoadError)
    from /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/bin/vagrant:22:in `<main>'
---- End output of vagrant --version ----
Ran vagrant --version returned 1
E, [2014-01-15T13:22:40.483275 #38525] ERROR -- Kitchen: ------Backtrace-------
E, [2014-01-15T13:22:40.483329 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/shell_out.rb:70:in `rescue in run_command'
E, [2014-01-15T13:22:40.483406 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/shell_out.rb:59:in `run_command'
E, [2014-01-15T13:22:40.483458 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/driver/base.rb:158:in `run_command'
E, [2014-01-15T13:22:40.483503 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:127:in `silently_run'
E, [2014-01-15T13:22:40.483547 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:204:in `vagrant_version'
E, [2014-01-15T13:22:40.483590 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:212:in `check_vagrant_version'
E, [2014-01-15T13:22:40.483634 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/kitchen-vagrant-0.14.0/lib/kitchen/driver/vagrant.rb:100:in `verify_dependencies'
E, [2014-01-15T13:22:40.483678 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/driver.rb:45:in `for_plugin'
E, [2014-01-15T13:22:40.483722 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:124:in `new_driver'
E, [2014-01-15T13:22:40.483765 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:130:in `new_instance'
E, [2014-01-15T13:22:40.483809 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:73:in `block in build_instances'
E, [2014-01-15T13:22:40.483852 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:72:in `map'
E, [2014-01-15T13:22:40.483896 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:72:in `with_index'
E, [2014-01-15T13:22:40.483940 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:72:in `build_instances'
E, [2014-01-15T13:22:40.484015 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/config.rb:52:in `instances'
E, [2014-01-15T13:22:40.484067 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/cli.rb:342:in `get_filtered_instances'
E, [2014-01-15T13:22:40.484118 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/cli.rb:327:in `parse_subcommand'
E, [2014-01-15T13:22:40.484167 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/cli.rb:141:in `block in test'
E, [2014-01-15T13:22:40.484216 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/2.1.0/benchmark.rb:279:in `measure'
E, [2014-01-15T13:22:40.484262 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/cli.rb:137:in `test'
E, [2014-01-15T13:22:40.484307 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/command.rb:27:in `run'
E, [2014-01-15T13:22:40.484350 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/invocation.rb:120:in `invoke_command'
E, [2014-01-15T13:22:40.484398 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/cli.rb:288:in `invoke_task'
E, [2014-01-15T13:22:40.484443 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor.rb:363:in `dispatch'
E, [2014-01-15T13:22:40.484487 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/thor-0.18.1/lib/thor/base.rb:439:in `start'
E, [2014-01-15T13:22:40.484531 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/bin/kitchen:13:in `block in <top (required)>'
E, [2014-01-15T13:22:40.484576 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/lib/kitchen/errors.rb:81:in `with_friendly_errors'
E, [2014-01-15T13:22:40.484619 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/gems/test-kitchen-1.1.1/bin/kitchen:13:in `<top (required)>'
E, [2014-01-15T13:22:40.484663 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/bin/kitchen:23:in `load'
E, [2014-01-15T13:22:40.484706 #38525] ERROR -- Kitchen: /usr/local/Cellar/ruby/2.1.0/lib/ruby/gems/2.1.0/bin/kitchen:23:in `<main>'
E, [2014-01-15T13:22:40.484749 #38525] ERROR -- Kitchen: ----------------------

Gemfile

source 'https://rubygems.org'

gem 'berkshelf'

group :ci do
  gem 'rubocop'
  gem 'foodcritic'
  gem 'test-kitchen'
  gem 'kitchen-vagrant'
end

Run `vagrant plugin bundle` if `plugins.json` is present (a.k.a. support bindler)

https://github.com/fgrehm/bindler is awesome because it manages the vagrant plugins on a per project level via a plugins.json file, rather than installing them into the global vagrant installation.

A sample plugins.json file looks like that:

[
  {"vagrant-omnibus": "1.1.1"},
  {"vagrant-cachier": "0.3.3"},
  {"vagrant-berkshelf": "1.3.3"}
]

Now you can run vagrant plugin bundle and it would install the above plugins into the project-local .vagrant directory.

It would be awesome if kitchen-vagrant would support bindler by running vagrant plugin bundle when a plugins.json file is present

Allow different Berksfile location

Currently The Berksfile is hardcoded to 'Berksfile' in kitchen_root. Vagrant allows to configure it via c.berkshelf.berksfile_path. Would be great if kitchen-vagrant could expose this configuration.

require_chef_omnibus is ignored

Folks,

we are currently moving to test-kitchen 1.x and have some issues with the vagrant driver. Specifically, the require_chef_omnibus configuration switch is ignored.

I checked the sources and, although this had been fixed in #4 already, it seems the parameter is never read neither used.

Did I go wrong somewhere, or was this feature lost during an ominous Git merge?

Thanks,
Alexander

Vagrant & Bundler 1.6

Vagrant is not ready to work with bundler 1.6 yet. See issue #3451 for more info. When vagrant is used with bundler 1.6 in a bundle environment, it crashes with the following message:

C:/Local/Vagrant/1.5.2/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/bundler.rb:38:in `init!': undefined method `new' for Bundler::UI:Module (NoMethodError)
        from C:/Local/Vagrant/1.5.2/embedded/gems/gems/vagrant-1.5.2/lib/vagrant/pre-rubygems.rb:22:in `<main>'

However, when using bundler 1.6 and kitchen-vagrant, the following error is reported instead:

>>>>>> ------Exception-------
>>>>>> Class: Kitchen::UserError
>>>>>> Message: Detected an old version of Vagrant (). Please upgrade to version 1.1.0 or higher from http://downloads.vagrantup.com/.
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Which is quite misleading. Checking the exit code would be a good improvement but I'm not sure it "feasible" in this environment. I'm reporting mainly so other users can find it when faced with such message. Feel free to close issue if won't fix.

And thank you for test-kitchen in general.

Regards,
Matt

Support for provisioning Windows guests

With PR #52 the option to use the vagrant provisioner was removed. Hence it's no longer possible to provsion and therefore test Windows guests, unless you have SSH installed on that machine.

I wasn't able to find any reason for removing the vagrant provisioner. What was the cause? Are there any plans to support WinRM instead of SSH?

I'd really like to test my recipes for Windows with test-kitchen, but right now I'm simply not able to. :(

TIA

Thorsten

Forward multiple ports?

previously,

driver_config:
  forward_port:
    - [4444, 4444]
    - [5555, 5555]

would forward both ports.

I expected something like

driver_config:
  network:
    forwarded_port:
      - { guest: 5555, host: 5555}
      - { guest: 4444, host: 4444}

or

driver_config:
  network:
   - forwarded_port:
       guest: 5555
       host: 5555
   - forwarded_port:
       guest: 4444
       host: 4444

to work, but it produces things like

c.vm.network(:[:forwarded_port, [{:guest=>4444, :host=>4444}]], )

Support arbitrary code injection into Vagrantfile

I'd like to be able to put some code into the Vagrantfile when it is generated.

E.g.

driver_config:
  extra: >
    config.cache.enable :chef

Then, in the Vagrantfile, at the bottom:

<% if config[:extra] %>
 <%= config[:extra] %>
<% end %>

My end goal here is to enable vagrant-cachier to hook into Chef's file cache path, but there may be other useful applications.

berkshelf support lost

There was a pull request to get the berkshelf key in. #15
Then I think the way the vagrant file was written out was changed to an ERB and it was lost? Can we get

config.berkshelf.enabled = true

back into the file if Berksfile is present?

Thanks!

Fixed domain vagrantup.com for any provisioned VM

Hi, don't you think using a fixed domain is a wrong practice or was there a reason for it? Link https://github.com/test-kitchen/kitchen-vagrant/blob/master/lib/kitchen/driver/vagrant.rb#L48

Actualy I am not sure with the way to fix it. I proppose to have an option to set it from the attributes: section in .kitchen.yml if defined. Another way make it fit with the cookbooks that configure hostname/domain (like: cookbook https://github.com/xhost-cookbooks/system) or provide a configuration that allow mapping a kitchen attribute to their.

Why it matters:
I find my provisionings to stuck at some point during first round, due the bug in chef or ohai that do not reload properly the attributes and returns old values, it tries to find node['domain'] that equals to vagrantup.com however it was on the filesystem updated to my custom domain through the "system" cookbook.

test-kitchen fails when vagrant 1.7 inserted a newly generated key

vogl ~/Development/itb-chef/cookbooks/zabbix $ kitchen create
-----> Starting Kitchen (v1.2.1)
-----> Creating <default-centos-7>...
       Bringing machine 'default' up with 'vmware_fusion' provider...
       ==> default: Cloning VMware VM: 'company/centos7'. This can take some time...
       ==> default: Checking if box 'company/centos7' is up to date...
       ==> default: Verifying vmnet devices are healthy...
       ==> default: Preparing network adapters...
       ==> default: Fixed port collision for 22 => 2222. Now on port 2200.
       ==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...           default: SSH address: 172.16.171.130:22
           default: SSH username: vagrant
           default: SSH auth method: private key
           default: 
           default: Vagrant insecure key detected. Vagrant will automatically replace
           default: this with a newly generated keypair for better security.
           default: 
           default: Inserting generated public key within guest...
           default: Removing insecure key from the guest if its present...
           default: Key inserted! Disconnecting and reconnecting using new SSH key...
[email protected]'s password:       Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
       ==> default: Stopping the VMware VM...
       ==> default: Deleting the VM...
/Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/prompt.rb:73:in `prompt': undefined method `chomp' for nil:NilClass (NoMethodError       )
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:57:in `ask_password'
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:22:in `authenticate'
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:79:in `block in authenticate'
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `each'
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `authenticate'
         from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh.rb:211:in `start'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:382:in `block (2 levels) in connect'
         from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:361:in `block in connect'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/retryable.rb:17:in `retryable'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:360:in `connect'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:125:in `ready?'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:186:in `ready?'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:65:in `block in wait_for_ready'
         from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:42:in `wait_for_ready'
         from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #create action: [Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider=vmware_fusion ----
STDOUT: Bringing machine 'default' up with 'vmware_fusion' provider...
==> default: Cloning VMware VM: 'company/centos7'. This can take some time...
==> default: Checking if box 'company/centos7' is up to date...
==> default: Verifying vmnet devices are healthy...
==> default: Preparing network adapters...
==> default: Fixed port collision for 22 => 2222. Now on port 2200.
==> default: Starting the VMware VM...
==> default: Waiting for machine to boot. This may take a few minutes...
    default: SSH address: 172.16.171.130:22
    default: SSH username: vagrant
    default: SSH auth method: private key
    default: 
    default: Vagrant insecure key detected. Vagrant will automatically replace
    default: this with a newly generated keypair for better security.
    default: 
    default: Inserting generated public key within guest...
    default: Removing insecure key from the guest if its present...
    default: Key inserted! Disconnecting and reconnecting using new SSH key...
[email protected]'s password:==> default: Stopping the VMware VM...
==> default: Deleting the VM...
STDERR: Text will be echoed in the clear. Please install the HighLine or Termios libraries to suppress echoed text.
/Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/prompt.rb:73:in `prompt': undefined method `chomp' for nil:NilClass (NoMethodError)
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:57:in `ask_password'
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/methods/password.rb:22:in `authenticate'
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:79:in `block in authenticate'
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `each'
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh/authentication/session.rb:66:in `authenticate'
  from /Users/vogl/.vagrant.d/gems/gems/net-ssh-2.9.2/lib/net/ssh.rb:211:in `start'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:382:in `block (2 levels) in connect'
  from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:361:in `block in connect'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/util/retryable.rb:17:in `retryable'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:360:in `connect'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:125:in `ready?'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:186:in `ready?'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:65:in `block in wait_for_ready'
  from /opt/vagrant/embedded/lib/ruby/2.0.0/timeout.rb:66:in `timeout'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/plugins/communicators/ssh/communicator.rb:42:in `wait_for_ready'
  from /opt/vagrant/embedded/gems/gems/vagrant-1.7.2/lib/vagrant/action/builtin/wait_for_communicator.rb:16:in `block in call'
---- End output of vagrant up --no-provision --provider=vmware_fusion ----
Ran vagrant up --no-provision --provider=vmware_fusion returned 1]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Allow insecure option to download vagrant boxes from self-signed URLs

In my work environment, our VM templates and vagrant boxes live on an Artifactory server with a self-signed certificate. In order to get Vagrant to successfully download the boxes from the given box_url, we need to set box_download_insecure = true in the generated Vagrantfile which kitchen uses.

[Feature Request] Updating vagrant box

Hi,

I'd like to implement updating a vagrant box automatically if a newer one exists.

       ==> default: have version '1.1.0'. The latest is version '1.1.1'. Run
       ==> default: `vagrant box update` to update.

It could look like:

driver_config:
      box: example/centos6
      box_url: http://example.com/centos6.json
      version: <version>

version may be "latest" or an optionally prefixed (>, <, ~>, >=, <=) version description.

What do you think?

Please Create New Release for better Vagrant 1.6+ Compatibility

Just stumbled across hard to track down ssh connection timeouts while trying to get kitchenci run on a Hyper-V build worker.

I was under the definitive impression that I was using a 32-bit box. My .kitchen.yml here:

driver_plugin: vagrant
platforms:
- name: ubuntu-12.04
  driver_config:
    box: chef/ubuntu-12.04-i386

However, as of 0.15.0 the default_box_url is ALWAYS generated:
https://github.com/test-kitchen/kitchen-vagrant/blob/v0.15.0/lib/kitchen/driver/vagrant.rb#L108-114

In my case it would use the platform.instance.name as a basis and thus I was getting the 64 bit box rahter than the chef/ubuntu-12.04-i386 box I specified in the driver config.

In master there is a fix to make the above example work as expected with Vagrant 1.6+ where only the box name is needed:
https://github.com/test-kitchen/kitchen-vagrant/blob/master/lib/kitchen/driver/vagrant.rb#L115-L116

It would be awesome if this would go into a kitchen-vagrant release, since vagrant 1.6 is out for quite a while already. Any plans for the next (0.16.0?) release already?

License missing from gemspec

Some companies will only use gems with a certain license.
The canonical and easy way to check is via the gemspec,

via e.g.

spec.license = 'MIT'
# or
spec.licenses = ['MIT', 'GPL-2']

Even for projects that already specify a license, including a license in your gemspec is a good practice, since it is easily
discoverable there without having to check the readme or for a license file. For example, it is the field that rubygems.org uses to display a gem's license.

For example, there is a License Finder gem to help companies ensure all gems they use
meet their licensing needs. This tool depends on license information being available in the gemspec. This is an important enough
issue that even Bundler now generates gems with a default 'MIT' license.

If you need help choosing a license (sorry, I haven't checked your readme or looked for a license file), github has created a license picker tool.

In case you're wondering how I found you and why I made this issue, it's because I'm collecting stats on gems (I was originally looking for download data) and decided to collect license metadata,too, and make issues for gemspecs not specifying a license as a public service :).

I hope you'll consider specifying a license in your gemspec. If not, please just close the issue and let me know. In either case, I'll follow up. Thanks!

p.s. I've written a blog post about this project

http_proxy does not work in some cases like remote_file

Hi there.

Looks like there are scenarios where http_proxy does not quiet work as mentioned in #6 ...

The cookbook I am working on is downloading a large binary file (200+ megs) and remote_file is used to download it from the website (sample url: http://www.atlassian.com/software/confluence/downloads/binary/atlassian-confluence-5.4.4-x64.bin). The code is as follows:

remote_file "#{Chef::Config[:file_cache_path]}/atlassian-confluence-#{node['confluence']['version']}-#{node['confluence']['arch']}.bin" do
  source node['confluence']['url']
  checksum node['confluence']['checksum']
  mode '0755'
  action :create_if_missing
end

I am using polipo and the Auto HTTP Caching Spike from @fnichol (nice work :) ) to run test-kitchen on an ubuntu-1204, but polipo's cache is not used for the file. It is used by apt installs in cookbooks les mysql or apache2, or other types of downloads like in the java cookbook, but not for the remote_file.

I tried with Vagrant. I adapted the spike to use in on the Vagrantfile in conjonction with vagrant-proxyconf:

  if proxy_running?
    if Vagrant.has_plugin?("vagrant-proxyconf")
      puts http_proxy_url
      puts "from Vagrantfile"
      config.proxy.http     = "#{http_proxy_url}/"
      config.proxy.https     = "#{http_proxy_url}/"
      config.proxy.no_proxy = "localhost,127.0.0.1"
    end
  end

There, caching works and the file is downloaded in no time.

I have also tried to port this for use with test-kitchen using the vagrantfile_erb config to have the same vagrant file used. Caching still does not take place for remote_file.

Any clues?

Unable to Re-start/converge Saved Virtual Boxes

Hello,

I've been using test kitchen to converge multiple virtual box instances, but whenever I close or power off my laptop, the VirtualBoxes are sent into a "Saved" state, and after that happens Kitchen is no longer able to restart them, converge them, verify them, etc.

Is there any way to 'restart' a VirtualBox after it's moved to this Saved state via Kitchen?

Here is the output of a example converge:

$ kitchen converge default-centos-510
-----> Starting Kitchen (v1.2.1)
-----> Converging <default-centos-510>...
       Preparing files for transfer
       Resolving cookbook dependencies with Berkshelf 3.1.4...
       Removing non-cookbook files before transfer
       [SSH] connection failed, retrying (#<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 2201>)
       [SSH] connection failed, retrying (#<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 2201>)
$$$$$$ [SSH] connection failed, terminating (#<Errno::ECONNREFUSED: Connection refused - connect(2) for "127.0.0.1" port 2201>)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ActionFailed
>>>>>> Message: Failed to complete #converge action: [Connection refused - connect(2) for "127.0.0.1" port 2201]
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Question: option to reload vm

Sometimes it is needed to reload the vm to apply changes made in driver_config(memory, cpu, synced folders).

Temporarily $ (cd .kitchen/.kitchen/kitchen-vagrant/{box_name}/ && vagrant reload) works.

Is there a way to do this through kitchen command?

It not, is this planned to be added in later versions?
Maybe the plugin could reload VM when Vagrantfile was updated on kitchen converge. That would seem the most natural to me.

incompatible version of thor w/ berkshelf

Gemfile:

source "https://rubygems.org"

gem 'berkshelf', :group => :integration
gem 'test-kitchen', :group => :integration
gem 'kitchen-vagrant', :group => :integration
% bundle install
Fetching gem metadata from https://rubygems.org/........
Fetching gem metadata from https://rubygems.org/..
Resolving dependencies...
Bundler could not find compatible versions for gem "thor":
  In Gemfile:
    berkshelf (>= 0) ruby depends on
      thor (~> 0.15.2) ruby

    kitchen-vagrant (>= 0) ruby depends on
      thor (0.17.0)

default to vagrant cloud bento box names supported since vagrant/1.5

It would be nice in a post @opscode era to simply default to @chef vagrant cloud box names (with Vagrant >= 1.5.0 detection) to avoid redundant downloads using the same box in a plain Vagrant context (without test kitchen).

Current workaround is to specify the vagrant cloud box name, e.g.:

platforms:
  - name: centos-6.5
    driver:
      box: chef/centos-6.5

This way the related https://opscode-vm-bento.s3.amazonaws.com/vagrant/virtualbox/opscode_centos-6.5_chef-provisionerless.box is only downloaded once (see also https://vagrantcloud.com/chef/centos-6.5).

Verify that e.g. only $VAGRANT_HOME/boxes/chef-VAGRANTSLASH-centos-6.5/ base box cache dir exists (and no redundant opscode-centos-6.5 one).

Allow disks to be created and attached for virtualbox

When using virtual box, would be nice to allow additional storage to be easily created and/or attached to a vm. Something like this:

driver:
name: vagrant
attached_disks:
- ["sdb.vdi", "500", "1", "0", "hdd"]

Would allow for a persistent disk image to be used easily in all test environments.

Query on .kitchen.yml location and cookbook path

Hi,

I am trying to use kitchen-vagrant plugin however I am not sure wheres its picking up the cookbook path from.

So when running the kitchen test command everything seems to be fine but how do you set it to match the location of the cookbooks that is being set in vagrant.

For example I am setting the cookbook path from my local folder to a vagrant_data folder.

Does the .kitchen.yml file have to be in the cookbook root directory to run?

Investigate nil'ing out undesired `:customize` attributes

Here is an abbreviated example:

A .kitchen.yml:

---
driver:
  name: vagrant
  provider: vmware_fusion
  customize:
    numvcpus: 2
    memsize: 2048

and a .kitchen.local.yml:

---
driver:
  name: vagrant
  provider: virtualbox
  customize:
    cpus: 2
    memsize: 2048

This leads to a combined configuration of:

---
driver:
  name: vagrant
  provider: virtualbox
  customize:
    cpus: 2
    numvcpus: 2
    memsize: 2048

And passing numvcups into the VirtualBox provider configuration won't work (it's a VMware configuration attribute).

One possible solution could be to "nill out" undersired values in the :customize block like so (using the .kitchen.local.yml example from above):

---
driver:
  name: vagrant
  provider: virtualbox
  customize:
    cpus: 2
    numvcpus: nil
    memsize: 2048

The result would cause the Vagrantfile to drop the numvcpus attribute and lead to a workable configuration.

This may not be ideal, and there could be legitimate reasons for setting a nil value which is why it deserves a touch of exploration first. Anyway, parking this here ๐Ÿ˜‰

Is there a way to specify a Vagrant's plugin setting? For ex. config.vbguest.auto_update = false

Is there a way to specify a Vagrant's plugin setting?

I'm using the vagrant-vbguest plugin, which tries to update VirtualBox Guest Additions everytime the machine is booted... I'd like to disable it while running kitchen, is it possible? Or I should remove the plugin altogether?

For ex.

Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
  config.vbguest.auto_update = false
end

Docs: relative path synced folders

Did not see this one documented well enough, but relative paths in synced folders are relative to Vagrantfile (.kitchen/kitchen-vagrant/{box_name}/) and not to .kitchen.yml path.

There is a VAGRANT_CWD mentioned in the docs. That may simplify configuration using paths relative to .kitchen.yml as this is where it gets defined.

bug with vagrant 1.5

$ bu
Fetching gem metadata from https://rubygems.org/.......
Fetching additional metadata from https://rubygems.org/..
Resolving dependencies...
Using rake 10.1.1
Using addressable 2.3.5
Using ast 1.1.0
Using multipart-post 1.2.0
Using faraday 0.8.9
Using berkshelf-api-client 1.1.1
Using buff-extensions 0.5.0
Using hashie 2.0.5
Using varia_model 0.3.2
Using buff-config 0.4.0
Using buff-ruby_engine 0.1.0
Using buff-shell_out 0.1.1
Using minitar 0.5.4
Using sawyer 0.5.3
Using octokit 2.7.2
Using retryable 1.3.5
Using buff-ignore 1.1.1
Using timers 1.1.0
Using celluloid 0.15.2
Using nio4r 1.0.0
Using celluloid-io 0.15.0
Using erubis 2.7.0
Using json 1.8.1
Using mixlib-log 1.6.0
Using mixlib-authentication 1.3.0
Using net-http-persistent 2.9.4
Using solve 0.8.2
Using ridley 2.5.1
Using thor 0.18.1
Using berkshelf 3.0.0.beta5
Using builder 3.2.2
Using moneta 0.6.0
Using rack 1.5.2
Using chef-zero 1.7.3
Using diff-lcs 1.2.5
Using highline 1.6.21
Using mime-types 1.25.1
Using mixlib-cli 1.4.0
Using mixlib-config 2.1.0
Using mixlib-shellout 1.3.0
Using net-ssh 2.8.0
Using net-ssh-gateway 1.2.0
Using net-ssh-multi 1.2.0
Using ipaddress 0.8.0
Using systemu 2.5.2
Using yajl-ruby 1.1.0
Using ohai 6.20.0
Using coderay 1.1.0
Using method_source 0.8.2
Using slop 3.5.0
Using pry 0.9.12.6
Using puma 1.6.3
Using rest-client 1.6.7
Using chef 11.10.4
Using fauxhai 2.1.0
Using rspec-core 2.14.8
Using rspec-expectations 2.14.5
Using rspec-mocks 2.14.6
Using rspec 2.14.1
Using chefspec 3.4.0
Using excon 0.32.1
Using formatador 0.2.4
Using net-scp 1.1.2
Using fog-core 1.21.1
Using multi_json 1.9.0
Using fog-json 1.0.0
Using fog-brightbox 0.0.1
Using nokogiri 1.5.11
Using fog 1.21.0
Using gherkin 2.11.8
Using polyglot 0.3.4
Using treetop 1.4.15
Using foodcritic 3.0.3
Using safe_yaml 1.0.1
Using test-kitchen 1.2.1
Using kitchen-ec2 0.8.0
Using kitchen-vagrant 0.14.0
Using parser 2.1.7
Using powerpack 0.0.9
Using rainbow 2.0.0
Using ruby-progressbar 1.4.2
Using rubocop 0.19.1
Using unf_ext 0.0.6
Using unf 0.1.3
Using bundler 1.6.0.rc2
Your bundle is updated!

$ be kitchen test dev-ubuntu-1204
-----> Starting Kitchen (v1.2.1)
>>>>>> ------Exception-------
>>>>>> Class: Kitchen::ShellOut::ShellCommandFailed
>>>>>> Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant --version ----
STDOUT:
STDERR: /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/bundler.rb:31:in `initialize': undefined method `new' for Bundler::UI:Module (NoMethodError)
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/bundler.rb:17:in `new'
    from /Applications/Vagrant/embedded/gems/gems/vagrant-1.5.1/lib/vagrant/bundler.rb:17:in `instance'
    from /Applications/Vagrant/bin/../embedded/gems/gems/vagrant-1.5.1/lib/vagrant/pre-rubygems.rb:22:in `<main>'
---- End output of vagrant --version ----
Ran vagrant --version returned 1
>>>>>> ----------------------
>>>>>> Please see .kitchen/logs/kitchen.log for more details
>>>>>> Also try running `kitchen diagnose --all` for configuration

Add support for provision_command

The kitchen-docker driver has a 'provision_command' attribute that allows you to specifically set the command executed when provisioning the Chef client. This is much more flexible than just setting the URL for the script and would really help those of us trapped behind a corporate firewall.

Add ability to append to default Vagrantfile

I'm willing to implement this feature if there's value seen.

Users may be interested in making simple additions to the default Vagrantfile template, while avoiding having to track and reproduce all of its content or risk breaking functionality. I propose a config option to accept some arbitrary Vagrantfile keys and values that will be appropriately appended to the template, thus providing an additional degree of customization without a significant amount of complexity required.

Only modifyvm parameter customizable

My existing Vagrantfile contains this:

config.vm.provider :virtualbox do |vb|
  vb.customize ["modifyvm", :id, "--memory", 1024]
  vb.customize ['createhd', '--filename', diskfile1, '--size', 32 *1024]
  vb.customize ['createhd', '--filename', diskfile2, '--size', 32 *1024]
  vb.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 1, '--device', 0, '--type', 'hdd', '--medium', diskfile1 + '.vdi']
  vb.customize ['storageattach', :id, '--storagectl', 'SATAController', '--port', 2, '--device', 0, '--type', 'hdd', '--medium', diskfile2 + '.vdi']
end

I can't see any way to pass this to kitchen-vagrant. The docs say that "Each key/value pair will be passed to your providers customization block" however, in the example, modifyvm isn't passed. It's implied.

synced folder example in readme.md has a syntax error

The current documentation for synced folders in readme.md shows this example:

driver:
  synced_folders: 
    - ["data/%{instance_name}", "/opt/instance_data"],
    - ["/host_path", "/vm_path", "create: true, type: :nfs"]

The comma at the end of the first synced folder line is invalid and will produce a syntax error.

Consider recommending vagrant-wrapper RubyGem in README

At present there's a recommendation in the README that the older vagrant gem may need removed if there's a versioning problem due to PATH issues. Consider as an alternative recommending using the "vagrant-wrapper" RubyGem, either manually gem install vagrant-wrapper or via a Gemfile.

It prioritizes packaged versions of Vagrant in new projects, without breaking legacy projects which still require the vagrant gem. No code changes are required, so long as the wrapper is installed and the given project does not list the old vagrant gem via its Gemfile (or doesn't have a Gemfile).

The 1.0.7 gem gets reinstalled so easily by bundled projects, and many people are still preferring Gemfile's, even though there's a push to eliminate them in Kitchen projects now. So it can be a nice workaround to needing to keep uninstalling the old gem.

kitchen-vagrant fails to prepare platform properly - Berksfile missing?

vagrant -v => Vagrant 1.6.5
virtualbox => 4.3.12

berkshelf configuration:
* No Berksfile was found at /Users/jakeplimack/chef/cookbooks/showmobile-messaging/.kitchen/kitchen-vagrant/default-debian-74/Berksfile.
---- End output of vagrant up --no-provision --provider=virtualbox ----
Ran vagrant up --no-provision --provider=virtualbox returned 1]
D      ---Nested Exception---
D      Class: Kitchen::ShellOut::ShellCommandFailed
D      Message: Expected process to exit with [0], but received '1'
---- Begin output of vagrant up --no-provision --provider=virtualbox ----
STDOUT: Bringing machine 'default' up with 'virtualbox' provider...
STDERR: There are errors in the configuration of this machine. Please fix
the following errors and try again:

berkshelf configuration:
* No Berksfile was found at /Users/jakeplimack/chef/cookbooks/showmobile-messaging/.kitchen/kitchen-vagrant/default-debian-74/Berksfile.
---- End output of vagrant up --no-provision --provider=virtualbox ----
Ran vagrant up --no-provision --provider=virtualbox returned 1

New release please

Hi maintainers. Can we please get a new release of this gem? Seeing some incompatibility with newer versions of Vagrant on the latest released version that have been fixed on master.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.