3 ###########################################################
4 ## Invoking this script from ubuntu docker container runs
5 ## cyclictest through yardstick
6 ###########################################################
9 testType=$1 #daily/verify/merge
10 HOST_IP=$( getHostIP )
11 pod_config='/opt/scripts/pod.yaml'
12 cyclictest_context_file='/opt/kvmfornfv_cyclictest_idle_idle.yaml'
14 if [ ! -f ${pod_config} ] ; then
15 echo "file ${pod_config} not found"
19 if [ ! -f ${cyclictest_context_file} ] ; then
20 echo "file ${cyclictest_context_file} not found"
24 #setting up of image for launching guest vm.
25 ssh -o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null \
26 root@$HOST_IP "cp /root/images/guest1.qcow2 /root/"
28 #Updating the yardstick.conf file for daily
29 function updateConfDaily() {
30 DISPATCHER_TYPE=influxdb
31 DISPATCHER_FILE_NAME="/tmp/yardstick.out"
32 # Use the influxDB on the jumping server
33 DISPATCHER_INFLUXDB_TARGET="http://10.2.117.21:8086"
34 mkdir -p /etc/yardstick
35 cat << EOF > /etc/yardstick/yardstick.conf
38 dispatcher = ${DISPATCHER_TYPE}
41 file_name = ${DISPATCHER_FILE_NAME}
48 target = ${DISPATCHER_INFLUXDB_TARGET}
52 #Function call to update yardstick conf file based on Job type
53 if [ "$testType" == "daily" ];then
57 #Running cyclictest through yardstick
58 yardstick -d task start ${cyclictest_context_file}
61 if [ "$testType" == "verify" ];then
62 chmod 777 /tmp/yardstick.out
63 cat /tmp/yardstick.out > /opt/yardstick.out
66 if [ $output != 0 ];then
67 echo "Yardstick Failed !!!"