summaryrefslogtreecommitdiffstats
path: root/deploy/launch.sh
diff options
context:
space:
mode:
authorJustin chi <chigang@huawei.com>2016-09-28 02:13:20 +0000
committerGerrit Code Review <gerrit@172.30.200.206>2016-09-28 02:13:21 +0000
commit066871de64c28d3e6adb4fe5a17bd9c894074f75 (patch)
tree067a6cee5c642e55112e5739bf3f3c55e9419168 /deploy/launch.sh
parentf5d302d1f71637df5fdd3fc815c1d7a760b6e9d4 (diff)
parente9c6204c777d4d5169d6678a868782a7835d1350 (diff)
Merge "Add a expansion functionality"
Diffstat (limited to 'deploy/launch.sh')
-rwxr-xr-xdeploy/launch.sh57
1 files changed, 35 insertions, 22 deletions
diff --git a/deploy/launch.sh b/deploy/launch.sh
index 488e0fd7..ed65f40d 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -30,39 +30,52 @@ source ${COMPASS_DIR}/deploy/compass_vm.sh
source ${COMPASS_DIR}/deploy/deploy_host.sh
######################### main process
-print_logo
+if [[ "$EXPANSION" == "false" ]]
+then
-if [[ ! -z $VIRT_NUMBER ]];then
- tear_down_machines
-fi
-
-log_info "########## get host mac begin #############"
-machines=`get_host_macs`
-if [[ -z $machines ]]; then
- log_error "get_host_macs failed"
- exit 1
-fi
+ print_logo
-export machines
-
-if [[ "$DEPLOY_COMPASS" == "true" ]]; then
- if ! prepare_env;then
- echo "prepare_env failed"
- exit 1
+ if [[ ! -z $VIRT_NUMBER ]];then
+ tear_down_machines
fi
- log_info "########## set up network begin #############"
- if ! create_nets;then
- log_error "create_nets failed"
+ log_info "########## get host mac begin #############"
+ machines=`get_host_macs`
+ if [[ -z $machines ]]; then
+ log_error "get_host_macs failed"
exit 1
fi
- if ! launch_compass;then
- log_error "launch_compass failed"
+ export machines
+
+ if [[ "$DEPLOY_COMPASS" == "true" ]]; then
+ if ! prepare_env;then
+ echo "prepare_env failed"
+ exit 1
+ fi
+
+ log_info "########## set up network begin #############"
+ if ! create_nets;then
+ log_error "create_nets failed"
+ exit 1
+ fi
+
+ if ! launch_compass;then
+ log_error "launch_compass failed"
+ exit 1
+ fi
+ fi
+else
+ machines=`get_host_macs`
+ if [[ -z $machines ]];then
+ log_error "get_host_macs failed"
exit 1
fi
+
+ log_info "deploy host macs: $machines"
fi
+
if [[ -z "$REDEPLOY_HOST" || "$REDEPLOY_HOST" == "false" ]]; then
if ! set_compass_machine; then
log_error "set_compass_machine fail"