aboutsummaryrefslogtreecommitdiffstats
path: root/deploy/launch.sh
diff options
context:
space:
mode:
Diffstat (limited to 'deploy/launch.sh')
-rwxr-xr-xdeploy/launch.sh20
1 files changed, 17 insertions, 3 deletions
diff --git a/deploy/launch.sh b/deploy/launch.sh
index 6cbad1fa..b11127ca 100755
--- a/deploy/launch.sh
+++ b/deploy/launch.sh
@@ -15,6 +15,7 @@ mkdir -p $WORK_DIR/script
export DEPLOY_FIRST_TIME=${DEPLOY_FIRST_TIME:-"true"}
export DEPLOY_RECOVERY=${DEPLOY_RECOVERY:-"false"}
+source ${COMPASS_DIR}/deploy/conf/base.conf
source ${COMPASS_DIR}/deploy/prepare.sh
prepare_python_env
source ${COMPASS_DIR}/util/log.sh
@@ -24,7 +25,6 @@ check_input_para
source $(process_default_para $*) || exit 1
source ${COMPASS_DIR}/deploy/conf/${FLAVOR}.conf
source ${COMPASS_DIR}/deploy/conf/${TYPE}.conf
-source ${COMPASS_DIR}/deploy/conf/base.conf
source ${COMPASS_DIR}/deploy/conf/compass.conf
source ${COMPASS_DIR}/deploy/network.sh
source ${COMPASS_DIR}/deploy/host_${TYPE}.sh
@@ -53,9 +53,14 @@ if [[ "$EXPANSION" == "false" ]]; then
exit 1
fi
+ export machine_file=$WORK_DIR/script/machine
export machines
- if [[ "$DEPLOY_COMPASS" == "true" ]]; then
+ CONTAINER_ALIVE=$(check_container_alive)
+ if
+ [[ "$DEPLOY_FIRST_TIME" == "true" ]] ||
+ [[ "$DEPLOY_COMPASS" == "true" && "$CONTAINER_ALIVE" == "false" ]]
+ then
if ! prepare_env;then
echo "prepare_env failed"
exit 1
@@ -71,7 +76,9 @@ if [[ "$EXPANSION" == "false" ]]; then
log_error "launch_compass failed"
exit 1
fi
- else
+ elif
+ [[ "$DEPLOY_COMPASS" == "true" && "$CONTAINER_ALIVE" == "true" ]]
+ then
refresh_compass_core
fi
else
@@ -84,6 +91,13 @@ else
log_info "deploy host macs: $machines"
fi
+if [[ "$DEPLOY_HARBOR" == "true" ]]; then
+ if ! launch_harbor;then
+ log_error "launch_harbor failed"
+ exit 1
+ fi
+fi
+
if [[ "$REDEPLOY_HOST" != "true" ]]; then
if ! set_compass_machine; then
log_error "set_compass_machine fail"