Break boostrap.sh into pieces
In order to make it easier for folks who have existing
Centos or Ubuntu boxes to utilize the same
'Getting started' scripting that is used in Vagrant,
as well as enable us to use that scripting in CI,
broke up bootstrap.sh into
update.sh - Things like apt-get update
build.sh - Install any dependencies and build vpp
clearinterfaces.sh - Clean off any non-default gateway
interfaces. Used by vagrant.
run.sh - Start vpp as a service on the box.
A user (or CI) just wanting to get going and build
on an existing Ubuntu or Centos image (ie, not via
vagrant) can simply run
build.sh
Change-Id: I8f19342f163cad07c6c05def943a5fb8e394b879
Signed-off-by: Ed Warnicke <eaw@cisco.com>
diff --git a/build-root/vagrant/Vagrantfile b/build-root/vagrant/Vagrantfile
index 6e42bf2..5e6fe75 100644
--- a/build-root/vagrant/Vagrantfile
+++ b/build-root/vagrant/Vagrantfile
@@ -7,12 +7,15 @@
distro = ENV['VPP_VAGRANT_DISTRO']
if distro == 'centos7'
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"
- config.vm.provision 'shell', path: 'bootstrap.ubuntu1404.sh'
end
+ config.vm.provision :shell, :path => "update.sh"
+ config.vm.provision :shell, :path => "build.sh", :args => "/vpp vagrant"
+ config.vm.provision :shell, :path => "clearinterfaces.sh"
+ config.vm.provision :shell, :path => "run.sh"
+
# Add .gnupg dir in so folks can sign patches
# Note, as gnupg puts socket files in that dir, we have
# to be cautious and make sure we are dealing with a plain file
@@ -39,7 +42,7 @@
end
# Define some physical ports for your VMs to be used by DPDK
- nics = 0
+ nics = 2
if ENV.key?('VPP_VAGRANT_NICS')
nics = ENV['VPP_VAGRANT_NICS'].to_i(10)
end