diff options
author | Yao Lu <lu.yao135@zte.com.cn> | 2016-11-17 16:02:52 +0800 |
---|---|---|
committer | Yao Lu <lu.yao135@zte.com.cn> | 2016-11-19 09:36:40 +0000 |
commit | ea776f2faf1d99c49d3dcf256fd0eda840c83639 (patch) | |
tree | 45429fe147e03fb99446faa688bf29242c416c04 /ci | |
parent | 463ab9c7337079a68491d2eccb1e3778a8ec4479 (diff) |
add common config and parse it to prepare deploy
Change-Id: I864082b885a4c7117f0b546da602e9580e8ccf46
Signed-off-by: Yao Lu <lu.yao135@zte.com.cn>
Diffstat (limited to 'ci')
-rwxr-xr-x | ci/deploy/deploy.sh | 51 |
1 files changed, 26 insertions, 25 deletions
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 |