summaryrefslogtreecommitdiffstats
path: root/testsuites/rubbos
diff options
context:
space:
mode:
authorwangyaoguang <sunshine.wang@huawei.com>2016-04-29 16:23:30 +0800
committerwangyaoguang <sunshine.wang@huawei.com>2016-04-29 16:33:06 +0800
commit8ff853cf793a643061fc605d7435fdb15d8c97dc (patch)
treef778269f9c53aa9e03f186b53f5d36f2f2a3ea82 /testsuites/rubbos
parent479cc8b4588b33db8b38345da6a1d41af7768ce5 (diff)
bugfix: integrate rubbos to ci
JIRA: BOTTLENECK-74 Change-Id: Idbcbe3c51b361d11b16ab7a0de8b12fa347f9186 Signed-off-by: wangyaoguang <sunshine.wang@huawei.com>
Diffstat (limited to 'testsuites/rubbos')
-rwxr-xr-xtestsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh17
-rwxr-xr-xtestsuites/rubbos/run_rubbos.py7
2 files changed, 21 insertions, 3 deletions
diff --git a/testsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh b/testsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh
index 1b45d5a1..c28213b3 100755
--- a/testsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh
+++ b/testsuites/rubbos/puppet_manifests/internal/run_rubbos_internal.sh
@@ -213,6 +213,21 @@ direct_ssh() {
done
}
+start_puppet_service() {
+ # Start puppetserver
+ local ssh_args="-o StrictHostKeyChecking=no -o BatchMode=yes -i /home/ubuntu/.ssh/id_rsa"
+ sudo service puppetserver status
+ sudo service puppetserver start
+ # Start all puppet agents
+ for host in "${all_agents_arr[@]}";do
+ ssh ${ssh_args} ubuntu@${host} "sudo service puppet start --no-client"
+ done
+ sudo service puppetserver status
+ sudo puppet cert list --all
+ sudo puppet cert sign --all
+ sudo puppet cert list --all
+}
+
# inline function
# It requires one local file path which needs to be replaced
_replace_text() {
@@ -361,6 +376,8 @@ main() {
fetch_remote_resources
echo "==> direct_ssh:"
direct_ssh
+ echo "==> start_puppet_service:"
+ start_puppet_service
echo "==> prepare_manifests:"
prepare_manifests
echo "==> execute_catalog start:"
diff --git a/testsuites/rubbos/run_rubbos.py b/testsuites/rubbos/run_rubbos.py
index 3c189991..e49ff7e2 100755
--- a/testsuites/rubbos/run_rubbos.py
+++ b/testsuites/rubbos/run_rubbos.py
@@ -274,15 +274,16 @@ def rubbos_run():
subprocess.call(cmd, shell=True)
# call remote run_rubbos_internal.sh
- cmd = "ssh " + ssh_args + " ubuntu@" + control_public_ip + ' sudo /home/ubuntu/run_rubbos_internal.sh /home/ubuntu/rubbos.conf /home/ubuntu/btnks-results'
+ cmd = "ssh " + ssh_args + " ubuntu@" + control_public_ip + ' "sudo /home/ubuntu/run_rubbos_internal.sh /home/ubuntu/rubbos.conf /home/ubuntu/btnks-results" '
print "Exec shell: " + cmd
subprocess.call(cmd, shell=True)
- cmd = "scp " + ssh_args + " ubuntu@" + control_public_ip + "/home/ubuntu/btnks-results/rubbos.out ./rubbos.out"
+ cmd = "scp " + ssh_args + " ubuntu@" + control_public_ip + ":/home/ubuntu/btnks-results/rubbos.out ./rubbos.out"
print "Exec shell: " + cmd
subprocess.call(cmd, shell=True)
if os.path.exists("rubbos.out") == False:
+ print "Failed to fetch results from the rubbos_control node!"
return False
-
+
with open("rubbos.out") as f:
lines = f.readlines()
print "Rubbos results:"