diff options
author | Mofassir Arif <Mofassir_arif@dellteam.com> | 2015-12-16 02:25:51 -0800 |
---|---|---|
committer | Mofassir Arif <Mofassir_arif@dellteam.com> | 2015-12-16 03:41:54 -0800 |
commit | 8c9207f71147e9e4b44f813793c5bf04f4eba381 (patch) | |
tree | 1682854be20c020443b1fa35ed39dace5d77f9b9 | |
parent | ae3870b6863604d39bd15b0212bcf2694076a034 (diff) |
Removed Root previlages
QTIP now uses a key of its own to ssh into VMs
The ssh for the baremetal servers still needs work
Change-Id: I1aa37e07c4f9b3f7f4902d16cdbf74f39eb6c698
Signed-off-by: Mofassir Arif <Mofassir_arif@dellteam.com>
Conflicts:
.gitignore
-rw-r--r-- | .create_zones.py.swp | bin | 12288 -> 0 bytes | |||
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | benchmarks/playbooks/dhrystone.yaml | 24 | ||||
-rw-r--r-- | benchmarks/playbooks/dpi.yaml | 20 | ||||
-rw-r--r-- | benchmarks/playbooks/info_script/info_collect.py | 91 | ||||
-rw-r--r-- | benchmarks/playbooks/iperf.yaml | 4 | ||||
-rw-r--r-- | benchmarks/playbooks/ramspeed.yaml | 14 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/dpi/dpi_transform.py | 7 | ||||
-rw-r--r-- | benchmarks/playbooks/result_transform/ssl/ssl_transform.py | 16 | ||||
-rw-r--r-- | benchmarks/playbooks/ssl.yaml | 42 | ||||
-rw-r--r-- | benchmarks/playbooks/sys_info_pbook.yaml | 6 | ||||
-rw-r--r-- | benchmarks/playbooks/whetstone.yaml | 3 | ||||
-rw-r--r-- | data/QtipKey | 27 | ||||
-rw-r--r-- | data/QtipKey.pub | 1 | ||||
-rw-r--r-- | data/hosts | 4 | ||||
-rwxr-xr-x | data/ssh_exch.exp | 2 | ||||
-rw-r--r-- | func/cli.py | 2 | ||||
-rw-r--r-- | func/create_zones.py | 2 | ||||
-rw-r--r-- | func/driver.py | 6 | ||||
-rw-r--r-- | func/env_setup.py | 32 | ||||
-rw-r--r-- | func/spawn_vm.py | 30 | ||||
-rw-r--r-- | test_cases/compute/dpi_serial.yaml | 25 |
22 files changed, 122 insertions, 237 deletions
diff --git a/.create_zones.py.swp b/.create_zones.py.swp Binary files differdeleted file mode 100644 index 0467b7b2..00000000 --- a/.create_zones.py.swp +++ /dev/null @@ -29,6 +29,7 @@ var/ # before PyInstaller builds the exe, so as to inject date/other infos into it. *.manifest *.spec +*.pyc # Installer logs pip-log.txt diff --git a/benchmarks/playbooks/dhrystone.yaml b/benchmarks/playbooks/dhrystone.yaml index 34ccfd89..d825e878 100644 --- a/benchmarks/playbooks/dhrystone.yaml +++ b/benchmarks/playbooks/dhrystone.yaml @@ -2,9 +2,9 @@ connection: local tasks: - name: making dhrystone directory - file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory + file: path=../../{{Dest_dir}}/dhrystone/dhrystone_temp state=directory - name: making temporary dhrystone directory - file: path={{Dest_dir}}/dhrystone/dhrystone_temp state=directory + file: path=../../{{Dest_dir}}/dhrystone/dhrystone_temp state=directory - hosts: "{{role}}" @@ -19,11 +19,8 @@ - name: make directory shell: mkdir $HOME/qtip_result - include: ./sys_info_pbook.yaml -<<<<<<< HEAD vars: network: false -======= ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - name: Installing UnixBench dependencies if CentOS shell: yum install git gcc patch perl-Time-HiRes -y when: ansible_os_family == "RedHat" @@ -56,13 +53,13 @@ shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/dhrystone/dhrystone_temp with_items: files_to_copy.stdout_lines - name: registering log files shell: (cd $HOME/qtip_result/log/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{Dest_dir}}/dhrystone/dhrystone_temp + fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest=../../{{Dest_dir}}/dhrystone/dhrystone_temp with_items: copy_log_results.stdout_lines - name: cleaning tempT @@ -75,18 +72,13 @@ connection: local tasks: - name: extracting_json - shell: ( find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dhrystone/) + shell: ( find ../../{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/dhrystone/) - name: making_logs_folder - shell: mkdir -p {{Dest_dir}}/dhrystone/logs + shell: mkdir -p ../../{{Dest_dir}}/dhrystone/logs - name: extracting_log - shell: ( find {{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dhrystone/logs) + shell: ( find ../../{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/dhrystone/logs) - name: removing dhrystone_temp - shell: rm -rf {{Dest_dir}}/dhrystone/dhrystone_temp - - - - - + shell: rm -rf ../../{{Dest_dir}}/dhrystone/dhrystone_temp # - name: cleaning_2 # file: path=/root/tempT state=absent # file: path=/root/qtip_result state=absent diff --git a/benchmarks/playbooks/dpi.yaml b/benchmarks/playbooks/dpi.yaml index b2c87d35..3bc6e017 100644 --- a/benchmarks/playbooks/dpi.yaml +++ b/benchmarks/playbooks/dpi.yaml @@ -2,9 +2,9 @@ connection: local tasks: - name: making dpi directory - file: path={{Dest_dir}}/dpi state=directory + file: path=../../{{Dest_dir}}/dpi state=directory - name: making temporary whetstone directory - file: path={{Dest_dir}}/dpi/dpi_temp state=directory + file: path=../../{{Dest_dir}}/dpi/dpi_temp state=directory - hosts: "{{role}}" tasks: @@ -19,11 +19,8 @@ - name: make qtip_result shell: mkdir $HOME/qtip_result - include: ./sys_info_pbook.yaml -<<<<<<< HEAD vars: network: false -======= ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - name: Installing nDPI dependencies if CentOS shell: yum install git gcc patch perl-Time-HiRes autofconf automake libpcap-devel libtool -y when: ansible_os_family == "RedHat" @@ -61,13 +58,13 @@ shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.json") | cut -d'/' -f2 register: files_to_copy - name: copy results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/dpi/dpi_temp with_items: files_to_copy.stdout_lines - name: registering log files shell: (cd $HOME/qtip_result/; find . -maxdepth 1 -name "*.log") | cut -d'/' -f2 register: copy_log_results - name: copying log results - fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{Dest_dir}}/dpi/dpi_temp + fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/dpi/dpi_temp with_items: copy_log_results.stdout_lines # - name: cleaning tempD @@ -80,11 +77,10 @@ connection: local tasks: - name: extracting_json - shell: ( find {{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/dpi/) + shell: ( find ../../{{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/dpi/) - name: making_logs_folder - shell: mkdir -p {{Dest_dir}}/dpi/logs + shell: mkdir -p ../../{{Dest_dir}}/dpi/logs - name: extracting_log - shell: ( find {{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/dpi/logs) + shell: ( find ../../{{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/dpi/logs) - name: removing dpi_temp - shell: rm -rf {{Dest_dir}}/dpi/dpi_temp - + shell: rm -rf ../../{{Dest_dir}}/dpi/dpi_temp
\ No newline at end of file diff --git a/benchmarks/playbooks/info_script/info_collect.py b/benchmarks/playbooks/info_script/info_collect.py index 6dbb51b3..e286d683 100644 --- a/benchmarks/playbooks/info_script/info_collect.py +++ b/benchmarks/playbooks/info_script/info_collect.py @@ -3,97 +3,8 @@ import pickle import time import datetime import json -<<<<<<< HEAD import sys -os.system('inxi -b -c0 -n > $PWD/est_2') -est_ob=open("est_2","r+") -est_ob2=open("est_1","w+") -in_string= est_ob.read().replace('\n',' ') -cpu_idle=float(os.popen("""top -bn1 | grep "Cpu(s)" | awk '{print $8}'""").read().rstrip()) -cpu_usage= 100-cpu_idle -est_ob2.write(in_string); -est_ob.close() -est_ob2.close() - -Info_dict={}; -inxi_host=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=Host:).*(?=Kernel)' """).read().lstrip().rstrip() -inxi_mem=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=Memory:).*(?=Init)' """).read().lstrip().rstrip() -inxi_cpu=os.popen("""cat $PWD/est_1 | grep -o -P '(?<=CPU).*(?=speed)' | cut -f2 -d':'""").read().lstrip().rstrip() -inxi_distro=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Distro:).*(?=Machine:)' """).read().rstrip().lstrip() -inxi_kernel=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Kernel:).*(?=Console:)' """).read().rstrip().lstrip() -inxi_HD=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=HDD Total Size:).*(?=Info:)' """).read().rstrip().lstrip() -inxi_product=os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=product:).*(?=Mobo:)' """).read().rstrip().lstrip() - - - -Info_dict['1_Hostname']=inxi_host -Info_dict['2_Product']=inxi_product -Info_dict['3_OS Distribution']=inxi_distro -Info_dict['4_Kernel']=inxi_kernel -Info_dict['5_CPU']=inxi_cpu -Info_dict['6_CPU_Usage']=str(round(cpu_usage,3))+'%' -Info_dict['7_Memory Usage']=inxi_mem -Info_dict['8_Disk usage']=inxi_HD -network_flag=str(sys.argv[1]).rstrip() - -if (network_flag == 'n'): - - Info_dict['9_Network_Interfaces']={}; - tem_2=""" cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'""" - print os.system(tem_2+' > Hello') - i=int(os.popen(tem_2+" | grep -o 'Card' | wc -l ").read()) - print i - - - for x in range (1,i+1): - tem=""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")'""" - if i == 1: - tem=""" cat $PWD/est_1 | grep -o -P '(?<=Network:).*(?=Info:)'""" - inxi_card_1=((os.popen(tem+" | grep -o -P '(?<=Card:).*(?=Drives:)'|sed 's/ *driver:.*//'").read().rstrip().lstrip())) - print inxi_card_1 - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={}; - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1 - inxi_card_2=((os.popen(tem+"| grep -o -P '(?<=Card:).*(?=Drives:)'|sed -e 's/^.*IF: //'").read())).rstrip().lstrip() - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2 - elif x < (i): - print "two" - #inxi_Card_temp=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Card-"""+str(x+1)+""")' """).read().rstrip().lstrip())) - inxi_card_1=((os.popen(tem+"| sed 's/ *driver:.*//'").read().rstrip().lstrip())) - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={}; - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1 - inxi_card_2=((os.popen(tem+"|sed -e 's/^.*IF: //'").read())).rstrip().lstrip() - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2 - elif x == i: - print "Three" - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]={}; - inxi_card_1=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Drives:)'| sed 's/ *driver:.*//' """).read().rstrip().lstrip())) - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['1_Network_Card']=inxi_card_1 - inxi_card_2=((os.popen(""" cat $PWD/est_1 | grep -o -P '(?<=Card-"""+str(x)+""":).*(?=Drives:)'| sed -e 's/^.*IF: //' """).read().rstrip().lstrip())) - Info_dict['9_Network_Interfaces']['Interface_'+str(x)]['2_Interface_info']=inxi_card_2 - else: - print "No network cards" - os.system("bwm-ng -c 1 | grep -v '=' | grep -v 'iface' | grep -v '-' > bwm_dump") - n_interface=int(os.popen(" cat bwm_dump | grep -v 'total' | wc -l ").read().rstrip()) - interface={}; - for x in range (1,n_interface): - interface_name=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $1}' ").read().rstrip().replace(':','') - interface[str(interface_name)]={}; - interface[str(interface_name)]['Rx (KB/s)']=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $2}' ").read().rstrip() - interface[str(interface_name)]['Tx (KB/s)']=os.popen(" cat bwm_dump | awk 'NR=="+str(x)+"' | awk '{print $4}' ").read().rstrip() - interface[str(interface_name)]['Total (KB/s)']=os.popen(" cat bwm_dump | awk 'NR== "+str(x)+"' | awk '{print $6}' ").read().rstrip() - - Info_dict['Interface I/O']=interface - -print Info_dict - -with open('./sys_info_temp','w+')as out_info: - pickle.dump(Info_dict,out_info) - -with open('temp','w+') as result_json: - json.dump(Info_dict,result_json,indent=4,sort_keys=True) - -======= os.system('inxi -b -c0 -n > $PWD/est_2') est_ob = open("est_2", "r+") @@ -195,4 +106,4 @@ with open('./sys_info_temp', 'w+')as out_info: pickle.dump(Info_dict, out_info) # json.dump(Info_dict, out_json, sort_keys=True,separators=(',',':'),indent=4) ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework + diff --git a/benchmarks/playbooks/iperf.yaml b/benchmarks/playbooks/iperf.yaml index 9d4d185c..dd5c2b0f 100644 --- a/benchmarks/playbooks/iperf.yaml +++ b/benchmarks/playbooks/iperf.yaml @@ -34,6 +34,8 @@ - name: making results temporary directory shell: mkdir $HOME/qtip_result - include: ./sys_info_pbook.yaml + vars: + network: true - name: Installing Epel-release when CentOS shell: yum install epel-release -y when: ansible_os_family == "RedHat" @@ -84,4 +86,4 @@ when: role is defined - name: extracting_json shell: ( find ../../{{Dest_dir}}/iperf/iperf_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/iperf/) - when: rolename == "2-host" + when: rolename == "2-host"
\ No newline at end of file diff --git a/benchmarks/playbooks/ramspeed.yaml b/benchmarks/playbooks/ramspeed.yaml index ce2ac25d..6e317ec5 100644 --- a/benchmarks/playbooks/ramspeed.yaml +++ b/benchmarks/playbooks/ramspeed.yaml @@ -2,9 +2,9 @@ connection: local tasks: - name: making ramspeed directory - file: path={{Dest_dir}}/ramspeed state=directory + file: path=../../{{Dest_dir}}/ramspeed state=directory - name: making temporary ramspeed directory - file: path={{Dest_dir}}/ramspeed/ramspeed_temp state=directory + file: path=../../{{Dest_dir}}/ramspeed/ramspeed_temp state=directory - hosts: "{{role}}" @@ -65,18 +65,18 @@ - name: copy results - fetch: src=/root/results/{{item}} dest={{Dest_dir}}/ssl + fetch: src=/root/results/{{item}} dest=../../{{Dest_dir}}/ssl with_items: files_to_copy.stdout_lines - hosts: 127.0.0.1 connection: local tasks: - name: extracting_json - shell: ( find {{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/ramspeed/) + shell: ( find ../../{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/ramspeed/) - name: making_logs_folder - shell: mkdir -p {{Dest_dir}}/ramspeed/logs + shell: mkdir -p ../../{{Dest_dir}}/ramspeed/logs - name: extracting_log - shell: ( find {{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/ramspeed/logs) + shell: ( find ../../{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/ramspeed/logs) - name: removing ramspeed_log - shell: rm -rf {{Dest_dir}}/ramspeed/ramspeed_temp + shell: rm -rf ../../{{Dest_dir}}/ramspeed/ramspeed_temp diff --git a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py index 2aa45757..b95e0e23 100644 --- a/benchmarks/playbooks/result_transform/dpi/dpi_transform.py +++ b/benchmarks/playbooks/result_transform/dpi/dpi_transform.py @@ -46,9 +46,4 @@ result = {} result['DPI_benchmark(M pps)'] = round(dpi_result_pps, 3) result['DPI_benchmark(Gb/s)'] = round(dpi_result_bps, 3) with open('./result_temp', 'w+') as result_file: - pickle.dump(result, result_file) -<<<<<<< HEAD - -======= -print json.dumps(result, indent=4, sort_keys=True) ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework + pickle.dump(result, result_file)
\ No newline at end of file diff --git a/benchmarks/playbooks/result_transform/ssl/ssl_transform.py b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py index 575b94a0..20ca5cff 100644 --- a/benchmarks/playbooks/result_transform/ssl/ssl_transform.py +++ b/benchmarks/playbooks/result_transform/ssl/ssl_transform.py @@ -35,11 +35,7 @@ aes_1024B = os.popen( aes_8192B = os.popen( "cat AES-128-CBC_dump | grep 'aes-128-cbc ' | awk '{print $6}' ").read().rstrip() -<<<<<<< HEAD -======= -# def get_nova_client(self): ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework hostname = os.popen("hostname").read().rstrip() time_stamp = str(datetime.datetime.utcnow().isoformat()) @@ -47,13 +43,7 @@ time_stamp = str(datetime.datetime.utcnow().isoformat()) os.system("mv RSA_dump " + hostname + "-" + time_stamp + ".log") os.system("cat AES-128-CBC_dump >> " + hostname + "-" + time_stamp + ".log") -<<<<<<< HEAD -======= -# if self._glance_client is None: -## keystone = self.get_keystone_client() -# nova = client.Client('2', token = keystone.auth_token) ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework result = {} @@ -75,9 +65,3 @@ result['3. AES-128-cbc throughput']['5. 16 Bytes block (B/sec)'] = [aes_8192B] with open('./result_temp', 'w+') as result_file: pickle.dump(result, result_file) -<<<<<<< HEAD - -======= -# print json.dumps(result, indent=4, sort_keys=True) -# print result.items() ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework diff --git a/benchmarks/playbooks/ssl.yaml b/benchmarks/playbooks/ssl.yaml index 8b5b427b..d27a967d 100644 --- a/benchmarks/playbooks/ssl.yaml +++ b/benchmarks/playbooks/ssl.yaml @@ -2,17 +2,9 @@ connection: local tasks: - name: making ssl directory -<<<<<<< HEAD - file: path={{Dest_dir}}/ssl state=directory - - name: making temporary ssl directory - file: path={{Dest_dir}}/ssl/ssl_temp state=directory -======= file: path=../../{{Dest_dir}}/ssl state=directory - name: making temporary ssl directory file: path=../../{{Dest_dir}}/ssl/ssl_temp state=directory ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - - - hosts: "{{role}}" tasks: @@ -28,11 +20,8 @@ - name: making results temporary directory shell: mkdir $HOME/qtip_result - include: ./sys_info_pbook.yaml -<<<<<<< HEAD vars: network: false -======= ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - name: Installing OpenSSL dependencies when CentOS shell: yum install git wget gcc patch perl-Time-HiRes autofconf automake libpcap-devel libtool -y when: ansible_os_family == "RedHat" @@ -40,19 +29,19 @@ shell: apt-get install git gcc wget perl autoconf automake libpcap-dev libtool -y when: ansible_os_family == "Debian" - name: Fetching OpenSSL - shell: cd $HOME/Open_SSL/ && wget https://www.openssl.org/source/openssl-1.0.2d.tar.gz + shell: cd $HOME/Open_SSL/ && wget https://www.openssl.org/source/openssl-1.0.2e.tar.gz - name: Untar OpenSSL - shell: cd $HOME/Open_SSL/ && tar -zxvf openssl-1.0.2d.tar.gz + shell: cd $HOME/Open_SSL/ && tar -zxvf openssl-1.0.2e.tar.gz - name: configure - shell: cd $HOME/Open_SSL/openssl-1.0.2d && ./config + shell: cd $HOME/Open_SSL/openssl-1.0.2e && ./config - name: make - shell: cd $HOME/Open_SSL/openssl-1.0.2d && make + shell: cd $HOME/Open_SSL/openssl-1.0.2e && make - name: make install - shell: cd $HOME/Open_SSL/openssl-1.0.2d && make install + shell: cd $HOME/Open_SSL/openssl-1.0.2e && make install - name: Benchmarking RSA signatures - shell: cd $HOME/Open_SSL/openssl-1.0.2d/apps && ./openssl speed rsa >> $HOME/qtip_result/RSA_dump + shell: cd $HOME/Open_SSL/openssl-1.0.2e/apps && ./openssl speed rsa >> $HOME/qtip_result/RSA_dump - name: Benchmaring AES-128-cbc cipher encryption throughput - shell: cd $HOME/Open_SSL/openssl-1.0.2d/apps && ./openssl speed -evp aes-128-cbc >> $HOME/qtip_result/AES-128-CBC_dump + shell: cd $HOME/Open_SSL/openssl-1.0.2e/apps && ./openssl speed -evp aes-128-cbc >> $HOME/qtip_result/AES-128-CBC_dump - name: Fetching result transformation script copy: src=./result_transform/ssl/ssl_transform.py dest={{home_dir.stdout}}/qtip_result - name: Transforming result @@ -83,21 +72,10 @@ connection: local tasks: - name: extracting_json -<<<<<<< HEAD - shell: ( find {{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{Dest_dir}}/ssl/) - - name: making_logs_folder - shell: mkdir -p {{Dest_dir}}/ssl/logs - - name: extracting_log - shell: ( find {{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{Dest_dir}}/ssl/logs) - - name: removing ssl_temp - shell: rm -rf {{Dest_dir}}/ssl/ssl_temp -======= shell: ( find ../../{{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t ../../{{Dest_dir}}/ssl/) - name: making_logs_folder - shell: mkdir -p {{../../Dest_dir}}/ssl/logs + shell: mkdir -p ../../{{Dest_dir}}/ssl/logs - name: extracting_log - shell: ( find {{../../Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{../../Dest_dir}}/ssl/logs) + shell: ( find ../../{{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t ../../{{Dest_dir}}/ssl/logs) - name: removing ssl_temp - shell: rm -rf {{../../Dest_dir}}/ssl/ssl_temp ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - + shell: rm -rf ../../{{Dest_dir}}/ssl/ssl_temp
\ No newline at end of file diff --git a/benchmarks/playbooks/sys_info_pbook.yaml b/benchmarks/playbooks/sys_info_pbook.yaml index 9eca0bc3..19c811c7 100644 --- a/benchmarks/playbooks/sys_info_pbook.yaml +++ b/benchmarks/playbooks/sys_info_pbook.yaml @@ -7,7 +7,6 @@ - name: system info collection tool install when Ubuntu shell: apt-get install inxi -y when: ansible_os_family == "Debian" -<<<<<<< HEAD - name: Install ansible copy dependencies if remote host has selinux enabled shell: yum install libselinux-python -y when: ansible_os_family == "RedHat" @@ -22,11 +21,8 @@ - name: collecting system information for network test cases shell: cd $HOME/qtip_result && python info_collect.py n when: network -======= - name: system_info script copy copy: src=./info_script/info_collect.py dest={{home_dir.stdout}}/qtip_result/ - name: collecting_sys_info - shell: cd $HOME/qtip_result && python info_collect.py ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - + shell: cd $HOME/qtip_result && python info_collect.py diff --git a/benchmarks/playbooks/whetstone.yaml b/benchmarks/playbooks/whetstone.yaml index 71063815..c22ea433 100644 --- a/benchmarks/playbooks/whetstone.yaml +++ b/benchmarks/playbooks/whetstone.yaml @@ -20,11 +20,8 @@ - name: make directory shell: mkdir $HOME/qtip_result - include: ./sys_info_pbook.yaml -<<<<<<< HEAD vars: network: false -======= ->>>>>>> 5a7dcc0... Networking testcases for QTIP Framework - name: Installing UnixBench dependencies if CentOS shell: yum install git gcc patch perl-Time-HiRes -y when: ansible_os_family == "RedHat" diff --git a/data/QtipKey b/data/QtipKey new file mode 100644 index 00000000..3f520775 --- /dev/null +++ b/data/QtipKey @@ -0,0 +1,27 @@ +-----BEGIN RSA PRIVATE KEY----- +MIIEpAIBAAKCAQEAxVpAC+Q8LTyftATCgVHIKvDkXYzHI/8CZeKlVWHlHUA0/6Eu +qSrhzbpOwSaQi2C3x4Eszvh7/CfuVMql11yShsXwFD7aV6x0YG7q8IUScHILUFal +m0Fx52No7IpB3llluUV+kh8ay68V9OGvMZrQ+wWw4ieh2alUnpvFwteXmb8NQtXW +6pm2algUVixc4R3//YKLnGkj93pGFlQlDz5Q0vg+69jHNgodGewIrxCWeZk2pnn0 +vNAdWTQUTm7z/1uYz6AIeR/Wx66msmchFRmmDpP7aHXSSQEBySF7v/GEsZ1JwtBW +07WebNiTv9wYoOfyKVuZuTbBwjqlT4x5CpIJEwIDAQABAoIBAFHcDZThJtTcwKG7 +F7LsaUrmgNMNAc08iZIZYNr5sD9h0pn2EZS55M+g5+nWRT6K77AhNKTlDQiax5EE +PaYHEAA3Ok4rhAW50svtNiZuDCf4Jhk815R+oPCJm4wCDTBdhIRE/ys9G7BA/6qD +slexD94Pjj9AkTHnuuHPW0hmhMuQaSg96EO6QUWCG/HeMFDGcorBlM0s+NeR46Jm +dI8tOvt+rSa68oDtKEwhUbP5cATNdAITzo9+4We5EnYhW9/nRsaF/um2BPih6JnU +zG9udvZwj+YARmEfxhXzeRDpi30qYil/+CUF+qdyd8eoPBvhsW6rr1TA6XYGmPDN +SnlPLAECgYEA6RtgGqL34orxiqT3tDkA2Lb4aSq9Zntr09VAqwft4I3550XihHsa +lqJoy2macX36f60oRDZEL3v4cH22zyjojav4MXe2fLlCiApy45xCzsGkWizxTe5D +184jUIcRxb/sGbOulbXBdu8lmtNiyslvkAoj75bvL2MXhytbYgikhrMCgYEA2Lv1 +9Os+VXT9py/67dO/GY14NUpT1sFq2zxPYWpKxJD+j/NVZsflpPd/V5cGANZGovA0 +c8WNupJmCO1P20uldRX5dJ3EhhER2kn0yKhZuBBxmrELQZdnXGc9T8ub0xJVbo2u +K3Km3C1Dx7Us4BwzGOO6K2kYbT1ij/vAbZWmpCECgYBdkhqStqYwbrukfrHbyyH2 +3AN9G6XpdFOFNc3+mXE4OWV+G4Rgz5WNr+XG+T4AnqQmChjmwK3ALdA9P4lZQL+Q +1t4K5VYAXNFDEIarrPb4Tayucenu8VyUTO/KDF3q9i5M5t6Gw+3D0x1SN9YpNpCs +zhU8wGaErA8uuA23nWaFlwKBgQDXSf6MB5GnucqtZI/R5uCRNWIPLYISdZb7p/EC +R1912sHDpGdU7YREVkV8cFxaQH9yI0E3LyoWBo6sl28X2xDEOcvN91ncAuDFAWnS +WMimek8e5nbT9N2LgFH7Dbn/9NpAMySrq/vsAlqt6l5lUB3Bv5SSwpatDKj3dZA0 +Ss95gQKBgQCvwxW4PSd+hxdofwGd6KBwhA404GPdcVLLmASGVYRNcVNyfhUmMCn+ +UF1WsBCOcnWjJ/pT864S9Rp1bbqzpQS8Pz1vJwhkaHEJD0a5l+KhD4llsWDjUNfI +KfVffcmydNC3uRD59WPZEAgu+gOS8kRw7lybFTNuMS7B3dC5v9UtWg== +-----END RSA PRIVATE KEY----- diff --git a/data/QtipKey.pub b/data/QtipKey.pub new file mode 100644 index 00000000..7a40f91c --- /dev/null +++ b/data/QtipKey.pub @@ -0,0 +1 @@ +ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFWkAL5DwtPJ+0BMKBUcgq8ORdjMcj/wJl4qVVYeUdQDT/oS6pKuHNuk7BJpCLYLfHgSzO+Hv8J+5UyqXXXJKGxfAUPtpXrHRgburwhRJwcgtQVqWbQXHnY2jsikHeWWW5RX6SHxrLrxX04a8xmtD7BbDiJ6HZqVSem8XC15eZvw1C1dbqmbZqWBRWLFzhHf/9goucaSP3ekYWVCUPPlDS+D7r2Mc2Ch0Z7AivEJZ5mTamefS80B1ZNBRObvP/W5jPoAh5H9bHrqayZyEVGaYOk/toddJJAQHJIXu/8YSxnUnC0FbTtZ5s2JO/3Big5/IpW5m5NsHCOqVPjHkKkgkT root@foreman-jump.opnfv.com diff --git a/data/hosts b/data/hosts new file mode 100644 index 00000000..85948586 --- /dev/null +++ b/data/hosts @@ -0,0 +1,4 @@ +[2-host] +172.18.0.121 +[1-server] +172.18.0.122 diff --git a/data/ssh_exch.exp b/data/ssh_exch.exp index 4ced0c6a..c52140b7 100755 --- a/data/ssh_exch.exp +++ b/data/ssh_exch.exp @@ -2,7 +2,7 @@ set timeout 4 set ip [lindex $argv 0] set pswd [lindex $argv 1] -spawn ssh-copy-id -i /root/.ssh/id_rsa.pub $ip +spawn ssh-copy-id -i QtipKey $ip expect "Are you sure you want to continue connecting" {send "yes\r"} expect "password:" { send "$pswd\r"} diff --git a/func/cli.py b/func/cli.py index 33aacbcb..83a7c36f 100644 --- a/func/cli.py +++ b/func/cli.py @@ -43,7 +43,7 @@ class cli(): [benchmark, roles, vm_info, benchmark_details, pip] = obj.parse('./test_cases/' + args.suite + '/' + args.benchmark) - + if len(vm_info) != 0: vmObj = SpawnVM(vm_info) obj.callpingtest() diff --git a/func/create_zones.py b/func/create_zones.py index 86cfc23b..a21fb41f 100644 --- a/func/create_zones.py +++ b/func/create_zones.py @@ -55,7 +55,7 @@ class create_zones: agg_name_exist = False for x in list1: - + if x.name == agg_name: agg_name_exist = True return agg_name_exist diff --git a/func/driver.py b/func/driver.py index 83e64a80..318c67b3 100644 --- a/func/driver.py +++ b/func/driver.py @@ -28,7 +28,7 @@ class Driver: self.dic_json['Dest_dir'] = str(result_dir) self.dic_json['ip1']='' self.dic_json['ip2']='' - + for k,v in benchmark_detail: self.dic_json[k]=v for k, v in roles: @@ -43,8 +43,8 @@ class Driver: index= index+1 dic_json = json.dumps(dict(self.dic_json.items())) print dic_json - run_play = 'ansible-playbook -s ./benchmarks/playbooks/{0} --extra-vars \'{1}\' -vvv'.format(benchmark_name, dic_json) + run_play = 'ansible-playbook -s ./benchmarks/playbooks/{0} --private-key=./data/QtipKey -i ./data/hosts --extra-vars \'{1}\' '.format(benchmark_name, dic_json) # run_play = 'ansible-playbook -s $PWD/benchmarks/playbooks/{0} --extra-vars "Dest_dir={1} role={2}" -vvv'.format( # benchmark_name, result_dir, k) status = os.system(run_play) - + diff --git a/func/env_setup.py b/func/env_setup.py index 1db54564..f3c01a7c 100644 --- a/func/env_setup.py +++ b/func/env_setup.py @@ -28,7 +28,7 @@ class Env_setup(): print '\nParsing class initiated\n' def writeTofile(self, role): - fname2 = open('/etc/ansible/hosts', 'w') + fname2 = open('./data/hosts', 'w') print role.items() for k in role: fname2.write('[' + k + ']\n') @@ -44,48 +44,46 @@ class Env_setup(): pwvar = v print '\nBeginning SSH Test!\n' if v != '': - print ('\nSSH->>>>> %s\n' % k) + print ('\nSSH->>>>> {0} {1}\n'.format(k,v)) time.sleep(2) ssh_c = 'ssh-keyscan {0} >> ~/.ssh/known_hosts'.format(k) - os.system(ssh_c) - ssh_cmd = 'expect ./data/ssh_exch.exp {0} {1}'.format( - ipvar, pwvar) - res = os.system(ssh_cmd) - ''' + #os.system(ssh_c) + ssh_cmd = 'expect ./data/ssh_exch.exp {0} {1}'.format(ipvar, pwvar) + print ssh_cmd + res = os.system(ssh_cmd) for infinity in range(10000): try : ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh.connect(hostname = k , username = 'root', password = v) + ssh.connect(k , username = 'root', password = v) stdin, stdout, stderr = ssh.exec_command('ls') print('SSH successful') break except: print 'Retrying SSH' - time.sleep(1) - ''' + time.sleep(1) if v == '': print ('SSH->>>>>', k) ssh_c = 'ssh-keyscan {0} >> ~/.ssh/known_hosts'.format(k) time.sleep(3) os.system(ssh_c) - + for infinity in range(10000): try : ssh = paramiko.SSHClient() ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy()) - ssh.connect(hostname = k ) + ssh.connect(k, key_filename= './data/QtipKey') stdin, stdout, stderr = ssh.exec_command('ls') break except: print 'Retrying SSH' - + def pingtest(self, lister): + pingFlag = 0 - for k, v in lister.iteritems(): time.sleep(10) for val in v: @@ -98,9 +96,9 @@ class Env_setup(): print ('\n\n %s is UP \n\n ' % ipvar) def GetHostMachineinfo(self, Hosttag): + num = len(Hosttag) offset = len(self.roles_ip_list) - for x in range(num): hostlabel = 'machine_' + str(x + 1) self.roles_ip_list.insert( @@ -109,6 +107,7 @@ class Env_setup(): offset, (Hosttag[hostlabel]['ip'], Hosttag[hostlabel]['pw'])) def GetVirtualMachineinfo(self, Virtualtag): + num = len(Virtualtag) for x in range(num): hostlabel = 'virtualmachine_' + str(x + 1) @@ -116,7 +115,7 @@ class Env_setup(): self.vm_parameters[k].append(v) def GetBenchmarkDetails(self, detail_dic): - + print detail_dic for k,v in detail_dic.items(): self.benchmark_details[k]= v @@ -135,7 +134,6 @@ class Env_setup(): self.GetHostMachineinfo(doc['Context']['Host_Machines']) if doc.get('Scenario',{}).get('benchmark_details',{}): self.GetBenchmarkDetails(doc.get('Scenario',{}).get('benchmark_details',{})) - for k, v in self.roles_ip_list: self.roles_dict[k].append(v) for k, v in self.ip_pw_list: diff --git a/func/spawn_vm.py b/func/spawn_vm.py index c1bacedc..e7947008 100644 --- a/func/spawn_vm.py +++ b/func/spawn_vm.py @@ -7,8 +7,6 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## - - import os import sys from collections import defaultdict @@ -23,7 +21,6 @@ import time import json from func.create_zones import create_zones - class SpawnVM(Env_setup): vm_role_ip_dict = defaultdict(list) @@ -54,7 +51,8 @@ class SpawnVM(Env_setup): print 'Error in qtip/heat/SampleHeat.yaml at: (%s,%s)' % (mark.line + 1, mark.column + 1) print 'EXITING PROGRAM. Correct File and restart' sys.exit(0) - fopen = open('/root/.ssh/id_rsa.pub', 'r') + #fopen = open('/root/.ssh/id_rsa.pub', 'r') + fopen = open('./data/QtipKey.pub', 'r') fopenstr = fopen.read() fopenstr = fopenstr.rstrip() scriptcmd = '#!/bin/bash \n echo {0} >> foo.txt \n echo {1} >> /root/.ssh/authorized_keys'.format( @@ -77,9 +75,9 @@ class SpawnVM(Env_setup): 'description': 'Availability Zone of the instance', 'default': avail_zone, 'type': 'string' - + } - + Heat_Dic['resources']['public_port_' +str(x)] = { 'type': 'OS::Neutron::Port', 'properties': { @@ -124,18 +122,18 @@ class SpawnVM(Env_setup): 'port_range_min': 22, 'port_range_max': 5201}, {'protocol': 'icmp'}]}} - + Heat_Dic['outputs']['instance_PIP_' +str(x)] = { 'description': 'IP address of the instance', 'value': {'get_attr': ['my_instance_' + str(x), 'first_address']}} Heat_Dic['outputs']['instance_ip_' +str(x)] = { 'description': 'IP address of the instance', 'value': {'get_attr': ['floating_ip_' + str(x), 'floating_ip_address']}} - + Heat_Dic['outputs']['availability_instance_' + str(x)] = { 'description': 'Availability Zone of the Instance', 'value': { 'get_param': 'availability_zone_'+str(x)}} - + Heat_Dic['outputs']['KeyPair_PublicKey'] = { 'description': 'Private Key', @@ -206,7 +204,7 @@ class SpawnVM(Env_setup): qtip_image = glance.images.upload( qtip_image.id, open('./Temp_Img/QTIP_CentOS.qcow2')) json_temp = json.dumps(Heat_template) - + for checks in range(3): for prev_stacks in heat.stacks.list(): @@ -216,13 +214,13 @@ class SpawnVM(Env_setup): time.sleep(10) print '\nStack Creating Started\n' - + # try: heat.stacks.create(stack_name=stackname, template=Heat_template) #except: #print 'Create Failed :( ' - + cluster_detail = heat.stacks.get(stackname) while(cluster_detail.status != 'COMPLETE'): if cluster_detail.status == 'IN_PROGRESS': @@ -237,10 +235,10 @@ class SpawnVM(Env_setup): for I in cluster_detail.outputs: availabilityKey = 'availability_instance_'+str(vm+1) - + if I['output_key'] == availabilityKey: zone.insert(s,str(I['output_value'])) - s=s+1 + s=s+1 for i in cluster_detail.outputs: instanceKey = "instance_ip_" + str(vm + 1) privateIPkey = 'instance_PIP_' + str(vm +1) @@ -248,13 +246,13 @@ class SpawnVM(Env_setup): Env_setup.roles_dict[vm_role_ip_dict['role'][vm]].append( str(i['output_value'])) Env_setup.ip_pw_list.append((str(i['output_value']),'')) - + if i['output_key'] == privateIPkey: Env_setup.ip_pw_dict[vm_role_ip_dict['role'][vm]]=str(i['output_value']) if i['output_key'] == 'KeyPair_PublicKey': sshkey = str(i['output_value']) - with open('/root/.ssh/my_key.pem', 'w') as fopen: + with open('./data/my_key.pem', 'w') as fopen: fopen.write(sshkey) fopen.close() print Env_setup.ip_pw_list diff --git a/test_cases/compute/dpi_serial.yaml b/test_cases/compute/dpi_serial.yaml index 539975f7..e8f34627 100644 --- a/test_cases/compute/dpi_serial.yaml +++ b/test_cases/compute/dpi_serial.yaml @@ -6,18 +6,14 @@ Scenario: Context: Host_Machines: machine_1: - ip: 172.18.0.76 - pw: r00tme + ip: 172.18.0.17 + pw: Op3nStack + role: 1host + machine_2: + ip: 172.18.0.16 + pw: Op3nStack role: 1host - Virtual_Machines: - virtualmachine_1: - availability_zone: compute1 - OS_image: QTIP_CentOS - public_network: 'provider_network' - role: 2host - flavor: m1.large - Test_Description: Test_category: "Compute" Benchmark: "dpi" @@ -28,6 +24,15 @@ Test_Description: availability_zone: compute1 OS_image: QTIP_CentOS public_network: 'provider_network' + + Virtual_Machines: + virtualmachine_1: + availability_zone: compute1 + OS_image: QTIP_CentOS + public_network: 'provider_network' + role: 2host + flavor: m1.large + role: 1host flavor: m1.large machine_1: |