Using a Master Slave setup with Jenkins.
Slave server hosts vagrant and VBox for creation of instant boxes.
Enabling vagrant plugin in jenkins, and pointing to Slave server for triggering vagrant boot. In the slave setup, jenkins checks out the vagrant file into the remote workspace only.
It is found that the vagrant plugin looks for a Vagrantfile in the local workspace rather than looking for it in the Slave workspace. So when this plugin is used for booting, it complains with
Building remotely on jenkins_slave_1 in workspace /var/lib/jenkins/workspace/demo
Cleaning local Directory .
Checking out http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386
A Vagrantfile
At revision 73
There is no Vagrantfile in your workspace!
We looked in: /var/lib/jenkins/workspace/demo
Finished: NOT_BUILT
Once I created a workspace in local workspace, it fails with
Building remotely on jenkins_slave_1 in workspace /home/aristocrat/workspace/demo
Cleaning local Directory .
Checking out http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386
A Vagrantfile
At revision 74
no change for http://192.168.3.49/svn/training/box10/vagrant-vm-ubuntu-i386 since the previous build
Running Vagrant with version: 1.0.2.dev
Vagrantfile loaded, bringing Vagrant box up for the build
FATAL: (VirtualBoxNotDetected) Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.
org.jruby.exceptions.RaiseException: (VirtualBoxNotDetected) Vagrant could not detect VirtualBox! Make sure VirtualBox is properly installed.
Vagrant uses the `VBoxManage` binary that ships with VirtualBox, and requires
this to be available on the PATH. If VirtualBox is installed, please find the
`VBoxManage` binary and add it to the PATH environmental variable.
at Vagrant::Driver::VirtualBox.initialize(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/driver/virtualbox.rb:40)
at Vagrant::VM.reload!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/vm.rb:129)
at Vagrant::VM.initialize(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/vm.rb:35)
at Vagrant::Environment.load_vms!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:434)
at org.jruby.RubyArray.each(org/jruby/RubyArray.java:1612)
at Vagrant::Environment.load_vms!(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:433)
at Vagrant::Environment.vms(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:125)
at Vagrant::Environment.multivm?(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:158)
at Vagrant::Environment.vms_ordered(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:133)
at Vagrant::Command::Base.with_target_vms(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/command/base.rb:91)
at Vagrant::Command::Up.execute(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/command/up.rb:24)
at Vagrant::CLI.execute(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/cli.rb:38)
at Vagrant::Environment.cli(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/bundler/gems/vagrant-8a5b1ad0d1ef/lib/vagrant/environment.rb:167)
at Vagrant::BasicWrapper.setup(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/models/vagrant_wrapper.rb:67)
at Jenkins::Model::EnvironmentProxy::InstanceMethods.setUp(/var/lib/jenkins/plugins/vagrant/WEB-INF/classes/vendor/gems/jruby/1.8/gems/jenkins-plugin-runtime-0.1.26/lib/jenkins/model/environment_proxy.rb:7)