aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRay Kinsella <ray.kinsella@intel.com>2017-04-04 17:38:05 +0100
committerRay Kinsella <ray.kinsella@intel.com>2017-04-28 18:57:12 +0100
commit17fdb321f3e87bc18a6004d871a5b2b3778821b3 (patch)
tree989b32ab9a84b1ff5cd61a299c250f8aebbe597b
parentd9f6186fc27e47fcb30fc3e2463215493fb33cb4 (diff)
vpp-bootstrap: VPP 17.04 Support
* Adding support for VPP17.04 * Disabling DPDK to reduce mem footprint to 1G * Fixing AWS for Xenial Change-Id: I70f4ac0e70b80fd9b50d08f88a0987c089503ff2 Signed-off-by: Ray Kinsella <ray.kinsella@intel.com>
-rw-r--r--vpp-bootstrap/Vagrantfile8
-rwxr-xr-xvpp-bootstrap/containers/ctwo.provision.sh10
-rwxr-xr-xvpp-bootstrap/provision.sh23
3 files changed, 18 insertions, 23 deletions
diff --git a/vpp-bootstrap/Vagrantfile b/vpp-bootstrap/Vagrantfile
index fc93751..e607c44 100644
--- a/vpp-bootstrap/Vagrantfile
+++ b/vpp-bootstrap/Vagrantfile
@@ -8,10 +8,10 @@ end
Vagrant.configure(2) do |config|
- # Pick the right distro and bootstrap, default is ubuntu1404
+ # Pick the right distro and bootstrap, default is ubuntu1604
config.vm.box = "puppetlabs/ubuntu-16.04-64-nocm"
vmcpu=(ENV['VPP_VAGRANT_VMCPU'] || 2)
- vmram=(ENV['VPP_VAGRANT_VMRAM'] || 2048)
+ vmram=(ENV['VPP_VAGRANT_VMRAM'] || 1024)
# Define some physical ports for your VMs to be used by DPDK
config.vm.network "private_network", type: "dhcp"
@@ -67,8 +67,8 @@ Vagrant.configure(2) do |config|
#to enable `vagrant ssh` to work.
aws.security_groups = [ "permit-ssh", "default" ]
- #Amazon Machine Instance (AMI) to use, default is Ubuntu Trusty (HVM).
- aws.ami = "ami-0c59f37f"
+ #Amazon Machine Instance (AMI) to use, default is Ubuntu Xenial (HVM).
+ aws.ami = "ami-405f7226"
#EC2 instance type (how much cpu/mem resources to give the instance).
aws.instance_type = "t2.micro"
diff --git a/vpp-bootstrap/containers/ctwo.provision.sh b/vpp-bootstrap/containers/ctwo.provision.sh
index d8e5796..f914f2d 100755
--- a/vpp-bootstrap/containers/ctwo.provision.sh
+++ b/vpp-bootstrap/containers/ctwo.provision.sh
@@ -12,10 +12,9 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-VPP_VERSION=v17.01
+VPP_VERSION=v17.04
VPP_DIR=~/vpp
VPP_GIT="https://git.fd.io/vpp"
-PLATFORM=vpp_lite
echo Cloning $VPP_GIT
git clone $VPP_GIT $VPP_DIR
@@ -31,8 +30,5 @@ make wipe
rm -f build-root/.bootstrap.ok
# Build and install packaging
-make PLATFORM=$PLATFORM bootstrap
-make PLATFORM=$PLATFORM build
-#not sure why this is needed to called explicitly
-make PLATFORM=$PLATFORM build-vpp-api
-make PLATFORM=$PLATFORM plugins
+make bootstrap
+make build
diff --git a/vpp-bootstrap/provision.sh b/vpp-bootstrap/provision.sh
index d913489..5c01939 100755
--- a/vpp-bootstrap/provision.sh
+++ b/vpp-bootstrap/provision.sh
@@ -13,7 +13,7 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-PACKAGE_REPO="https://nexus.fd.io/content/repositories/fd.io.stable.1701.ubuntu.trusty.main/"
+PACKAGE_REPO="https://nexus.fd.io/content/repositories/fd.io.stable.1704.ubuntu.xenial.main/"
HOME_DIR="/home/$USER"
RC_LOCAL="/etc/rc.local"
SSH_OPTIONS="-o UserKnownHostsFile=/dev/null -o StrictHostKeyChecking=no"
@@ -84,20 +84,19 @@ function get_field() {
echo $value
}
-sudo sysctl -w vm.nr_hugepages=128
-HUGEPAGES=`sudo sysctl -n vm.nr_hugepages`
-if [ $HUGEPAGES != 128 ]; then
- echo "ERROR: Unable to get 128 hugepages, only got $HUGEPAGES. Cannot finish."
- exit
-fi
-
echo "deb $PACKAGE_REPO ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
sudo apt-get -qq update
-sudo apt-get -qq install -y --force-yes lxc bridge-utils tmux vpp vpp vpp-dpdk-dkms
+sudo apt-get -qq install -y --force-yes linux-image-extra-$(uname -r) lxc bridge-utils tmux
+sudo apt-get -qq install -y --force-yes vpp vpp vpp-dpdk-dkms vpp-plugins
+
+#Disable DPDK to make memory requirements more modest
+sudo sed -i_dpdk '47,52d' /etc/vpp/startup.conf
+echo -e "plugins {\n\tplugin dpdk_plugin.so { disable }\n}" | sudo tee -a /etc/vpp/startup.conf
-#Fix VPP on the host to use 128 hugepages
-sudo sed -i 's/vm.nr_hugepages=1024/vm.nr_hugepages=128/' /etc/sysctl.d/80-vpp.conf
-sudo sed -i 's/kernel.shmmax=2147483648/kernel.shmmax=268435456/' /etc/sysctl.d/80-vpp.conf
+#Fix VPP on the host to use 32 hugepages
+echo -e "heapsize 64M" | sudo tee -a /etc/vpp/startup.conf
+sudo sed -i 's/vm.nr_hugepages=1024/vm.nr_hugepages=32/' /etc/sysctl.d/80-vpp.conf
+sudo sed -i 's/kernel.shmmax=2147483648/kernel.shmmax=67018864/' /etc/sysctl.d/80-vpp.conf
#Provision containers with two network connections, second connection is unconnected
echo -e "lxc.network.name=veth0" | sudo tee -a /etc/lxc/default.conf