aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPierre Pfister <ppfister@cisco.com>2017-05-02 07:18:55 +0000
committerGerrit Code Review <gerrit@fd.io>2017-05-02 07:18:55 +0000
commit16456df25e560220ba2a0431f676a01411d01b46 (patch)
treedc43cadb83939dbdcecfa56f2ae83f08d0f89a63
parent9ee7b8c0cdb62d877090129914e25a1fe7ec1b82 (diff)
parent17fdb321f3e87bc18a6004d871a5b2b3778821b3 (diff)
Merge "vpp-bootstrap: VPP 17.04 Support"
-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