[obd.sh] fix deploy config
This commit is contained in:
@ -330,17 +330,11 @@ function deploy_cluster {
|
|||||||
else
|
else
|
||||||
obd cluster destroy "$deploy_name" -f
|
obd cluster destroy "$deploy_name" -f
|
||||||
fi
|
fi
|
||||||
if [ "x$IS_CE" == "x" ]; then
|
if [[ -f $OBD_CLUSTER_PATH/$deploy_name/inner_config.yaml ]]
|
||||||
|
then
|
||||||
|
sed -i '/$_deploy_/d' $OBD_CLUSTER_PATH/$deploy_name/inner_config.yaml
|
||||||
|
fi
|
||||||
[[ "$YAML_CONF" == "" ]] || yaml_config_args="-c $YAML_CONF"
|
[[ "$YAML_CONF" == "" ]] || yaml_config_args="-c $YAML_CONF"
|
||||||
else
|
|
||||||
yaml_config_args=""
|
|
||||||
if [ $IS_CE == '0' ]; then
|
|
||||||
sed 's/oceanbase-ce\(:\?\)$/oceanbase\1/g' $config_yaml | obd cluster edit-config "$deploy_name"
|
|
||||||
fi
|
|
||||||
if [ $IS_CE == '1' ]; then
|
|
||||||
sed 's/oceanbase\(:\?\)$/oceanbase-ce\1/g' $config_yaml | obd cluster edit-config "$deploy_name"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
obd cluster deploy "$deploy_name" -C $yaml_config_args || exit 1
|
obd cluster deploy "$deploy_name" -C $yaml_config_args || exit 1
|
||||||
if ! obd cluster start "$deploy_name" -f;
|
if ! obd cluster start "$deploy_name" -f;
|
||||||
then
|
then
|
||||||
@ -607,20 +601,6 @@ Options:
|
|||||||
function main() {
|
function main() {
|
||||||
entrance=${OBD_SH_ENTRANCE:-obd.sh}
|
entrance=${OBD_SH_ENTRANCE:-obd.sh}
|
||||||
variables_parpare
|
variables_parpare
|
||||||
if [[ -f ${OBD_LOCAL_VERSION_PATH} ]]
|
|
||||||
then
|
|
||||||
obd_local_version=`cat ${OBD_LOCAL_VERSION_PATH}`
|
|
||||||
obd_deps_version=`cat ${OBD_DEPS_PATH} | grep -E '^ob-deploy-' | grep -Eo '[0-9]+.[0-9]+.[0-9a-z]+-[0-9]+' | head -n1`
|
|
||||||
obd_deps_version=${obd_deps_version/-/.}
|
|
||||||
if [[ ${obd_local_version} != ${obd_deps_version} ]]
|
|
||||||
then
|
|
||||||
obd_local_version=`obd --version | grep -E '^OceanBase Deploy:' | awk '{print $3}'`
|
|
||||||
if [[ ${obd_local_version} != ${obd_deps_version} ]]
|
|
||||||
then
|
|
||||||
echo -e "\033[33m[WARN]\033[0m current obd version is not the latest version, use 'sh build.sh init' to update"
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
command="$1"
|
command="$1"
|
||||||
shift
|
shift
|
||||||
extra_args=""
|
extra_args=""
|
||||||
@ -674,6 +654,11 @@ function main() {
|
|||||||
then
|
then
|
||||||
obd env set OBD_DEPLOY_BASE_DIR "$DEPLOY_PATH"
|
obd env set OBD_DEPLOY_BASE_DIR "$DEPLOY_PATH"
|
||||||
fi
|
fi
|
||||||
|
OBD_DEPLOY_BASE_DIR=$(grep -Po '"OBD_DEPLOY_BASE_DIR": "(.*?)"[,}]' ./.obd/.obd_environ | sed 's/"OBD_DEPLOY_BASE_DIR": "\(.*\)"[,}]/\1/g')
|
||||||
|
if [[ ! -d $OBD_DEPLOY_BASE_DIR ]]
|
||||||
|
then
|
||||||
|
obd env set OBD_DEPLOY_BASE_DIR "$DEPLOY_PATH"
|
||||||
|
fi
|
||||||
case $command in
|
case $command in
|
||||||
-V | --version)
|
-V | --version)
|
||||||
obd --version
|
obd --version
|
||||||
|
|||||||
@ -6,6 +6,7 @@ oceanbase-ce:
|
|||||||
# for default system config used by farm, please see tools/deploy/obd/observer.include.yaml
|
# for default system config used by farm, please see tools/deploy/obd/observer.include.yaml
|
||||||
# You can also specify the configuration directly below (stored locally, switching the working directory and redeploying will still take effect)
|
# You can also specify the configuration directly below (stored locally, switching the working directory and redeploying will still take effect)
|
||||||
production_mode: false
|
production_mode: false
|
||||||
|
devname: lo
|
||||||
# memory_limit: '8G'
|
# memory_limit: '8G'
|
||||||
# system_memory: '1G'
|
# system_memory: '1G'
|
||||||
# datafile_size: '20G'
|
# datafile_size: '20G'
|
||||||
|
|||||||
@ -7,4 +7,4 @@ obproxy-ce:
|
|||||||
home_path: {{%% OBPORXY_HOME_PATH %%}}
|
home_path: {{%% OBPORXY_HOME_PATH %%}}
|
||||||
include: obd/obproxy.include.yaml
|
include: obd/obproxy.include.yaml
|
||||||
depends:
|
depends:
|
||||||
- {{%% COMPONENT %%}}
|
- oceanbase-ce
|
||||||
|
|||||||
Reference in New Issue
Block a user