# Copyright (c) 2017 Intel Corporation # Permission is hereby granted, free of charge, to any person obtaining a # copy of this software and associated documentation files (the # "Software"), to deal in the Software without restriction, including # without limitation the rights to use, copy, modify, merge, publish, # distribute, sublicense, and/or sell copies of the Software, and to # permit persons to whom the Software is furnished to do so, subject to # the following conditions: # The above copyright notice and this permission notice shall be included # in all copies or substantial portions of the Software. # THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS # OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF # MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. # IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY # CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, # TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE # SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # Author: Clayne B. Robison # -*- mode: ruby -*- # vi: set ft=ruby : Vagrant.configure("2") do |config| config.vm.box = "ubuntu/xenial64" # Disable automatic box update checking. If you disable this, then # boxes will only be checked for updates when the user runs # `vagrant box outdated`. This is not recommended. config.vm.box_check_update = false # Create a public network, which generally matched to bridged network. # Bridged networks make the machine appear as another physical device on # your network. config.vm.network "public_network" # use http proxy if avaiable if ENV['http_proxy'] && Vagrant.has_plugin?("vagrant-proxyconf") config.proxy.http = ENV['http_proxy'] config.proxy.https = ENV['https_proxy'] config.proxy.no_proxy = "localhost,127.0.0.1" end # Provider-specific configuration so you can fine-tune various # backing providers for Vagrant. These expose provider-specific options. # Example for VirtualBox: # config.vm.provider "virtualbox" do |vb| vb.gui = false vb.memory = "6144" vb.cpus = "8" vb.customize ["modifyvm", :id, "--ioapic", "on"] vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.1", "1"] vb.customize ["setextradata", :id, "VBoxInternal/CPUM/SSE4.2", "1"] end # Once the VM has booted, run all of our configuration stuff config.vm.provision "shell", inline: <<-SHELL apt-get --force-yes -y -qq update -y --force-yes -qq apt-get --assume-yes -qq install build-essential automake docker.io linux-headers-$(uname -a | awk '{print $3}') vim kmod python python-pip libtool pip install -U pip six curl -sO http://dpdk.org/browse/apps/pktgen-dpdk/snapshot/pktgen-dpdk-pktgen-3.1.1.tar.gz curl -sO http://fast.dpdk.org/rel/dpdk-16.11.1.tar.xz curl -sO http://openvswitch.org/releases/openvswitch-2.6.1.tar.gz tar xf dpdk-16.11.1.tar.xz tar xzf openvswitch-2.6.1.tar.gz tar xzf pktgen-dpdk-pktgen-3.1.1.tar.gz mkdir /home/ubuntu/training git init DPDK_in_Containers_Hands-on_Lab cd DPDK_in_Containers_Hands-on_Lab git remote add origin https://github.com/intel/SDN-NFV-Hands-on-Samples.git git config core.sparsecheckout true echo "DPDK_in_Containers_Hands-on_Lab" >> .git/info/sparse-checkout git pull origin master mv DPDK_in_Containers_Hands-on_Lab/dpdk-container-lab /home/ubuntu/training cd /home/ubuntu mv pktgen-dpdk-pktgen-3.1.1 /home/ubuntu/training/dpdk-container-lab/docker-build/pktgen/ mv /home/ubuntu/training/dpdk-container-lab/docker-build/pktgen/pktgen-dpdk-pktgen-3.1.1 /home/ubuntu/training/dpdk-container-lab/docker-build/pktgen/pktgen cp -r /home/ubuntu/dpdk-stable-16.11.1 /home/ubuntu/training/dpdk-container-lab/docker-build/testpmd/ mv /home/ubuntu/training/dpdk-container-lab/docker-build/testpmd/dpdk-stable-16.11.1 /home/ubuntu/training/dpdk-container-lab/docker-build/testpmd/dpdk cd /home/ubuntu/training/dpdk-container-lab/docker-build/testpmd/dpdk mv ../2M-hugepage.patch . patch -p1 -i 2M-hugepage.patch -b chown -R ubuntu:ubuntu /home/ubuntu/training ln -s /usr/bin/automake-1.15 /usr/bin/automake-1.14 mkdir /mnt/huge SHELL end