3 # Make sure the disk image build fails if nfvbench installation fails
6 if [ $DIB_DEV_IMAGE != "generator" ]; then
12 mkdir /var/log/nfvbench
14 wget --no-cache --no-check-certificate https://trex-tgn.cisco.com/trex/release/$TREX_VER.tar.gz
15 tar xzf $TREX_VER.tar.gz -C /opt/trex
16 rm -f /$TREX_VER.tar.gz
17 rm -f /opt/trex/$TREX_VER/trex_client_$TREX_VER.tar.gz
18 cp -a /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex /usr/local/lib/python3.6/site-packages/
19 rm -rf /opt/trex/$TREX_VER/automation/trex_control_plane/interactive/trex
21 # NFVbench installation
23 git clone https://gerrit.opnfv.org/gerrit/nfvbench
25 python3 -m pip install . --use-deprecated=legacy-resolver
26 cp xtesting/testcases.yaml /usr/local/lib/python3.6/site-packages/xtesting/ci/testcases.yaml
27 python3 ./docker/cleanup_generators.py
28 rm -rf /opt/nfvbench/.git
29 rm -rf /opt/nfvbench/nfvbench
30 # symlink to NFVbench sources
31 ln -s /usr/local/lib/python3.6/site-packages/nfvbench /opt/nfvbench/nfvbench
32 # persist env variables
33 echo "export TREX_VER=\"$TREX_VER\"" >> /etc/profile.d/nfvbench.sh
34 echo "export TREX_EXT_LIBS=\"/opt/trex/$TREX_VER/external_libs\"" >> /etc/profile.d/nfvbench.sh