aboutsummaryrefslogtreecommitdiffstats
path: root/yardstick/network_services/nfvi
diff options
context:
space:
mode:
authorDhaval Patel <dhaval.r.patel@intel.com>2017-08-18 16:10:35 -0700
committerDhaval Patel <dhaval.r.patel@intel.com>2017-08-22 14:55:28 -0700
commit5d6530a41ad21972ed5061276b5e08f3020c14b9 (patch)
tree1a3baaa74a85a6b0d1ffa53501d9de73a5d9cff6 /yardstick/network_services/nfvi
parent126450b753244c089dbae8f3f10a4a141d65cf57 (diff)
Collectd Fixes
This fixes collectd installation as well as configuration: 1) Proxy fix, avoid overriding env proxy if already specified under 'http_proxy' env var and not specified on cmd 2) Install 'libvirt-dev' for 'virt' collectd plugin 3) Using dpdk already downloaded by nsb_setup rather than getting latest , because master branch dpdk is failing while building eal_memory 4) Fix typo while checkout new branch Change-Id: I0cc36f49d48d80f7edc35634dfe77016bd35978a Signed-off-by: Dhaval Patel <dhaval.r.patel@intel.com>
Diffstat (limited to 'yardstick/network_services/nfvi')
-rwxr-xr-xyardstick/network_services/nfvi/collectd.sh36
1 files changed, 13 insertions, 23 deletions
diff --git a/yardstick/network_services/nfvi/collectd.sh b/yardstick/network_services/nfvi/collectd.sh
index 8162ec539..7666404e4 100755
--- a/yardstick/network_services/nfvi/collectd.sh
+++ b/yardstick/network_services/nfvi/collectd.sh
@@ -13,7 +13,6 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
-
INSTALL_NSB_BIN="/opt/nsb_bin"
cd $INSTALL_NSB_BIN
@@ -23,19 +22,17 @@ if [ "$(whoami)" != "root" ]; then
fi
echo "setup proxy..."
-http_proxy=$1
-https_proxy=$2
-if [[ "$http_proxy" != "" ]]; then
- export http_proxy=$http_proxy
- export https_proxy=$http_proxy
+if [[ -n $1 ]]; then
+ export http_proxy=$1
+ export https_proxy=$2
fi
-if [[ "$https_proxy" != "" ]]; then
- export https_proxy=$https_proxy
+if [[ -n $2 ]]; then
+ export https_proxy=$2
fi
echo "Install required libraries to run collectd..."
-pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev librabbitmq-dev rabbitmq-server cmake)
+pkg=(git flex bison build-essential pkg-config automake autotools-dev libltdl-dev librabbitmq-dev rabbitmq-server cmake libvirt-dev)
for i in "${pkg[@]}"; do
dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed"
if [ "$?" -eq "1" ]; then
@@ -44,9 +41,7 @@ dpkg-query -W --showformat='${Status}\n' "${i}"|grep "install ok installed"
done
echo "Done"
-ldconfig -p | grep libpqos >/dev/null
-if [ $? -eq 0 ]
-then
+if ldconfig -p | grep -q libpqos ; then
echo "Intel RDT library already installed. Done"
else
pushd .
@@ -54,32 +49,27 @@ else
echo "Get intel_rdt repo and install..."
rm -rf intel-cmt-cat >/dev/null
git clone https://github.com/01org/intel-cmt-cat.git
- pushd intel-cmt-cat
- make install PREFIX=/usr
- popd
+
+ (cd intel-cmt-cat; make install PREFIX=/usr)
popd
echo "Done."
fi
-ls /usr/lib/libdpdk.so >/dev/null
-if [ $? -eq 0 ]
-then
+if [[ -r /usr/lib/libdpdk.so ]]; then
echo "DPDK already installed. Done"
else
pushd .
echo "Get dpdk and install..."
mkdir -p $INSTALL_NSB_BIN
- rm -rf "$INSTALL_NSB_BIN"/dpdk >/dev/null
- git clone http://dpdk.org/git/dpdk
- pushd dpdk
+ pushd dpdk-16.07
mkdir -p /mnt/huge
mount -t hugetlbfs nodev /mnt/huge
sed -i 's/CONFIG_RTE_BUILD_SHARED_LIB=n/CONFIG_RTE_BUILD_SHARED_LIB=y/g' config/common_base
sed -i 's/CONFIG_RTE_EAL_PMD_PATH=""/CONFIG_RTE_EAL_PMD_PATH="\/usr\/lib\/dpdk-pmd\/"/g' config/common_base
- echo "Build dpdk v16.04"
+ echo "Build dpdk v16.07"
make config T=x86_64-native-linuxapp-gcc
make
sudo make install prefix=/usr
@@ -125,7 +115,7 @@ else
git clone https://github.com/collectd/collectd.git
pushd collectd
git stash
- git checkout -n nfvi 47c86ace348a1d7a5352a83d10935209f89aa4f5
+ git checkout -b nfvi 47c86ace348a1d7a5352a83d10935209f89aa4f5
./build.sh
./configure --with-libpqos=/usr/ --with-libdpdk=/usr --with-libyajl=/usr/local --enable-debug --enable-dpdkstat --enable-virt --enable-ovs_stats
make install > /dev/null