summaryrefslogtreecommitdiffstats
path: root/deploy
diff options
context:
space:
mode:
authorshuai chen <chenshuai@huawei.com>2015-12-15 10:47:38 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2015-12-15 10:47:39 +0000
commit0bf472e8826fe526516b141b124bc7b77cbd9541 (patch)
treeb3ba5a0d225d4af0245edde34af9f0ede7d7fa0d /deploy
parent5c3eda8b6b512bb1d1b2d9796437bb1976325af4 (diff)
parent850a3a0efecac0556daba2a9e4f5ce4929a12c8d (diff)
Merge "deploy compass-core and hosts seperately"
Diffstat (limited to 'deploy')
-rwxr-xr-xdeploy/launch.sh19
1 files changed, 16 insertions, 3 deletions
diff --git a/deploy/launch.sh b/deploy/launch.sh
index bad03cf7..9a223ec9 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -18,7 +18,7 @@ source ${COMPASS_DIR}/deploy/compass_vm.sh
source ${COMPASS_DIR}/deploy/deploy_host.sh
######################### main process
-if true
+if [[ "$DEPLOY_STEP" == "compass_only" || "$DEPLOY_STEP" == "all" ]]
then
if ! prepare_env;then
echo "prepare_env failed"
@@ -34,7 +34,7 @@ fi
log_info "deploy host macs: $machines"
export machines
-
+echo "export machines=\""$machines"\"" > $WORK_DIR/switch_machines
log_info "########## set up network begin #############"
if ! create_nets;then
log_error "create_nets failed"
@@ -45,10 +45,21 @@ if ! launch_compass;then
log_error "launch_compass failed"
exit 1
fi
+
else
+
# test code
-export machines="'00:00:3d:a4:ee:4c','00:00:63:35:3c:2b','00:00:f2:f2:b7:a5','00:00:2f:d3:88:28','00:00:46:67:11:e7'"
+if [[ -f $WORK_DIR/switch_machines ]]; then
+ echo "using last generated machines"
+ source $WORK_DIR/switch_machines
+else
+ export machines="'00:00:3d:a4:ee:4c','00:00:63:35:3c:2b','00:00:f2:f2:b7:a5','00:00:2f:d3:88:28','00:00:46:67:11:e7'"
+fi
+
fi
+
+if [[ "$DEPLOY_STEP" == "host_only" || "$DEPLOY_STEP" == "all" ]]; then
+
if [[ ! -z $VIRT_NUMBER ]];then
if ! launch_host_vms;then
log_error "launch_host_vms failed"
@@ -64,3 +75,5 @@ else
#tear_down_compass
exit 0
fi
+
+fi