From aa9ec2547522d63478c6822eaa449ce615c245f1 Mon Sep 17 00:00:00 2001 From: Chris Sun Date: Fri, 6 Jun 2025 17:25:30 +0800 Subject: [PATCH] add oceanbase version 4.3.5 (#4067) --- oceanbase/4.2.1/scripts/uninstall.sh | 7 ------- oceanbase/{4.2.1 => 4.3.5}/data.yml | 19 +++++++++++++------ oceanbase/{4.2.1 => 4.3.5}/docker-compose.yml | 12 ++++++------ oceanbase/{4.2.1 => 4.3.5}/scripts/init.sh | 6 +++--- oceanbase/4.3.5/scripts/uninstall.sh | 7 +++++++ oceanbase/data.yml | 4 ++-- 6 files changed, 31 insertions(+), 24 deletions(-) delete mode 100644 oceanbase/4.2.1/scripts/uninstall.sh rename oceanbase/{4.2.1 => 4.3.5}/data.yml (71%) rename oceanbase/{4.2.1 => 4.3.5}/docker-compose.yml (66%) rename oceanbase/{4.2.1 => 4.3.5}/scripts/init.sh (65%) create mode 100644 oceanbase/4.3.5/scripts/uninstall.sh diff --git a/oceanbase/4.2.1/scripts/uninstall.sh b/oceanbase/4.2.1/scripts/uninstall.sh deleted file mode 100644 index e56fa5615..000000000 --- a/oceanbase/4.2.1/scripts/uninstall.sh +++ /dev/null @@ -1,7 +0,0 @@ -source ./.env - -LOG='./uninstall.log' - -HOME_PATH=`realpath $PWD/data/ob/` -echo "remove $HOME_PATH" >> $LOG -rm -fr $PWD/data/ob/ 2>&1 >> $LOG || exit 10 \ No newline at end of file diff --git a/oceanbase/4.2.1/data.yml b/oceanbase/4.3.5/data.yml similarity index 71% rename from oceanbase/4.2.1/data.yml rename to oceanbase/4.3.5/data.yml index 601c3e2ca..eb373d32b 100644 --- a/oceanbase/4.2.1/data.yml +++ b/oceanbase/4.3.5/data.yml @@ -2,7 +2,7 @@ additionalProperties: formFields: - default: 2881 edit: true - envKey: PANEL_APP_PORT_HTTP + envKey: PANEL_APP_PORT_MYSQL labelEn: Port labelZh: 端口 required: true @@ -18,7 +18,7 @@ additionalProperties: type: text - default: '' edit: true - envKey: OB_ROOT_PASSWORD + envKey: OB_SYS_PASSWORD labelEn: Password of sys@root labelZh: SYS 租户密码 required: false @@ -26,15 +26,22 @@ additionalProperties: - default: 6 edit: true envKey: OB_MEMORY_LIMIT - labelEn: MEMORY LIMIT + labelEn: MEMORY LIMIT(Unit GB) labelZh: 内存 (单位:GB) required: true rule: paramPort type: number + - default: ./data + edit: true + envKey: OB_MOUNT_PATH + labelEn: Mount path of OceanBase files + labelZh: OceanBase 文件挂载路径 + required: true + type: text - default: 5 edit: true envKey: OB_DATAFILE_SIZE - labelEn: DATAFILE SIZE + labelEn: DATAFILE SIZE(Unit GB) labelZh: 数据文件大小 (单位:GB) required: true rule: paramPort @@ -42,8 +49,8 @@ additionalProperties: - default: 5 edit: true envKey: OB_LOG_DISK_SIZE - labelEn: LOG DISK SIZE + labelEn: LOG DISK SIZE(Unit GB) labelZh: 日志文件大小 (单位:GB) required: true rule: paramPort - type: number \ No newline at end of file + type: number diff --git a/oceanbase/4.2.1/docker-compose.yml b/oceanbase/4.3.5/docker-compose.yml similarity index 66% rename from oceanbase/4.2.1/docker-compose.yml rename to oceanbase/4.3.5/docker-compose.yml index d5b29e5de..5846cbcbb 100644 --- a/oceanbase/4.2.1/docker-compose.yml +++ b/oceanbase/4.3.5/docker-compose.yml @@ -1,25 +1,25 @@ services: oceanbase: - image: oceanbase/oceanbase-ce:4.2.1 + image: oceanbase/oceanbase-ce:4.3.5-lts container_name: ${CONTAINER_NAME} restart: always networks: - 1panel-network ports: - - ${PANEL_APP_PORT_HTTP}:2881 + - ${PANEL_APP_PORT_MYSQL}:2881 environment: MODE: mini OB_CLUSTER_NAME: ob_1panel OB_MEMORY_LIMIT: ${OB_MEMORY_LIMIT}G OB_DATAFILE_SIZE: ${OB_DATAFILE_SIZE}G OB_LOG_DISK_SIZE: ${OB_LOG_DISK_SIZE}G - OB_ROOT_PASSWORD: ${OB_ROOT_PASSWORD} + OB_SYS_PASSWORD: ${OB_SYS_PASSWORD} OB_TENANT_NAME: ${OB_TENANT_NAME} volumes: - - ./data/ob:/root/ob - - ./data/.obd:/root/.obd + - ${OB_MOUNT_PATH}/ob:/root/ob + - ./data/.obd/cluster:/root/.obd/cluster labels: createdBy: "Apps" networks: 1panel-network: - external: true \ No newline at end of file + external: true diff --git a/oceanbase/4.2.1/scripts/init.sh b/oceanbase/4.3.5/scripts/init.sh similarity index 65% rename from oceanbase/4.2.1/scripts/init.sh rename to oceanbase/4.3.5/scripts/init.sh index 7d7e61d0c..c65226979 100644 --- a/oceanbase/4.2.1/scripts/init.sh +++ b/oceanbase/4.3.5/scripts/init.sh @@ -1,14 +1,14 @@ source ./.env LOG='./init.log' -mkdir -p $PWD/data/.obd 2>&1 >> $LOG || exit 11 +mkdir -p $PWD/data/.obd/cluster 2>&1 >> $LOG || exit 11 if [ "x$OB_INSTALL_PATH" != "x" ]; then HOME_PATH="$OB_INSTALL_PATH/ob/$CONTAINER_NAME" - echo "link $HOME_PATH to $PWD/data/ob" >> $LOG + echo "link $HOME_PATH to $OB_MOUNT_PATH/ob" >> $LOG mkdir -p $HOME_PATH 2>&1 >> $LOG || exit 10 ln -sf $HOME_PATH ./data/ob 2>&1 >> $LOG || exit 12 echo "HOME_PATH=$HOME_PATH" >> ./.env else - mkdir -p $PWD/data/ob 2>&1 >> $LOG || exit 10 + mkdir -p $OB_MOUNT_PATH/ob 2>&1 >> $LOG || exit 10 echo "install path not set" >> $LOG fi diff --git a/oceanbase/4.3.5/scripts/uninstall.sh b/oceanbase/4.3.5/scripts/uninstall.sh new file mode 100644 index 000000000..db5a2bcd0 --- /dev/null +++ b/oceanbase/4.3.5/scripts/uninstall.sh @@ -0,0 +1,7 @@ +source ./.env + +LOG='./uninstall.log' + +HOME_PATH=`realpath $OB_MOUNT_PATH/ob/` +echo "remove $HOME_PATH" >> $LOG +rm -fr $OB_MOUNT_PATH/ob/ 2>&1 >> $LOG || exit 10 diff --git a/oceanbase/data.yml b/oceanbase/data.yml index 8b12a7f1d..d17d25049 100644 --- a/oceanbase/data.yml +++ b/oceanbase/data.yml @@ -17,7 +17,7 @@ additionalProperties: website: https://open.oceanbase.com/ github: https://github.com/oceanbase/oceanbase document: https://www.oceanbase.com/docs - memoryRequired: 4096 + memoryRequired: 8192 architectures: - amd64 - - arm64 \ No newline at end of file + - arm64