Fix vagrant centos flavor to work with top level make file
Change-Id: I89044ed27130a036536ed33aba847034ed15ad7d Signed-off-by: Ed Warnicke <eaw@cisco.com>
This commit is contained in:

committed by
Gerrit Code Review

parent
1d49c98f7f
commit
c841eac773
2
build-root/vagrant/Vagrantfile
vendored
2
build-root/vagrant/Vagrantfile
vendored
@ -6,7 +6,7 @@ Vagrant.configure(2) do |config|
|
||||
# Pick the right distro and bootstrap, default is ubuntu1404
|
||||
distro = ENV['VPP_VAGRANT_DISTRO']
|
||||
if distro == 'centos7'
|
||||
config.vm.box = "puppetlabs/centos-7.0-64-nocm"
|
||||
config.vm.box = "puppetlabs/centos-7.2-64-nocm"
|
||||
config.vm.provision 'shell', path: 'bootstrap.centos7.sh'
|
||||
else
|
||||
config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
|
||||
|
@ -3,59 +3,35 @@
|
||||
yum check-update
|
||||
yum update -y
|
||||
|
||||
# Install build tools
|
||||
yum groupinstall 'Development Tools' -y
|
||||
yum install openssl-devel -y
|
||||
yum install glibc-static -y
|
||||
# Install dependencies
|
||||
cd /vpp
|
||||
make install-dep
|
||||
|
||||
# Install development tools
|
||||
yum install gdb -y
|
||||
yum install gdbserver -y
|
||||
# Build rpms
|
||||
make bootstrap
|
||||
make pkg-rpm
|
||||
|
||||
# Install jdk and maven
|
||||
yum install -y java-1.8.0-openjdk-devel
|
||||
# Install rpms
|
||||
|
||||
# Install EPEL
|
||||
yum install -y epel-release
|
||||
(cd build-root/;sudo rpm -Uvh *.rpm)
|
||||
|
||||
# Install components to build Ganglia modules
|
||||
yum install -y apr-devel
|
||||
yum install -y --enablerepo=epel libconfuse-devel
|
||||
yum install -y --enablerepo=epel ganglia-devel
|
||||
# Disable all ethernet interfaces other than the default route
|
||||
# interface so VPP will use those interfaces. The VPP auto-blacklist
|
||||
# algorithm prevents the use of any physical interface contained in the
|
||||
# routing table (i.e. "route --inet --inet6") preventing the theft of
|
||||
# the management ethernet interface by VPP from the kernel.
|
||||
for intf in $(ls /sys/class/net) ; do
|
||||
if [ -d /sys/class/net/$intf/device ] &&
|
||||
[ "$(route --inet --inet6 | grep default | grep $intf)" == "" ] ; then
|
||||
ifconfig $intf down
|
||||
fi
|
||||
done
|
||||
|
||||
# PCIutils
|
||||
yum install -y pciutils
|
||||
|
||||
# Load the uio kernel module
|
||||
# Install uio-pci-generic
|
||||
modprobe uio_pci_generic
|
||||
|
||||
echo uio_pci_generic >> /etc/modules-load.d/uio_pci_generic.conf
|
||||
# Start vpp
|
||||
service vpp start
|
||||
|
||||
# Setup for hugepages using upstart so it persists across reboots
|
||||
sysctl -w vm.nr_hugepages=1024
|
||||
echo "vm.nr_hugepages=1024" >> /etc/sysctl.conf
|
||||
mkdir -p /mnt/huge
|
||||
echo "hugetlbfs /mnt/huge hugetlbfs defaults 0 0" >> /etc/fstab
|
||||
mount /mnt/huge
|
||||
|
||||
# Setup the vpp code
|
||||
cd ~vagrant/
|
||||
sudo -u vagrant mkdir git
|
||||
cd git/
|
||||
|
||||
# Check if git exists and remove it before attempting clone, else clone ineffective when "reload --provision"
|
||||
[ -d vpp ] && rm -rf vpp
|
||||
sudo -H -u vagrant git clone /vpp
|
||||
cd vpp
|
||||
|
||||
# Initial vpp build
|
||||
if [ -d build-root ]; then
|
||||
# Bootstrap vpp
|
||||
cd build-root/
|
||||
sudo -H -u vagrant ./bootstrap.sh
|
||||
|
||||
# Build vpp
|
||||
sudo -H -u vagrant make PLATFORM=vpp TAG=vpp_debug install-packages
|
||||
cd ~vagrant/
|
||||
cat /vagrant/README
|
||||
fi
|
||||
# cat README
|
||||
cat /vagrant/README
|
||||
|
Reference in New Issue
Block a user