diff options
-rw-r--r-- | benchmarks/perftest/dhrystone.yaml | 25 | ||||
-rw-r--r-- | benchmarks/perftest/dpi.yaml | 26 | ||||
-rw-r--r-- | benchmarks/perftest/fio.yaml | 29 | ||||
-rw-r--r-- | benchmarks/perftest/iperf.yaml | 25 | ||||
-rw-r--r-- | benchmarks/perftest/ramspeed.yaml | 24 | ||||
-rw-r--r-- | benchmarks/perftest/ssl.yaml | 30 | ||||
-rw-r--r-- | benchmarks/perftest/whetstone.yaml | 30 | ||||
-rw-r--r-- | config/QtipKey | 27 | ||||
-rw-r--r-- | config/QtipKey.pub | 1 | ||||
-rwxr-xr-x | docker/run_qtip.sh | 9 | ||||
-rw-r--r-- | func/args_handler.py | 10 | ||||
-rw-r--r-- | func/env_setup.py | 6 | ||||
-rw-r--r-- | qtip.py | 2 | ||||
-rw-r--r-- | scripts/cleanup_creds.sh | 14 | ||||
-rwxr-xr-x | scripts/file_permission.sh | 3 |
15 files changed, 144 insertions, 117 deletions
diff --git a/benchmarks/perftest/dhrystone.yaml b/benchmarks/perftest/dhrystone.yaml index 5f83bbb0..7899bbd7 100644 --- a/benchmarks/perftest/dhrystone.yaml +++ b/benchmarks/perftest/dhrystone.yaml @@ -19,29 +19,29 @@ register: home_dir - name: cleaning tempT - shell: sudo rm -rf $HOME/tempT + file: path=$HOME/tempT state=absent - name: cleaning qtip_result - shell: sudo rm -rf $HOME/qtip_result + file: path=$HOME/qtip_result state=absent - name: make directory - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: false - name: Installing UnixBench dependencies if CentOS - shell: sudo yum install git gcc patch perl-Time-HiRes -y + shell: yum install git gcc patch perl-Time-HiRes -y when: ansible_os_family == "RedHat" - name: Installing UnixBench dependencies if Ubuntu - shell: sudo apt-get install git gcc patch perl -y + shell: apt-get install git gcc patch perl -y when: ansible_os_family == "Debian" - - include: ../common/git_proxy_pbook.yaml + - include: ./common/git_proxy_pbook.yaml - name: Clone unixbench git: repo=https://github.com/kdlucas/byte-unixbench.git @@ -88,11 +88,10 @@ with_items: "{{copy_log_results.stdout_lines}}" - name: cleaning tempT - shell: sudo rm -rf $HOME/tempT + file: path=$HOME/tempT state=absent - name: cleaning_qtip_result - shell: sudo rm -rf $HOME/qtip_result - + file: path=$HOME/qtip_result state=absent - hosts: localhost connection: local @@ -103,10 +102,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/dhrystone/logs + file: path={{workingdir}}/{{Dest_dir}}/dhrystone/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dhrystone/logs) - name: removing dhrystone_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp + file: path={{workingdir}}/{{Dest_dir}}/dhrystone/dhrystone_temp state=directory diff --git a/benchmarks/perftest/dpi.yaml b/benchmarks/perftest/dpi.yaml index 59d01d58..5ce5d09b 100644 --- a/benchmarks/perftest/dpi.yaml +++ b/benchmarks/perftest/dpi.yaml @@ -22,17 +22,17 @@ register: home_dir - name: cleaning - shell: sudo rm -rf $HOME/tempD + file: path=$HOME/tempD state=absent - name: cleaning previous results - shell: sudo rm -rf $HOME/qtip_result + file: path=$HOME/qtip_result state=absent - name: make qtip_result - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: false @@ -45,9 +45,9 @@ when: ansible_os_family == "Debian" - name: making nDPI temporary directory - shell: sudo mkdir $HOME/tempD + file: path=$HOME/tempD state=directory - - include: ../common/git_proxy_pbook.yaml + - include: ./common/git_proxy_pbook.yaml - name: Clone nDPI git: repo=https://github.com/ntop/nDPI.git @@ -66,7 +66,7 @@ shell: cd $HOME/tempD/nDPI/example && wget http://build.opnfv.org/artifacts.opnfv.org/qtip/utilities/test.pcap - name: fetch Averaging script - copy: src=../etc/dpi_average.sh dest={{home_dir.stdout}}/tempD/nDPI/example mode=777 + copy: src=./etc/dpi_average.sh dest={{home_dir.stdout}}/tempD/nDPI/example mode=777 - name: Run nDPI benchmark shell: cd $HOME/tempD/nDPI/example && sudo ./dpi_average.sh @@ -102,6 +102,12 @@ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp with_items: "{{copy_log_results.stdout_lines}}" + - name: cleaning tempD + file: path=$HOME/tempD state=absent + + - name: cleaning_qtip_result + file: path=$HOME/qtip_result state=absent + - hosts: localhost connection: local gather_facts: no @@ -111,10 +117,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/dpi/logs + file: path={{workingdir}}/{{Dest_dir}}/dpi/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/dpi/logs) - name: removing dpi_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/dpi/dpi_temp + file: path={{workingdir}}/{{Dest_dir}}/dpi/dpi_temp state=absent diff --git a/benchmarks/perftest/fio.yaml b/benchmarks/perftest/fio.yaml index bd29c127..94a4c80d 100644 --- a/benchmarks/perftest/fio.yaml +++ b/benchmarks/perftest/fio.yaml @@ -19,21 +19,21 @@ shell: echo $HOME register: home_dir - - name: cleaning - shell: sudo rm -rf $HOME/fio + - name: cleaning fio directory + file: path=$HOME/fio state=absent - name: cleaning previous results - shell: sudo rm -rf $HOME/qtip_result + file: path=$HOME/qtip_result state=absent - name: making fio temporary directory - shell: sudo mkdir $HOME/fio + file: path=$HOME/fio state=directory - name: making results temporary directory - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: false @@ -47,13 +47,15 @@ - name: Fetching fio shell: cd $HOME/fio/ && wget http://freecode.com/urls/3aa21b8c106cab742bf1f20d60629e3f -O fio.tar.gz + - name: Untar fio shell: cd $HOME/fio/ && sudo tar -zxvf fio.tar.gz + - name: configure shell: cd $HOME/fio/fio-2.1.10 && sudo ./configure && sudo make - name: Fetching fio job - copy: src=../etc/fio_test_job dest={{home_dir.stdout}}/fio/fio-2.1.10/ + copy: src=./etc/fio_test_job dest={{home_dir.stdout}}/fio/fio-2.1.10/ - name: Benchmarking block storage through fio shell: cd $HOME/fio/fio-2.1.10 && sudo ./fio --output-format=json --output=$HOME/qtip_result/fio_result.json fio_test_job @@ -86,6 +88,12 @@ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/fio/fio_temp with_items: "{{copy_log_results.stdout_lines}}" + - name: cleaning fio + file: path=$HOME/fio state=absent + + - name: cleaning_qtip_result + file: path=$HOME/qtip_result + - hosts: localhost connection: local gather_facts: no @@ -95,11 +103,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/fio/logs + file: path={{workingdir}}/{{Dest_dir}}/fio/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/fio/fio_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/fio/logs) - name: removing fio_log - shell: rm -rf {{workingdir}}/{{Dest_dir}}/fio/fio_temp - + file: {{workingdir}}/{{Dest_dir}}/fio/fio_temp state=absent diff --git a/benchmarks/perftest/iperf.yaml b/benchmarks/perftest/iperf.yaml index af5b836a..481a2e3e 100644 --- a/benchmarks/perftest/iperf.yaml +++ b/benchmarks/perftest/iperf.yaml @@ -39,21 +39,21 @@ shell: echo $HOME register: home_dir - - name: cleaning - shell: sudo rm -rf $HOME/iperf + - name: cleaning iperf directory + file: path=$HOME/iperf state=absent - name: cleaning previous results - shell: sudo rm -rf $HOME/qtip_result + file: path=$HOME/qtip_result state=absent - name: making Iperf temporary directory - shell: sudo mkdir $HOME/iperf + file: path=$HOME/iperf state=directory - name: making results temporary directory - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: true @@ -131,6 +131,11 @@ with_items: "{{copy_log_results.stdout_lines}}" when: rolename =="2-host" and "{{ip2}}" == '' + - name: cleaning iperf directory + file: path=$HOME/iperf state=absent + + - name: cleaning previous results + file: path=$HOME/qtip_result state=absent - hosts: localhost connection: local @@ -147,15 +152,15 @@ when: rolename == "2-host" - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/iperf/logs + file: path={{workingdir}}/{{Dest_dir}}/iperf/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/iperf/logs) when: rolename == "2-host" - name: removing iperf_raw file - shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json + file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_raw.json state=absent when: rolename == "2-host" - name: removing iperf_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/iperf/iperf_temp + file: path={{workingdir}}/{{Dest_dir}}/iperf/iperf_temp state=absent diff --git a/benchmarks/perftest/ramspeed.yaml b/benchmarks/perftest/ramspeed.yaml index f62c6056..fb624c85 100644 --- a/benchmarks/perftest/ramspeed.yaml +++ b/benchmarks/perftest/ramspeed.yaml @@ -19,19 +19,19 @@ shell: echo $HOME register: home_dir - - name: cleaning - shell: sudo rm -rf $HOME/ramspeed + - name: cleaning ramspeed directory + file: path=$HOME/ramspeed state=absent - name: cleaning previous results - shell: sudo rm -rf $HOME/qtip_result + file: path=$HOME/qtip_result state=absent - name: making ramspeed temporary directory - shell: sudo mkdir $HOME/ramspeed + file: path=$HOME/ramspeed state=directory - name: making results temporary directory - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - include: ./common/sys_info_pbook.yaml vars: @@ -67,7 +67,7 @@ copy: src={{workdingdir}}/utils/transform/ramspeed_transform.py dest={{home_dir.stdout}}/qtip_result - name: Transforming result - shell: cd $HOME/qtip_result && sudo python ramspd_transform.py + shell: cd $HOME/qtip_result && sudo python ramspeed_transform.py - name: copy report formation script copy: src={{workingdir}}/utils/transform/final_report.py dest={{home_dir.stdout}}/qtip_result @@ -91,6 +91,12 @@ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp with_items: "{{copy_log_results.stdout_lines}}" + - name: cleaning ramspeed directory + file: path=$HOME/ramspeed state=absent + + - name: cleaning previous results + file: path=$HOME/qtip_result state=absent + - hosts: localhost connection: local gather_facts: no @@ -100,10 +106,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/ramspeed/logs + file: path={{workingdir}}/{{Dest_dir}}/ramspeed/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ramspeed/logs) - name: removing ramspeed_log - shell: rm -rf {{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp + file: path={{workingdir}}/{{Dest_dir}}/ramspeed/ramspeed_temp state=absent diff --git a/benchmarks/perftest/ssl.yaml b/benchmarks/perftest/ssl.yaml index 4b5f036a..ef36265e 100644 --- a/benchmarks/perftest/ssl.yaml +++ b/benchmarks/perftest/ssl.yaml @@ -18,21 +18,21 @@ shell: sudo echo $HOME register: home_dir - - name: cleaning - shell: sudo rm -rf $HOME/Open_SSL + - name: cleaning Open_SSL directory + file: path=$HOME/Open_SSL state=absent - - name: cleaning previous results - shell: sudo rm -rf $HOME/qtip_result + - name: cleaning_qtip_result + file: path=$HOME/qtip_result state=absent - name: making OpenSSL temporary directory - shell: sudo mkdir $HOME/Open_SSL + file: path=$HOME/Open_SSL state=directory - name: making results temporary directory - shell: sudo mkdir $HOME/qtip_result + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: false @@ -53,10 +53,10 @@ shell: cd $HOME/Open_SSL/openssl-1.0.2f && sudo ./config - name: make - shell: cd $HOME/Open_SSL/openssl-1.0.2f && sudo make + shell: cd $HOME/Open_SSL/openssl-1.0.2f && sudo make - name: make install - shell: cd $HOME/Open_SSL/openssl-1.0.2f && sudo make install + shell: cd $HOME/Open_SSL/openssl-1.0.2f && sudo make install - name: Benchmarking RSA signatures shell: cd $HOME/Open_SSL/openssl-1.0.2f/apps && sudo ./openssl speed rsa >> $HOME/qtip_result/RSA_dump @@ -92,6 +92,12 @@ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp with_items: "{{copy_log_results.stdout_lines}}" + - name: cleaning Open_SSL directory + file: path=$HOME/Open_SSL state=absent + + - name: cleaning_qtip_result + file: path=$HOME/qtip_result state=absent + - hosts: localhost connection: local gather_facts: no @@ -104,10 +110,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/ssl/logs + file: path={{workingdir}}/{{Dest_dir}}/ssl/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/ssl/logs) - name: removing ssl_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/ssl/ssl_temp + file: path={{workingdir}}/{{Dest_dir}}/ssl/ssl_temp state=absent diff --git a/benchmarks/perftest/whetstone.yaml b/benchmarks/perftest/whetstone.yaml index 32a22fe3..4dcddb99 100644 --- a/benchmarks/perftest/whetstone.yaml +++ b/benchmarks/perftest/whetstone.yaml @@ -18,18 +18,18 @@ shell: echo $HOME register: home_dir - - name: cleaning tempT - shell: sudo rm -rf $HOME/tempT + - name: cleaning tempT directory + file: path=$HOME/tempT state=absent - - name: cleaning_qtip_result - shell: sudo rm -rf $HOME/qtip_result + - name: cleaning qtip result directory + file: path=$HOME/qtip_result state=absent - - name: make directory - shell: sudo mkdir $HOME/qtip_result + - name: making qtip_result directory + file: path=$HOME/qtip_result state=directory - - include: ../common/sys_proxy_pbook.yaml + - include: ./common/sys_proxy_pbook.yaml - - include: ../common/sys_info_pbook.yaml + - include: ./common/sys_info_pbook.yaml vars: network: false @@ -41,7 +41,7 @@ shell: sudo apt-get install git gcc patch perl -y when: ansible_os_family == "Debian" - - include: ./git_proxy_pbook.yaml + - include: ./common/git_proxy_pbook.yaml - name: Clone unixbench git: repo=https://github.com/kdlucas/byte-unixbench.git @@ -87,11 +87,11 @@ fetch: src={{home_dir.stdout}}/qtip_result/log/{{item}} dest={{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp with_items: "{{copy_log_results.stdout_lines}}" - - name: cleaning tempT - shell: sudo rm -rf $HOME/tempT + - name: cleaning tempT directory + file: path=$HOME/tempT state=absent - - name: cleaning_qtip_result - shell: sudo rm -rf $HOME/qtip_result + - name: cleaning qtip result directory + file: path=$HOME/qtip_result state=absent - hosts: localhost connection: local @@ -102,10 +102,10 @@ shell: ( find {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp/ -name "*.json" | xargs cp -t {{workingdir}}/{{Dest_dir}}/whetstone/) - name: making_logs_folder - shell: mkdir -p {{workingdir}}/{{Dest_dir}}/whetstone/logs + file: path={{workingdir}}/{{Dest_dir}}/whetstone/logs state=directory - name: extracting_log shell: ( find {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp/ -name "*.log" | xargs cp -t {{workingdir}}/{{Dest_dir}}/whetstone/logs) - name: removing whetstone_temp - shell: rm -rf {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp + file: {{workingdir}}/{{Dest_dir}}/whetstone/whetstone_temp state=absent diff --git a/config/QtipKey b/config/QtipKey deleted file mode 100644 index 3f520775..00000000 --- a/config/QtipKey +++ /dev/null @@ -1,27 +0,0 @@ ------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/config/QtipKey.pub b/config/QtipKey.pub deleted file mode 100644 index 7a40f91c..00000000 --- a/config/QtipKey.pub +++ /dev/null @@ -1 +0,0 @@ -ssh-rsa AAAAB3NzaC1yc2EAAAADAQABAAABAQDFWkAL5DwtPJ+0BMKBUcgq8ORdjMcj/wJl4qVVYeUdQDT/oS6pKuHNuk7BJpCLYLfHgSzO+Hv8J+5UyqXXXJKGxfAUPtpXrHRgburwhRJwcgtQVqWbQXHnY2jsikHeWWW5RX6SHxrLrxX04a8xmtD7BbDiJ6HZqVSem8XC15eZvw1C1dbqmbZqWBRWLFzhHf/9goucaSP3ekYWVCUPPlDS+D7r2Mc2Ch0Z7AivEJZ5mTamefS80B1ZNBRObvP/W5jPoAh5H9bHrqayZyEVGaYOk/toddJJAQHJIXu/8YSxnUnC0FbTtZ5s2JO/3Big5/IpW5m5NsHCOqVPjHkKkgkT root@foreman-jump.opnfv.com diff --git a/docker/run_qtip.sh b/docker/run_qtip.sh index 62f97c88..a7a20501 100755 --- a/docker/run_qtip.sh +++ b/docker/run_qtip.sh @@ -1,4 +1,5 @@ #! /bin/bash + run_test_suite() { if [ "$TEST_CASE" == "compute" ]; then @@ -21,8 +22,16 @@ run_test_suite() fi } +rm -f ${QTIP_DIR}/config/QtipKey* + +echo "Generating ssh keypair" +ssh-keygen -t rsa -N "" -f ${QTIP_DIR}/config/QtipKey -q + source ${QTIP_DIR}/docker/prepare_qtip_image.sh run_test_suite source ${QTIP_DIR}/docker/cleanup_qtip_image.sh + +echo "Remove ssh keypair" +rm -f ${QTIP_DIR}/config/QtipKey* diff --git a/func/args_handler.py b/func/args_handler.py index 2f7c8957..624f90c4 100644 --- a/func/args_handler.py +++ b/func/args_handler.py @@ -59,10 +59,12 @@ def prepare_ansible_env(benchmark_test_case): def run_benchmark(installer_type, pwd, benchmark, benchmark_details, proxy_info, env_setup, benchmark_test_case): driver = Driver() - return driver.drive_bench(installer_type, pwd, benchmark, - env_setup.roles_dict.items(), - _get_f_name(benchmark_test_case), - benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) + result = driver.drive_bench(installer_type, pwd, benchmark, + env_setup.roles_dict.items(), + _get_f_name(benchmark_test_case), + benchmark_details, env_setup.ip_pw_dict.items(), proxy_info) + env_setup.cleanup_authorized_keys() + return result def prepare_and_run_benchmark(installer_type, pwd, benchmark_test_case): diff --git a/func/env_setup.py b/func/env_setup.py index 9e21a5b6..6027f904 100644 --- a/func/env_setup.py +++ b/func/env_setup.py @@ -208,3 +208,9 @@ class Env_setup: def call_ssh_test(self): self.ssh_test(self.ip_pw_list) + + def cleanup_authorized_keys(self): + for ip, pw in self.ip_pw_list: + cmd = './scripts/cleanup_creds.sh %s' % ip + logger.info("cleanup authorized_keys: %s " % cmd) + os.system(cmd) @@ -7,11 +7,9 @@ # http://www.apache.org/licenses/LICENSE-2.0 ############################################################################## from func.cli import Cli -import os def main(): - os.system('./scripts/file_permission.sh') Cli() diff --git a/scripts/cleanup_creds.sh b/scripts/cleanup_creds.sh new file mode 100644 index 00000000..9bf44305 --- /dev/null +++ b/scripts/cleanup_creds.sh @@ -0,0 +1,14 @@ +#! /bin/bash + +DEST_IP=$1 +HOSTNAME=$(hostname) +sshoptions="-o StrictHostKeyChecking=no -o UserKnownHostsFile=/dev/null" + +case "$INSTALLER_TYPE" in + fuel) + ssh $sshoptions -i ./config/QtipKey root@$DEST_IP "sed -i '/root@$HOSTNAME/d' /root/.ssh/authorized_keys" + ;; +esac + + + diff --git a/scripts/file_permission.sh b/scripts/file_permission.sh deleted file mode 100755 index a8af957e..00000000 --- a/scripts/file_permission.sh +++ /dev/null @@ -1,3 +0,0 @@ -#! /bin/bash -chmod 0600 config/QtipKey -chmod 0600 config/QtipKey.pub |