summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRoss Brattain <ross.b.brattain@intel.com>2018-02-07 19:04:23 +0000
committerGerrit Code Review <gerrit@opnfv.org>2018-02-07 19:04:23 +0000
commit7d7f85712ce090dca5439aa60e1dc6418d20f0d2 (patch)
treecd14982c743a83d8316a7a3a0c03ddaa83af1dd9
parent6bb97446dd3bbdb389503a002827bba274681dd5 (diff)
parent2f0c244d15e7014509755e8b81befec53bc9fff9 (diff)
Merge "Improve ovs_deploy.bash script"
-rwxr-xr-xyardstick/resources/scripts/install/ovs_deploy.bash23
1 files changed, 7 insertions, 16 deletions
diff --git a/yardstick/resources/scripts/install/ovs_deploy.bash b/yardstick/resources/scripts/install/ovs_deploy.bash
index d94f30db1..beda9a5e0 100755
--- a/yardstick/resources/scripts/install/ovs_deploy.bash
+++ b/yardstick/resources/scripts/install/ovs_deploy.bash
@@ -14,6 +14,8 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+set -e
+
INSTALL_OVS_BIN="/usr/src"
cd $INSTALL_OVS_BIN
@@ -22,20 +24,6 @@ if [[ $EUID -ne 0 ]]; then
exit 1;
fi
-prerequisite()
-{
- echo "Install required libraries to run collectd..."
- pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev cmake qemu-kvm libvirt-bin bridge-utils numactl libnuma-dev libpcap-dev)
- for i in "${pkg[@]}"; do
- dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed"
- if [ "$?" -eq "1" ]; then
- apt-get update
- apt-get -y install "${i}";
- fi
- done
- echo "Done"
-}
-
download_zip()
{
url=$1
@@ -53,6 +41,7 @@ download_zip()
dpdk_build()
{
+ echo "Build DPDK libraries"
pushd .
if [[ $DPDK_VERSION != "" ]]; then
export DPDK_DIR=$INSTALL_OVS_BIN/dpdk-stable-$DPDK_VERSION
@@ -62,13 +51,15 @@ dpdk_build()
DPDK_DOWNLOAD="http://fast.dpdk.org/rel/dpdk-$DPDK_VERSION.tar.xz"
download_zip "${DPDK_DOWNLOAD}" "DPDK"
cd dpdk-stable-"$DPDK_VERSION"
- make install -j T=$RTE_TARGET
+ make config T=$RTE_TARGET
+ make install -j $(nproc) T=$RTE_TARGET
fi
popd
}
ovs()
{
+ echo "Build and install OVS with DPDK"
pushd .
if [[ $OVS_VERSION != "" ]]; then
rm -rf openswitch-"$OVS_VERSION"
@@ -82,7 +73,7 @@ ovs()
else
./configure
fi
- make install -j
+ make install -j $(nproc)
fi
popd
}