summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMofassir Arif <Mofassir_arif@dellteam.com>2015-12-17 03:48:42 -0800
committerMofassir Arif <Mofassir_arif@dellteam.com>2015-12-17 03:48:42 -0800
commit390c1e3ca7f751fdfe6c7e9634d0d95ae6ba114f (patch)
treee441b0e2e83ac7da9830d23ce32756501232fbd1
parent6737007d817e62567cbcdaca598f4b1ffa915463 (diff)
Script to modify key file permissions
I have added a script to change the file permissions of the key files to 600 so that they can be used by the ssh agent The duration of the sshtest has also been reduced to allow the Jenkins Job to run/fail in a reasonable amount of time Change-Id: I5446896619dfba3f3efb600b64628343d6378164 Signed-off-by: Mofassir Arif <Mofassir_arif@dellteam.com>
-rw-r--r--benchmarks/playbooks/cachebench.yaml2
-rw-r--r--benchmarks/playbooks/ramspeed.yaml7
-rw-r--r--benchmarks/playbooks/ssl.yaml4
-rwxr-xr-xdata/file_permission.sh3
-rw-r--r--data/hosts7
-rw-r--r--data/my_key.pem27
-rw-r--r--func/env_setup.py4
-rw-r--r--qtip.py2
8 files changed, 43 insertions, 13 deletions
diff --git a/benchmarks/playbooks/cachebench.yaml b/benchmarks/playbooks/cachebench.yaml
index 4569d4af..510812bd 100644
--- a/benchmarks/playbooks/cachebench.yaml
+++ b/benchmarks/playbooks/cachebench.yaml
@@ -33,6 +33,6 @@
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}}/cachebench
+ fetch: src=/root/results/{{item}} dest=../../{{Dest_dir}}/cachebench
with_items: files_to_copy.stdout_lines
diff --git a/benchmarks/playbooks/ramspeed.yaml b/benchmarks/playbooks/ramspeed.yaml
index 6e317ec5..0321eb43 100644
--- a/benchmarks/playbooks/ramspeed.yaml
+++ b/benchmarks/playbooks/ramspeed.yaml
@@ -54,13 +54,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}}/ramspeed/ramspeed_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/ramspeed/ramspeed_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}}/ramspeed/ramspeed_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/ramspeed/ramspeed_temp
with_items: copy_log_results.stdout_lines
@@ -78,5 +78,4 @@
- name: extracting_log
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 \ No newline at end of file
diff --git a/benchmarks/playbooks/ssl.yaml b/benchmarks/playbooks/ssl.yaml
index d27a967d..21c20243 100644
--- a/benchmarks/playbooks/ssl.yaml
+++ b/benchmarks/playbooks/ssl.yaml
@@ -54,13 +54,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}}/ssl/ssl_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/ssl/ssl_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}}/ssl/ssl_temp
+ fetch: src={{home_dir.stdout}}/qtip_result/{{item}} dest=../../{{Dest_dir}}/ssl/ssl_temp
with_items: copy_log_results.stdout_lines
diff --git a/data/file_permission.sh b/data/file_permission.sh
new file mode 100755
index 00000000..01a77d50
--- /dev/null
+++ b/data/file_permission.sh
@@ -0,0 +1,3 @@
+#! /bin/bash
+chmod 0600 data/QtipKey
+chmod 0600 data/QtipKey.pub
diff --git a/data/hosts b/data/hosts
index 85948586..383d4109 100644
--- a/data/hosts
+++ b/data/hosts
@@ -1,4 +1,3 @@
-[2-host]
-172.18.0.121
-[1-server]
-172.18.0.122
+[host]
+172.18.0.94
+172.18.0.93
diff --git a/data/my_key.pem b/data/my_key.pem
new file mode 100644
index 00000000..d0ffddcd
--- /dev/null
+++ b/data/my_key.pem
@@ -0,0 +1,27 @@
+-----BEGIN RSA PRIVATE KEY-----
+MIIEpQIBAAKCAQEAyxp8dUvXD1fcnrPWVQzJnCZS+je+YU+wYkLzSd6JS2ItjYLk
+H752IUznHJdhc55TC1LPcj0jje0cJb/iCaxaAODvJX0xBHQc8X99oGc4zC3jJEuQ
+6L+ERDLOmBwkI/hRDpoch4PIQsgKQDNsQUq5l4gHi54u9Ubykjynxp8YcN/p60y6
+I8RLEkDKlOK4rBwAp+P7/5CM5ElhU9vpDEqqVjOKoxY1oU7KFWrgIsLwuemdPYXn
+YmG0O7K84xONnudl+e6LmMc8RenWRiPk1+o82X/RYqUeCijfFmvZgecz1Hjz7+M6
+rI03CbzIMUR2FUQpZ0edA7S9mmuaGmFDrQ8c9wIDAQABAoIBACZ2Zplj+l86eVpI
+nk9O86Mxksc15UTSbYm+OgqELSXsesnwvrjQPdjCkoXUmSznD7z2OrjcoS4QeCMh
++nFwhT7jWgaUdcLtJkoJpcXJpnTsP7aw5Mle83Ji2MLvmVyCev8z6jEzoKoc7ewI
+kPiwaQMsTJmBJE1o2SkeeXtgx6UgO9EmfA3k28P3Y2p9smkf1RdhdjLaH+evgLA6
+ntOSVigC72tByZcQJd7PEk+Kxfc6Y+V/JNRTx9fO89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/func/env_setup.py
+++ b/func/env_setup.py
@@ -53,7 +53,7 @@ class Env_setup():
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):
+ for infinity in range(100):
try :
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
@@ -71,7 +71,7 @@ class Env_setup():
time.sleep(3)
os.system(ssh_c)
- for infinity in range(10000):
+ for infinity in range(100):
try :
ssh = paramiko.SSHClient()
ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
diff --git a/qtip.py b/qtip.py
index 2c488e60..01c49946 100644
--- a/qtip.py
+++ b/qtip.py
@@ -10,8 +10,10 @@
from func.cli import cli
+import os
def main():
+ os.system('./data/file_permission.sh')
Objcli = cli()
if __name__ == "__main__":