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