From ea776f2faf1d99c49d3dcf256fd0eda840c83639 Mon Sep 17 00:00:00 2001 From: Yao Lu Date: Thu, 17 Nov 2016 16:02:52 +0800 Subject: add common config and parse it to prepare deploy Change-Id: I864082b885a4c7117f0b546da602e9580e8ccf46 Signed-off-by: Yao Lu --- ci/deploy/deploy.sh | 51 ++++++++++++++++++++++++++------------------------- 1 file changed, 26 insertions(+), 25 deletions(-) (limited to 'ci') diff --git a/ci/deploy/deploy.sh b/ci/deploy/deploy.sh index 29c63cd0..11865b4a 100755 --- a/ci/deploy/deploy.sh +++ b/ci/deploy/deploy.sh @@ -2,7 +2,7 @@ ############################################################################## # Copyright (c) 2016 ZTE Coreporation and others. # hu.zhijiang@zte.com.cn -# sun.jing22@zte.com.cn +# lu.yao135@zte.com.cn # All rights reserved. This program and the accompanying materials # are made available under the terms of the Apache License, Version 2.0 # which accompanies this distribution, and is available at @@ -12,36 +12,37 @@ ######exit before finish test####### exit 0 -##########TODO after test######################### -DAISYDIR=$WORKSPACE -json_file=$DAISYDIR/deploy/config/vm_environment/zte-virtual/template.json -source ~/daisyrc_admin -daisy discover-host-add 192.168.122.152 ossdbg1 -daisy discover-host +##########TODO after test########## +DHA=$1 +NETWORK=$2 +tempest_path=$WORKSPACE/deploy -cnt=30 -while [ $cnt -ge 0 ]; do - host_id=`daisy host-list | awk -F "|" '{print $2}'| grep -o "[^ ]\+\( \+[^ ]\+\)*" ` - if [ -z "$host_id" ]; then - echo "host have not discoverd , loop again ... " - cnt=$[$cnt-1] - sleep 30 - else - echo "host list checkout successful... " - break - fi -done -daisy host-list +echo "====== clean && install daisy===========" +.$WORKSPACE/opnfv.bin clean +rc=$? +if [ $rc -ne 0 ]; then + echo "daisy clean failed" + exit 1 +else + echo "daisy clean successfully" +fi +.$WORKSPACE/opnfv.bin install +rc=$? +if [ $rc -ne 0 ]; then + echo "daisy install failed" + exit 1 +else + echo "daisy install successfully" +fi -echo "======prepare install os(centos) & kolla(openstack) ===========" -daisy import-json-to-template $json_file -daisy import-template-to-db template testdaisy -daisy template-to-host testdaisy DaisyNode $host_id +source ~/daisyrc_admin + +echo "======prepare install openstack===========" +python $tempest_path/tempest.py --dha $DHA --network $NETWORK echo "======daisy install kolla(openstack)===========" cluster_id=`daisy cluster-list | awk -F "|" '{print $2}' | sed -n '4p'` daisy install $cluster_id - echo "check installing proess..." var=1 while [ $var -eq 1 ]; do -- cgit 1.2.3-korg