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'
15 if [ ! -f ${pod_config} ] ; then
16 echo "file ${pod_config} not found"
20 if [ ! -f ${cyclictest_context_file} ] ; then
21 echo "file ${cyclictest_context_file} not found"
25 #setting up of image for launching guest vm.
26 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
27 root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
29 #Updating the yardstick.conf file for daily
30 function updateConfDaily() {
31 DISPATCHER_TYPE=influxdb
32 DISPATCHER_FILE_NAME="/tmp/yardstick.out"
33 # Use the influxDB on the jumping server
34 DISPATCHER_INFLUXDB_TARGET="http://104.197.68.199:8086"
35 mkdir -p /etc/yardstick
36 cat << EOF > /etc/yardstick/yardstick.conf
39 dispatcher = ${DISPATCHER_TYPE}
42 file_name = ${DISPATCHER_FILE_NAME}
49 target = ${DISPATCHER_INFLUXDB_TARGET}
53 #Function call to update yardstick conf file based on Job type
54 if [ "$testType" == "daily" ];then
58 #Running cyclictest through yardstick
59 yardstick -d task start ${cyclictest_context_file}
62 if [ "$testType" == "verify" ];then
63 chmod 777 /tmp/yardstick.out
64 cat /tmp/yardstick.out > /opt/yardstick.out
67 if [ $output != 0 ];then
68 echo "Yardstick Failed !!!"