install.sh revision bee3dc86
1#!/usr/bin/env bash
2
3# Copyright (c) 2016 Cisco and/or its affiliates.
4# Licensed under the Apache License, Version 2.0 (the "License");
5# you may not use this file except in compliance with the License.
6# You may obtain a copy of the License at:
7#
8#     http://www.apache.org/licenses/LICENSE-2.0
9#
10# Unless required by applicable law or agreed to in writing, software
11# distributed under the License is distributed on an "AS IS" BASIS,
12# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13# See the License for the specific language governing permissions and
14# limitations under the License.
15
16sysctl -w vm.nr_hugepages=1024
17HUGEPAGES=`sysctl -n  vm.nr_hugepages`
18if [ $HUGEPAGES != 1024 ]; then
19    echo "ERROR: Unable to get 1024 hugepages, only got $HUGEPAGES.  Cannot finish."
20    exit
21fi
22
23echo "deb https://nexus.fd.io/content/repositories/fd.io.master.ubuntu.trusty.main/ ./" | sudo tee -a /etc/apt/sources.list.d/99fd.io.list
24apt-get -qq update
25apt-get -qq install -y --force-yes vpp vpp-dpdk-dkms bridge-utils
26service vpp start
27