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
|
# Pick the right distro and bootstrap, default is ubuntu1404
|
||||||
distro = ENV['VPP_VAGRANT_DISTRO']
|
distro = ENV['VPP_VAGRANT_DISTRO']
|
||||||
if distro == 'centos7'
|
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'
|
config.vm.provision 'shell', path: 'bootstrap.centos7.sh'
|
||||||
else
|
else
|
||||||
config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
|
config.vm.box = "puppetlabs/ubuntu-14.04-64-nocm"
|
||||||
|
@ -3,59 +3,35 @@
|
|||||||
yum check-update
|
yum check-update
|
||||||
yum update -y
|
yum update -y
|
||||||
|
|
||||||
# Install build tools
|
# Install dependencies
|
||||||
yum groupinstall 'Development Tools' -y
|
cd /vpp
|
||||||
yum install openssl-devel -y
|
make install-dep
|
||||||
yum install glibc-static -y
|
|
||||||
|
|
||||||
# Install development tools
|
# Build rpms
|
||||||
yum install gdb -y
|
make bootstrap
|
||||||
yum install gdbserver -y
|
make pkg-rpm
|
||||||
|
|
||||||
# Install jdk and maven
|
# Install rpms
|
||||||
yum install -y java-1.8.0-openjdk-devel
|
|
||||||
|
|
||||||
# Install EPEL
|
(cd build-root/;sudo rpm -Uvh *.rpm)
|
||||||
yum install -y epel-release
|
|
||||||
|
|
||||||
# Install components to build Ganglia modules
|
# Disable all ethernet interfaces other than the default route
|
||||||
yum install -y apr-devel
|
# interface so VPP will use those interfaces. The VPP auto-blacklist
|
||||||
yum install -y --enablerepo=epel libconfuse-devel
|
# algorithm prevents the use of any physical interface contained in the
|
||||||
yum install -y --enablerepo=epel ganglia-devel
|
# 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
|
# Install uio-pci-generic
|
||||||
yum install -y pciutils
|
|
||||||
|
|
||||||
# Load the uio kernel module
|
|
||||||
modprobe 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
|
# cat README
|
||||||
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
|
cat /vagrant/README
|
||||||
fi
|
|
||||||
|
Reference in New Issue
Block a user