diff options
author | Ray Kinsella <ray.kinsella@intel.com> | 2017-04-04 17:38:05 +0100 |
---|---|---|
committer | Ray Kinsella <ray.kinsella@intel.com> | 2017-04-28 18:57:12 +0100 |
commit | 17fdb321f3e87bc18a6004d871a5b2b3778821b3 (patch) | |
tree | 989b32ab9a84b1ff5cd61a299c250f8aebbe597b /vpp-bootstrap/provision.sh | |
parent | d9f6186fc27e47fcb30fc3e2463215493fb33cb4 (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>
Diffstat (limited to 'vpp-bootstrap/provision.sh')
-rwxr-xr-x | vpp-bootstrap/provision.sh | 23 |
1 files changed, 11 insertions, 12 deletions
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 |