diff options
-rw-r--r-- | INFO | 27 | ||||
-rwxr-xr-x | QTIP.sh | 116 | ||||
-rw-r--r-- | README | 47 | ||||
-rw-r--r-- | Test-cases/SampleHeat.yaml | 93 | ||||
-rw-r--r-- | benchmarks/playbooks/cachebench.yaml (renamed from playboooks/cachebench.yaml) | 15 | ||||
-rw-r--r-- | benchmarks/playbooks/dhrystone.yaml | 31 | ||||
-rw-r--r-- | benchmarks/playbooks/ramspeedbench.yaml | 38 | ||||
-rw-r--r-- | benchmarks/playbooks/whetstone.yaml | 31 | ||||
-rwxr-xr-x | clean.sh | 6 | ||||
-rwxr-xr-x | data/ssh_exch.exp | 12 | ||||
-rw-r--r-- | playboooks/dhrystone.yaml | 16 | ||||
-rw-r--r-- | playboooks/whetstone.yaml | 16 |
12 files changed, 415 insertions, 33 deletions
@@ -0,0 +1,27 @@ +Project Name: QTIP, Platform Performance Benchmarking +Project Repository: QTIP +Project Category: Integration & Testing +Etherpad: https://etherpad.opnfv.org/p/Qtip +Jira: https://jira.opnfv.org/browse/QTIP +Gerrit: https://gerrit.opnfv.org/gerrit/#/admin/projects/qtip +GIT: https://git.opnfv.org/cgit/qtip/ +Mailing list tag: [QTIP] +IRC: #opnfv-qtip +Project Wiki: https://wiki.opnfv.org/platform_performance_benchmarking + + + +Committers: + +Wenjing Chu, wenjing_chu@dell.com +Shrinivas Chavan, shrinivas.chavan@ericsson.com +Sheng-Ann Yu sheng-ann.yu@ericsson.com +Rodriguez, Iben Iben.Rodriguez@spirent.com +Prabu, Kuppuswamy Prabu.Kuppuswamy@spirent.com +Cooper, Trevor trevor.cooper@intel.com +Michael Haugh mhaugh@ixiacom.com +Prakash Ramchandran Prakash.Ramchandran@huawei.com +Richomme, Morgan morgan.richomme@orange.com + + + diff --git a/QTIP.sh b/QTIP.sh new file mode 100755 index 00000000..dcefb29f --- /dev/null +++ b/QTIP.sh @@ -0,0 +1,116 @@ +#! /bin/bash + +#DIR1= $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 + +} + +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) + + echo "Enter the IP of the machine to be teststed for comparison to the VM" + read ipvar + echo "Enter the password of this machine" + read -s passwordvar + expect $PWD/data/ssh_exch.exp $ipvar $passwordvarp + heat stack-create exp2 -f $PWD/Test-cases/SampleHeat.yaml + + 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) + echo Second test to be written below + echo "Enter the IP of the first machine to be benchmarked for comparison" + read ipvar + echo "Enter the password of this machine" + read -s passwordvar + expect $PWD/data/ssh_exch.exp $ipvar $passwordvar + sed -i '/demo1/a '$ipvar'' /etc/ansible/hosts + echo "Enter the IP of the second machine to be benchmarked for comparison" + read ipvar + echo "Enter the password of this machine" + read -s passwordvar + 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 helo + +esac + + @@ -0,0 +1,47 @@ +QTIP Benchmark sutie +--------------------- + + +QTIP is a benchmarking suite intendend to benchmark the following components of the OPNF Plaform: +1. Computing components +2. Networking components +3. Storage components + +The efforts in QTIP are mostly focused on identifying +1. Benchmarks to run +2. Test cases in which these benchmarks to run +3. Automation of suite to run benchmarks within different test cases +4. Collection of test results + + + +QTIP currently consists of a bash script (QTIP.sh). + +The script can run 4 comuting benchmarks: +1. Dhrystone +2. Whetstone +3. RamBandwidth +4. Cachebandwidth + +These benchmarks can be run in 2 test cases: +1. VM vs Baremetal +2. Baremetal vs Baremeatl + +Instructions to run the script: +1. Download the OpenStack adminrc file for the deployment on which you want to create the VM for benchmarking +2. run ./QTIP {TEST CASE} {BENCHMARK} +3. ./QTIP.sh -h for more help + +Requirments: +1. Ansible 1.9.2 +2. Python 2.7 + + + +A robust framework that would allow to include more tests would be included within the future + + + + + + diff --git a/Test-cases/SampleHeat.yaml b/Test-cases/SampleHeat.yaml new file mode 100644 index 00000000..0cf0c45f --- /dev/null +++ b/Test-cases/SampleHeat.yaml @@ -0,0 +1,93 @@ + heat_template_version: 2014-10-16 + + description: Test10 + + parameters: + + public_network: + type: string + label: Public Network name or ID + description: Public network with floating IPs + default: "provider_network" + + private_net_name: + type: string + default: "private_network" + + availability_zone: + type: string + description: The Availability Zone to launch the instance. + default: compute1 + + resources: + + private_network: + type: OS::Neutron::Net + + + private_subnet: + type: OS::Neutron::Subnet + properties: + network_id: { get_resource: private_network } + cidr: 10.10.17.0/24 + dns_nameservers: + - 8.8.8.8 + + router_1: + type: OS::Neutron::Router + properties: + external_gateway_info: + network: { get_param: public_network } + + router_interface: + type: OS::Neutron::RouterInterface + properties: + router_id: { get_resource: router_1 } + subnet: { get_resource: private_subnet } + + public_port: + type: OS::Neutron::Port + properties: + network: { get_resource: private_network } + security_groups: [{ get_resource: demo1_security_Group }] + + floating_ip: + type: OS::Neutron::FloatingIP + properties: + floating_network: { get_param: public_network } + + floating_ip_assoc: + type: OS::Neutron::FloatingIPAssociation + properties: + floatingip_id: { get_resource: floating_ip } + port_id: { get_resource: public_port } + + demo1_security_Group: + type: OS::Neutron::SecurityGroup + properties: + name: demo1_security_Group + rules: + - protocol: tcp + port_range_min: 22 + port_range_max: 22 + - protocol: icmp + + my_instance: + type: OS::Nova::Server + properties: + image: CentOS + flavor: m1.large + availability_zone: { get_param: availability_zone } + networks: + - port: { get_resource: public_port } + + + + outputs: + instance_ip: + description: IP address of the instance + value: { get_attr: [floating_ip, floating_ip_address] } + + + + diff --git a/playboooks/cachebench.yaml b/benchmarks/playbooks/cachebench.yaml index 13b968b4..d0e04140 100644 --- a/playboooks/cachebench.yaml +++ b/benchmarks/playbooks/cachebench.yaml @@ -7,12 +7,16 @@ shell: rm -rf /usr/share/doc/phoronix-test-suite/ shell: rm -rf /usr/share/phoronix-test-suite shell: rm -rf /root/photmp/ + - name: cleaning results + file: path=/root/results state=absent - name: make direc file: path=/root/photmp/ state=directory - name: Fetch Phornonix shell: cd /root/photmp/ && wget https://www.dropbox.com/s/5kks513ozxy7vvs/phoronix-suite.tar.gz - name: unarchive Phoronix shell: cd /root/photmp/ && tar -zxvf phoronix-suite.tar.gz + - name: Install Phornonix Dependencies + shell: yum install php php-xml php-client php-process -y - name: Install Phornonix shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh - name: batchSetup @@ -21,5 +25,14 @@ shell: phoronix-test-suite batch-install cachebench - name: run shell: phoronix-test-suite batch-run cachebench + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /var/lib/phoronix-test-suite/test-results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy - name: copy results - shell: scp -r /var/lib/phoronix-test-suite/test-results/* root@172.18.0.11:/root/results/cachebench/ + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/cachebench + with_items: files_to_copy.stdout_lines + diff --git a/benchmarks/playbooks/dhrystone.yaml b/benchmarks/playbooks/dhrystone.yaml new file mode 100644 index 00000000..d0e5f20d --- /dev/null +++ b/benchmarks/playbooks/dhrystone.yaml @@ -0,0 +1,31 @@ + + - hosts: demo1 + + tasks: + - name: cleaning + file: path=/root/tempT state=absent + - name: cleaning results + file: path=/root/results state=absent + - name: Installing UnixBench dependencies + shell: yum install git gcc patch perl-Time-HiRes -y + - name: Clone unixbench + shell: git clone https://github.com/kdlucas/byte-unixbench.git /root/tempT + - name: make + shell: make --directory /root/tempT/UnixBench/ + - name: downloading_patch + shell: cd /root/tempT/UnixBench/ && wget https://www.dropbox.com/s/11z85gfu0trkhus/fix-limitation.patch + - name: applying_patch + shell: cd /root/tempT/UnixBench/ && patch Run fix-limitation.patch + - name: Run dhrystone + shell: cd /root/tempT/UnixBench/&&./Run -v dhrystone + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /root/tempT/UnixBench/results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/dhrystone + with_items: files_to_copy.stdout_lines + diff --git a/benchmarks/playbooks/ramspeedbench.yaml b/benchmarks/playbooks/ramspeedbench.yaml new file mode 100644 index 00000000..37ea91a8 --- /dev/null +++ b/benchmarks/playbooks/ramspeedbench.yaml @@ -0,0 +1,38 @@ + + - hosts: demo1 + + tasks: + - name: clean + shell: rm -rf /usr/bin/phoronix-test-suite + shell: rm -rf /usr/share/doc/phoronix-test-suite/ + shell: rm -rf /usr/share/phoronix-test-suite + shell: rm -rf /root/photmp/ + - name: clean previous results + file: path=/root/results path=absent + - name: make direc + file: path=/root/photmp/ state=directory + - name: Fetch Phornonix + shell: cd /root/photmp/ && wget https://www.dropbox.com/s/5kks513ozxy7vvs/phoronix-suite.tar.gz + - name: unarchive Phoronix + shell: cd /root/photmp/ && tar -zxvf phoronix-suite.tar.gz + - name: Phornonix Dependencies + shell: yum install php php-xml php-client php-process -y + - name: Install Phornonix + shell: cd /root/photmp/phoronix-test-suite-master/&&./install-sh + - name: batchSetup + shell: phoronix-test-suite batch-setup + - name: install + shell: phoronix-test-suite batch-install ramspeed + - name: run + shell: phoronix-test-suite batch-run ramspeed + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /var/lib/phoronix-test-suite/test-results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/dhrystone + with_items: files_to_copy.stdout_lines + diff --git a/benchmarks/playbooks/whetstone.yaml b/benchmarks/playbooks/whetstone.yaml new file mode 100644 index 00000000..497797ff --- /dev/null +++ b/benchmarks/playbooks/whetstone.yaml @@ -0,0 +1,31 @@ + + - hosts: demo1 + + tasks: + - name: cleaning + shell: rm -rf /root/tempT + - name: cleaning previous results + file: path=/root/results state=absent + - name: Installing UnixBench dependencies + shell: yum install git gcc patch perl-Time-HiRes -y + - name: Clone unixbench + shell: git clone https://github.com/kdlucas/byte-unixbench.git /root/tempT + - name: make + shell: make --directory /root/tempT/UnixBench/ + - name: downloading_patch + shell: cd /root/tempT/UnixBench/ && wget https://www.dropbox.com/s/11z85gfu0trkhus/fix-limitation.patch + - name: applying_patch + shell: cd /root/tempT/UnixBench/ && patch Run fix-limitation.patch + - name: Run whetstone + shell: cd /root/tempT/UnixBench/&&./Run -v whetstone + - name: making directory + file: path=/root/results state=directory + - name: copying result to temp directory + shell: cp -r /root/tempT/UnixBench/results/* /root/results/ + - name: registering files + shell: (cd /root/results/; find . -maxdepth 1 -type f) | cut -d'/' -f2 + register: files_to_copy + - name: copy results + fetch: src=/root/results/{{item}} dest={{Dest_dir}}/whetstone + with_items: files_to_copy.stdout_lines + diff --git a/clean.sh b/clean.sh new file mode 100755 index 00000000..69aab1bf --- /dev/null +++ b/clean.sh @@ -0,0 +1,6 @@ +#! /bin/bash +echo cleaning Ip + +sed -i -e '/demo1/{n;N;N;N;N;N;d}' /etc/ansible/hosts +neutron floatingip-delete $(neutron floatingip-list| grep "17" | awk '{print $2;}') +heat stack-delete exp2 diff --git a/data/ssh_exch.exp b/data/ssh_exch.exp new file mode 100755 index 00000000..1b462c42 --- /dev/null +++ b/data/ssh_exch.exp @@ -0,0 +1,12 @@ +#1 /usr/bin/expect +set timeout 4 +set ip [lindex $argv 0] +set pswd [lindex $argv 1] +spawn ssh-copy-id -i /root/.ssh/id_rsa $ip +expect "Are you sure you want to continue connecting" {send "yes\r"} +expect "password" { send "$pswd\r"} + +interact + + + diff --git a/playboooks/dhrystone.yaml b/playboooks/dhrystone.yaml deleted file mode 100644 index e0b4842c..00000000 --- a/playboooks/dhrystone.yaml +++ /dev/null @@ -1,16 +0,0 @@ - - - hosts: demo1 - - tasks: - - name: cleaning - shell: rm -rf /root/tempT - - name: Install git - shell: yum install git -y - - name: Clone unixbench - shell: git clone https://github.com/kdlucas/byte-unixbench.git /root/tempT - - name: make - shell: make --directory /root/tempT/UnixBench/ - - name: Run dhrystone - shell: cd /root/tempT/UnixBench/&&./Run -v dhrystone - - name: copy results - shell: scp -r /root/tempT/UnixBench/results/* root@172.18.0.11:/root/results/dhrystone diff --git a/playboooks/whetstone.yaml b/playboooks/whetstone.yaml deleted file mode 100644 index f07ea073..00000000 --- a/playboooks/whetstone.yaml +++ /dev/null @@ -1,16 +0,0 @@ - - - hosts: demo1 - - tasks: - - name: cleaning - shell: rm -rf /root/tempT - - name: Install git - shell: yum install git -y - - name: Clone unixbench - shell: git clone https://github.com/kdlucas/byte-unixbench.git /root/tempT - - name: make - shell: make --directory /root/tempT/UnixBench/ - - name: Run whetstone - shell: cd /root/tempT/UnixBench/&&./Run -v whetstone - - name: copy results - shell: scp -r /root/tempT/UnixBench/results/* root@172.18.0.11:/root/results/whetstone |