feat: 回滚 OceanBase 版本至 v4.2.1

This commit is contained in:
wanghe-fit2cloud
2024-04-03 10:58:54 +08:00
parent 5b418ab6de
commit 92b7e49d10
5 changed files with 28 additions and 36 deletions
+49
View File
@@ -0,0 +1,49 @@
additionalProperties:
formFields:
- default: 2881
edit: true
envKey: PANEL_APP_PORT_HTTP
labelEn: Port
labelZh: 端口
required: true
rule: paramPort
type: number
- default: 'oceanbase'
edit: true
envKey: OB_TENANT_NAME
labelEn: TENANT NAME
labelZh: 租户名
required: true
rule: paramCommon
type: text
- default: ''
edit: true
envKey: OB_ROOT_PASSWORD
labelEn: Password of sys@root
labelZh: SYS 租户密码
required: false
type: password
- default: 6
edit: true
envKey: OB_MEMORY_LIMIT
labelEn: MEMORY LIMIT
labelZh: 内存 (单位:GB)
required: true
rule: paramPort
type: number
- default: 5
edit: true
envKey: OB_DATAFILE_SIZE
labelEn: DATAFILE SIZE
labelZh: 数据文件大小 (单位:GB)
required: true
rule: paramPort
type: number
- default: 5
edit: true
envKey: OB_LOG_DISK_SIZE
labelEn: LOG DISK SIZE
labelZh: 日志文件大小 (单位:GB)
required: true
rule: paramPort
type: number
+26
View File
@@ -0,0 +1,26 @@
version: '3'
services:
oceanbase:
image: oceanbase/oceanbase-ce:4.2.1
container_name: ${CONTAINER_NAME}
restart: always
networks:
- 1panel-network
ports:
- ${PANEL_APP_PORT_HTTP}: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_TENANT_NAME: ${OB_TENANT_NAME}
volumes:
- ./data/ob:/root/ob
- ./data/.obd:/root/.obd
labels:
createdBy: "Apps"
networks:
1panel-network:
external: true
+14
View File
@@ -0,0 +1,14 @@
source ./.env
LOG='./init.log'
mkdir -p $PWD/data/.obd 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
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
echo "install path not set" >> $LOG
fi
@@ -0,0 +1,7 @@
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