Signed-off-by: Kevin Cai <kevin.cai@celerdata.com> Co-authored-by: Kevin Cai <caixiaohua@starrocks.com>
This commit is contained in:
parent
885389fe1f
commit
6027fa3b52
|
|
@ -57,4 +57,5 @@ RUN cat be.conf >> $DEPLOYDIR/starrocks/be/conf/be.conf && \
|
|||
rm -f be.conf fe.conf && \
|
||||
mkdir -p $DEPLOYDIR/starrocks/fe/meta $DEPLOYDIR/starrocks/be/storage && touch /.dockerenv
|
||||
|
||||
HEALTHCHECK --interval=30s --timeout=15s --start-period=30s ./health_check.sh
|
||||
CMD ./entrypoint.sh
|
||||
|
|
|
|||
|
|
@ -0,0 +1,41 @@
|
|||
#!/bin/bash
|
||||
# Copyright 2021-present StarRocks, Inc. All rights reserved.
|
||||
#
|
||||
# Licensed under the Apache License, Version 2.0 (the "License");
|
||||
# you may not use this file except in compliance with the License.
|
||||
# You may obtain a copy of the License at
|
||||
#
|
||||
# https://www.apache.org/licenses/LICENSE-2.0
|
||||
#
|
||||
# Unless required by applicable law or agreed to in writing, software
|
||||
# distributed under the License is distributed on an "AS IS" BASIS,
|
||||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
|
||||
set -e
|
||||
|
||||
BOOTSTRAP_DONE_FILE=$SR_HOME/bootstrap_done
|
||||
FE_DEFAULT_HTTP_PORT=8030
|
||||
BE_DEFAULT_HTTP_PORT=8040
|
||||
|
||||
get_fe_http_port()
|
||||
{
|
||||
export_env_from_conf $SR_HOME/fe/conf/fe.conf
|
||||
echo ${http_port:-$FE_DEFAULT_HTTP_PORT}
|
||||
}
|
||||
|
||||
get_be_http_port()
|
||||
{
|
||||
export_env_from_conf $SR_HOME/be/conf/be.conf
|
||||
echo ${be_http_port:-$BE_DEFAULT_HTTP_PORT}
|
||||
}
|
||||
|
||||
test -f $BOOTSTRAP_DONE_FILE || exit 1
|
||||
|
||||
source $SR_HOME/fe/bin/common.sh
|
||||
fe_http_port=`get_fe_http_port`
|
||||
curl -f -s http://localhost:$fe_http_port/api/health
|
||||
|
||||
be_http_port=`get_be_http_port`
|
||||
curl -f -s http://localhost:$be_http_port/api/health
|
||||
|
|
@ -20,6 +20,7 @@ MYCNF=$SR_HOME/director/my.cnf
|
|||
source $FE_HOME/bin/common.sh
|
||||
PREVIOUS_FQDN=
|
||||
CURRENT_FQDN=`hostname -f`
|
||||
BOOTSTRAP_DONE_FILE=$SR_HOME/bootstrap_done
|
||||
|
||||
PASSWD_ERROR_MSG="Password error, stop retrying!
|
||||
If the root user password is changed, please re-run the container with '-e MYSQL_PWD=<root_password>'"
|
||||
|
|
@ -183,6 +184,8 @@ check_and_add_be()
|
|||
done
|
||||
}
|
||||
|
||||
# remove the flag file
|
||||
rm -f $BOOTSTRAP_DONE_FILE
|
||||
loginfo "checking if need to perform auto registring Backend ..."
|
||||
check_fe_fqdn_mismatch
|
||||
check_fe_liveness
|
||||
|
|
@ -196,6 +199,9 @@ loginfo "StarRocks Cluster information details:"
|
|||
exec_sql_with_column 'SHOW FRONTENDS\G'
|
||||
exec_sql_with_column 'SHOW BACKENDS\G'
|
||||
|
||||
# touch the flag file
|
||||
touch $BOOTSTRAP_DONE_FILE
|
||||
|
||||
loginfo
|
||||
loginfo
|
||||
loginfo "$PERSISTENT_MSG"
|
||||
|
|
|
|||
Loading…
Reference in New Issue