diff options
author | 2015-10-22 12:39:37 -0700 | |
---|---|---|
committer | 2015-11-05 06:17:02 -0800 | |
commit | 95bf8a8c96b2be94512e042f3f3c82edcbebf84d (patch) | |
tree | 7c7d1acd4dd596e84699a18d04e6ba2790e6fec2 /QTIP.sh | |
parent | ed6de63572d92bb5af8be22ced0a749400f4d3d4 (diff) |
Python Framework for QTIP
Dhrystone Whetstone and DPI benchmarks have been implemented
CLI arguments have been implemented
test case are sorted based on category such as compute,network and storage
glance and heat client have been used to generate the stack.
automatic upload of QTIP image and delete function for existing stack before
creating new stack has been implemented
system information collecton and result generation has been implemented
JIRA: QTIP-17
Signed-off-by: Mofassir Arif <mofassir_arif@dell.com>
Change-Id: I4b7b134017723c30c771cc14d2edce33fcb8ba00
Diffstat (limited to 'QTIP.sh')
-rwxr-xr-x | QTIP.sh | 137 |
1 files changed, 0 insertions, 137 deletions
diff --git a/QTIP.sh b/QTIP.sh deleted file mode 100755 index 2a313420..00000000 --- a/QTIP.sh +++ /dev/null @@ -1,137 +0,0 @@ -#! /bin/bash - -WDIR=$PWD - - - -function Call_Test { - - case "$1" in - dhrystone) - mkdir $PWD/results/dhrystone - ansible-playbook -s $PWD/benchmarks/playbooks/dhrystone.yaml --extra-vars "Dest_dir=$PWD/results" -v - - ;; - - ramspeed) - mkdir $PWD/results/ramspeed - ansible-playbook -s $PWD/benchmarks/playbooks/ramspeedbench.yaml --extra-vars "Dest_dir=$PWD/results" -v - ;; - - cachebench) - mkdir $PWD/results/cachebench - ansible-playbook -s $PWD/benchmarks/playbooks/cachebench.yaml --extra-vars "Dest_dir=$PWD/results" -v - ;; - - whetstone) - mkdir $PWD/results/whetstone - ansible-playbook -s $PWD/benchmarks/playbooks/whetstone.yaml --extra-vars "Dest_dir=$PWD/results" -v - ;; - - *) - echo "Please pass a correct argument to test. use -h for more details" - ;; - esac - -} - -function Fetch_VM_Image { - - mkdir $PWD/Temp_Image - - file="$PWD/Temp_Image/Cent7Modified.qcow2" - if [ -f "$file" ] - then - echo "Image already downdloaded" - else - echo "Fetching QTIP_VM Image" - cd $PWD/Temp_Image && wget https://www.dropbox.com/s/3uswrydrvhxw3qm/Cent7Modified.qcow2 - echo "Uploading image to glance" - glance image-create --name "QTIP_CentOS" --is-public true --disk-format qcow2 \ - --container-format bare \ - --file $PWD/Temp_Image/Cent7Modified.qcow2 - - - fi - cd $WDIR -} -mkdir $PWD/results -case "$1" in - -h) - printf "To run test.sh, 2 arguments are required\n" - printf "First argument: The Test case to run\nOptions:\nFirst: For a comparison between a baremetal machine and a VM\nSecond: For a comparison between two baremetal machines\n\nSecond argument: The Benchmark to run\nOptions:\ndhrystone\nwhetstone\nramspeed\ncachebench\n" - ;; - First) - - Fetch_VM_Image - - ipvar=$(cat $PWD/Test-cases/Bare_vs_VM/Config.yaml | grep "Machine_1_IP" | awk '{print$2;}') - - - passwordvar=$(cat $PWD/Test-cases/Bare_vs_VM/Config.yaml | grep "Machine_1_Password" | awk '{print$2;}') - - expect $PWD/data/ssh_exch.exp $ipvar $passwordvar - heat stack-create exp2 -f $PWD/Test-cases/Bare_vs_VM/SampleHeat.yaml - sleep 3 - VAR1=$( heat stack-show exp2 | grep "stack_status_reason" | awk '{print $6;}') - echo $VAR1 - while [ "$VAR1" != completed ] - do - echo VM is coming up - VAR1=$( heat stack-show exp2 | grep "stack_status_reason" | awk '{print $6;}') - #echo $VAR1 - done - echo VM Created - - if [ "$VAR1" == "completed" ]; then - VAR=$( heat stack-show exp2 | grep "output_value" | awk '{print $4;}'| cut -d '"' -f2) - - echo IP of VM is: - echo $VAR - - sed -i '/demo1/a '$VAR'' /etc/ansible/hosts - sed -i '/demo1/a '$ipvar'' /etc/ansible/hosts - - - - echo Waiting for ping - while ! ping -c1 $VAR &> /dev/null; do - echo Waiting for ping - done - - echo Ping detected - expect $PWD/data/ssh_exch.exp $VAR - Call_Test $2 - - echo cleaning environment - sleep 10 - $PWD/clean.sh - - - fi - - ;; - Second) - - ipvar=$(cat $PWD/Test-cases/Bare_vs_Bare/Config.yaml | grep "Machine_1_IP" | awk '{print$2;}') - echo $ipvar - passwordvar=$(cat $PWD/Test-cases/Bare_vs_Bare/Config.yaml | grep "Machine_1_IP_Password" | awk '{print$2;}') - echo $passwordvar - expect $PWD/data/ssh_exch.exp $ipvar $passwordvar - sed -i '/demo1/a '$ipvar'' /etc/ansible/hosts - ipvar=$(cat $PWD/Test-cases/Bare_vs_Bare/Config.yaml | grep "Machine_2_IP" | awk '{print$2;}') - passwordvar=$(cat $PWD/Test-cases/Bare_vs_Bare/Config.yaml | grep "Machine_2_IP_Password" | awk '{print$2;}') - expect $PWD/data/ssh_exch.exp $ipvar $passwordvar - sed -i '/demo1/a '$ipvar'' /etc/ansible/hosts - Call_Test $2 - echo cleaning environment - sleep 10 - $PWD/clean.sh - ;; - - *) - echo Incorrect Arguments passed to the script. Run script with -h for more help - ;; -esac - - |