Report: Add data
[csit.git] / csit.infra.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     config.vm.synced_folder "../", "/vagrant/csit"
31
32     # Provision the box using ansible local (no Ansible installation needed
33     # on host).
34     config.vm.provision "ansible_local" do |ansible|
35         ansible.version = "latest"
36         ansible.become = true
37         ansible.verbose = false
38         ansible.limit = "vagrant"
39         ansible.inventory_path = "csit/fdio.infra.ansible/inventories/vagrant_inventory/hosts"
40         ansible.playbook = "csit/fdio.infra.ansible/site.yaml"
41     end
42
43     config.vm.post_up_message = <<-MESSAGE
44     Your virtual machine is configured!
45
46     Login to the box using command:
47         vagrant ssh
48
49     To run some tests use the VPP Device bootstrap script, eg:
50         cd /home/vagrant/csit/resources/libraries/bash/entry
51         ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu2004-1n-vbox
52
53     To run only selected tests based on TAGS, export environment variables
54     before running the test suite:
55         export GERRIT_EVENT_TYPE="comment-added"
56         export GERRIT_EVENT_COMMENT_TEXT="devicetest memif"
57         ./bootstrap_vpp_device.sh csit-vpp-device-master-ubuntu2004-1n-vbox
58
59     For more information please visit:
60         https://docs.fd.io/csit/master/report/
61         https://docs.fd.io/csit/master/trending/
62
63     MESSAGE
64
65     config.vm.define "focal", primary: true do |focal|
66         # Base box definition, currently using
67         #  Official Ubuntu 20.04 LTS (Focal) Daily Build
68         focal.vm.box = "ubuntu/focal64"
69         focal.vm.box_version = "20210415.0.0"
70         focal.vm.box_check_update = false
71
72         # Virtualbox machine configuration
73         focal.vm.provider "virtualbox" do |vb|
74             vb.name = "vppdevice-focal"
75             vb.gui = false
76             vb.memory = "8192"
77             vb.cpus = "4"
78             vb.customize ["modifyvm", :id, "--nicpromisc2", "allow-all"]
79             vb.customize ["modifyvm", :id, "--nicpromisc3", "allow-all"]
80             vb.customize ["modifyvm", :id, "--nicpromisc4", "allow-all"]
81             vb.customize ["modifyvm", :id, "--nicpromisc5", "allow-all"]
82             vb.customize ["modifyvm", :id, "--nicpromisc6", "allow-all"]
83             vb.customize ["modifyvm", :id, "--nicpromisc7", "allow-all"]
84         end
85     end
86 end