Step 1: Move vm scripts to the right place
[integration/test.git] / tools / wcbench / Vagrantfile
1 VAGRANTFILE_API_VERSION = "2"
2
3 # The WCBench README describes how to use Vagrant for WCBench work
4 # See: https://github.com/dfarrell07/wcbench#user-content-detailed-walkthrough-vagrant
5
6 Vagrant.configure(VAGRANTFILE_API_VERSION) do |config|
7     # Build Vagrant box based on Fedora 20
8     config.vm.box = "chef/fedora-20"
9
10     # Configure VM RAM and CPU
11     config.vm.provider "virtualbox" do |v|
12       v.memory = 2048
13       v.cpus = 4
14     end
15
16     # This allows sudo commands in wcbench.sh to work
17     config.ssh.pty = true
18
19     # Unexpectedly, /usr/local/bin isn't in the default path
20     # The cbench and oflops binary install there, need to add it
21     config.vm.provision "shell", inline: "echo export PATH=$PATH:/usr/local/bin >> /home/vagrant/.bashrc"
22     config.vm.provision "shell", inline: "echo export PATH=$PATH:/usr/local/bin >> /root/.bashrc"
23
24     # Drop code in /home/vagrant/wcbench, not /vagrant
25     config.vm.synced_folder ".", "/vagrant", disabled: true
26     config.vm.synced_folder ".", "/home/vagrant/wcbench"
27
28     # Install OpenDaylight and CBench with verbose output
29     config.vm.provision "shell", inline: 'su -c "/home/vagrant/wcbench/wcbench.sh -vci" vagrant'
30 end