diff options
author | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-01-10 18:59:41 +0000 |
---|---|---|
committer | Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com> | 2018-01-29 08:46:39 +0000 |
commit | 2f0c244d15e7014509755e8b81befec53bc9fff9 (patch) | |
tree | b070696dd0e0d7f99e6693ab05f84a129989e264 | |
parent | 92098cdeb1d0d21ceea33f4f234d7b383ab46f14 (diff) |
Improve ovs_deploy.bash script
Improved ovs_deploy.bash script [1]:
- Check if there is an error during the execution.
- Removed "prerequisites" function because is not called.
- Modified DPDK package installation: execute "make config" and then "make"
- Added comments.
[1]https://github.com/opnfv/yardstick/blob/master/yardstick/resources/scripts/install/ovs_deploy.bash
JIRA: YARDSTICK-916
Change-Id: I3029f983dde72aa46f6fdd61dd64d086ab3c2af6
Signed-off-by: Rodolfo Alonso Hernandez <rodolfo.alonso.hernandez@intel.com>
-rwxr-xr-x | yardstick/resources/scripts/install/ovs_deploy.bash | 23 |
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 } |