FrameworkSetup: increase timeout
[csit.git] / resources / tools / vagrant / Vagrantfile
1 # -*- mode: ruby -*-
2 # vi: set ft=ruby :
3
4 Vagrant.configure("2") do |config|
5
6     # Configure cached packages to be shared between instances of the
7     # same base box.
8     if Vagrant.has_plugin?("vagrant-cachier")
9         config.cache.scope = :box
10     end
11
12     # Configure proxy if needed.
13     if Vagrant.has_plugin?("vagrant-proxyconf")
14         config.proxy.http     = "http://192.168.0.2:3128/"
15         config.proxy.https    = "http://192.168.0.2:3128/"
16         config.proxy.ftp      = "http://192.168.0.2:3128/"
17         config.proxy.no_proxy = "localhost,127.0.0.1"
18     end
19
20     # Configure testing network interfaces (tg).
21     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link1", nic_type: "82545em", mac: "0800270fe04d"
22     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link2", nic_type: "82545em", mac: "08002761f7ad"
23     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link3", nic_type: "82545em", mac: "080027dc5da4"
24
25     # Configure testing network interfaces (sut).
26     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link1", nic_type: "82545em", mac: "080027385e58"
27     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link2", nic_type: "82545em", mac: "080027e3f542"
28     config.vm.network :private_network, type: "dhcp", auto_config: false, virtualbox__intnet: "link3", nic_type: "82545em", mac: "0800274f7c63"
29
30     # Provision the box using ansible local (no Ansible installation needed
31     # on host).
32     config.vm.provision "ansible_local" do |ansible|
33         ansible.version = "latest"
34         ansible.compatibility_mode = "2.0"
35         ansible.become = true
36         ansible.verbose = false
37         ansible.limit = "all"
38         ansible.inventory_path = "ansible/vppdevice"
39         ansible.playbook = "ansible/master.yml"
40     end
41
42     config.vm.post_up_message = <<-MESSAGE
43     Your virtual machine is configured!
44
45     Login to the box using command:
46         vagrant ssh
47
48     To run some tests use the VPP Device bootstrap script, eg:
49         cd /home/vagrant/csit/resources/libraries/bash/entry
50         ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox
51
52     To run only selected tests based on TAGS, export environment variables
53     before running the test suite:
54         export GERRIT_EVENT_TYPE="comment-added"
55         export GERRIT_EVENT_COMMENT_TEXT="devicetest memif"
56         ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu1804-1n-vbox
57
58     For more information please visit:
59         https://docs.fd.io/csit/rls1908/report/index.html
60         https://docs.fd.io/csit/master/trending/
61
62     MESSAGE
63
64     config.vm.define "bionic", primary: true do |bionic|
65         # Base box definition, currently using
66         #  Official Ubuntu 18.04 LTS (Bionic Beaver) Daily Build
67         bionic.vm.box = "ubuntu/bionic64"
68         bionic.vm.box_version = "20190724.1.0"
69         bionic.vm.box_check_update = false
70
71         # Virtualbox machine configuration
72         bionic.vm.provider "virtualbox" do |vb|
73             vb.name = "vppdevice-bionic"
74             vb.gui = false
75             vb.memory = "8192"
76             vb.cpus = "4"
77             vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
78             vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
79             vb.customize ["modifyvm", :id, "--nicpromisc4", "allow-all"]
80             vb.customize ["modifyvm", :id, "--nicpromisc5", "allow-all"]
81             vb.customize ["modifyvm", :id, "--nicpromisc6", "allow-all"]
82             vb.customize ["modifyvm", :id, "--nicpromisc7", "allow-all"]
83         end
84     end
85
86     config.vm.define "centos8", autostart: false do |centos8|
87         # Base box definition, currently using
88         #  Official CentOS8 v1905.1
89         centos8.vm.box = "centos/8"
90         centos8.vm.box_version = "1905.1"
91         centos8.vm.box_check_update = false
92
93         # Virtualbox machine configuration
94         centos8.vm.provider "virtualbox" do |vb|
95             vb.name = "vppdevice-centos8"
96             vb.gui = false
97             vb.memory = "8192"
98             vb.cpus = "4"
99             vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
100             vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
101             vb.customize ["modifyvm", :id, "--nicpromisc4", "allow-all"]
102             vb.customize ["modifyvm", :id, "--nicpromisc5", "allow-all"]
103             vb.customize ["modifyvm", :id, "--nicpromisc6", "allow-all"]
104             vb.customize ["modifyvm", :id, "--nicpromisc7", "allow-all"]
105         end
106     end
107 end