3 ###########################################################
4 ## Invoking this script from ubuntu docker container runs
5 ## cyclictest through yardstick
6 ###########################################################
9 testType=$1 #daily/verify/merge
10 testName=$2 #idle_idle/stress_idle
11 HOST_IP=$( getHostIP )
12 pod_config='/opt/scripts/pod.yaml'
13 cyclictest_context_file='/opt/kvmfornfv_cyclictest_'${testName}'.yaml'
14 yardstick_prefix='/root/yardstick/yardstick/benchmark/scenarios/compute' # yardstick teardown path
16 if [ ! -f ${pod_config} ] ; then
17 echo "file ${pod_config} not found"
21 if [ ! -f ${cyclictest_context_file} ] ; then
22 echo "file ${cyclictest_context_file} not found"
26 #As yardstick executes only *.bash scripts, copy the post-execute script as .bash script
27 cp /opt/scripts/disable_trace.sh ${yardstick_prefix}/disable_trace.bash
29 #Execution of the post-execute script copied requires re-installation of yardstick
30 ( cd /root/yardstick ; python setup.py install )
32 #setting up of image for launching guest vm.
33 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
34 root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
36 #Updating the yardstick.conf file for daily
37 function updateConfDaily() {
38 DISPATCHER_TYPE=influxdb
39 DISPATCHER_FILE_NAME="/tmp/yardstick.out"
40 # Use the influxDB on the jumping server
41 DISPATCHER_INFLUXDB_TARGET="http://104.197.68.199:8086"
42 mkdir -p /etc/yardstick
43 cat << EOF > /etc/yardstick/yardstick.conf
46 dispatcher = ${DISPATCHER_TYPE}
49 file_name = ${DISPATCHER_FILE_NAME}
56 target = ${DISPATCHER_INFLUXDB_TARGET}
60 #Function call to update yardstick conf file based on Job type
61 if [ "$testType" == "daily" ];then
65 #Running cyclictest through yardstick
66 yardstick -d task start ${cyclictest_context_file}
69 if [ "$testType" == "verify" ];then
70 chmod 777 /tmp/yardstick.out
71 cat /tmp/yardstick.out > /opt/yardstick.out
74 if [ $output != 0 ];then
75 echo "Yardstick Failed !!!"