diff --git a/.gitignore b/.gitignore index 42db91db3e..b720dfdd05 100644 --- a/.gitignore +++ b/.gitignore @@ -287,6 +287,8 @@ tools/deploy/distributed.yaml tools/deploy/obd_profile.sh tools/deploy/single-with-proxy.yaml tools/deploy/single.yaml +tools/docker/standalone/boot +tools/docker/standalone/init_store_for_fast_start.py ############# unittest ############# unittest/**/test_* diff --git a/tools/docker/standalone/Dockerfile b/tools/docker/standalone/Dockerfile index ab3a433157..3cb3fbca9e 100644 --- a/tools/docker/standalone/Dockerfile +++ b/tools/docker/standalone/Dockerfile @@ -2,6 +2,7 @@ FROM openanolis/anolisos # docker build --build-arg VERSION={VERSION} . ARG VERSION +ARG STEP RUN yum install -y yum-utils && \ yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo && \ @@ -10,6 +11,11 @@ RUN yum install -y yum-utils && \ rm -rf /usr/obd/mirror/remote/* && \ yum clean all +ENV STEP=$STEP +RUN if [ "$STEP" == 1 ]; then \ + yum install -y mysql; \ + fi + ENV OBVersion=$VERSION RUN if [ -z "${OBVersion}" ]; then \ echo "VERSION is empty, then build the docker with latest rpm"; \ @@ -19,15 +25,16 @@ RUN if [ -z "${OBVersion}" ]; then \ else \ echo "build the docker with VERSION ${OBVersion}"; \ fi && \ - mkdir -p /root/pkg && \ + mkdir -p /root/pkg && mkdir -p /root/store && mkdir -p /root/dest && \ cd /root/pkg && \ yum install -y --downloadonly --downloaddir=. oceanbase-ce-${OBVersion}.el7 oceanbase-ce-libs-${OBVersion}.el7 obagent ob-configserver && \ rm -rf /usr/obd/mirror/remote/* && \ yum clean all COPY boot /root/boot/ +COPY init_store_for_fast_start.py /root/boot/ ENV PATH /root/boot:$PATH -ENV LD_LIBRARY_PATH /root/ob/lib:$LD_LIBRARY_PATH +ENV LD_LIBRARY_PATH /home/admin/oceanbase/lib:/root/ob/lib:$LD_LIBRARY_PATH WORKDIR /root CMD _boot diff --git a/tools/docker/standalone/README-CN.md b/tools/docker/standalone/README-CN.md index 11c7909d61..98b5372446 100644 --- a/tools/docker/standalone/README-CN.md +++ b/tools/docker/standalone/README-CN.md @@ -39,6 +39,9 @@ docker run -p 2881:2881 --name oceanbase-ce -e MODE=slim -e OB_MEMORY_LIMIT=5G - # 根据当前容器情况部署最大规格的实例 docker run -p 2881:2881 --name oceanbase-ce -e MODE=normal -d oceanbase/oceanbase-ce + +# 部署一个快速启动镜像,mode可以为任意模式 +docker run -p 2881:2881 --name oceanbase-ce -e FASTBOOT=true -d oceanbase/oceanbase-ce ``` 启动预计需要 2-5 分钟。执行以下命令,如果返回 `boot success!`,则启动成功。 @@ -75,7 +78,8 @@ mysql -uroot -h127.1 -P2881 | 变量名称 | 默认值 | 描述 | | ---------------- | ------------- | ------------------------------------------------------------ | | MODE | {mini, slim, normal} | mini或者不赋值变量表示使用mini模式部署OceanBase数据库实例,仅用来研究学习使用。不适合用于生产或性能测试。slim适用于更小的自定义配置,移除obagent,支持自定义的初始化脚本在绑定目录/root/boot/init.d,如果不绑定该目录,docker不会执行该租户的初始化sql。| -| EXIT_WHILE_ERROR | true | OceanBase 如果启动失败,是否退出容器。比如初次run镜像失败,或start容器失败,可以将此参数设置为false,那么OB启动失败,也可以进入容器,查看OceanBase的运行日志,然后进行排查。 | +| FASTBOOT | false | true表示镜像会以快速启动的方式运行。 | +| EXIT_WHILE_ERROR | true | OceanBase 如果启动失败,是否退出容器。比如初次run镜像失败,或start容器失败,可以将此参数设置为false,那么OB启动失败,也可以进入容器,查看OceanBase的运行日志,然后进行排查。 | | OB_CLUSTER_NAME | obcluster | oceanbase集群名 | | OB_TENANT_NAME | test | oceanbase mysql租户名| | OB_MEMORY_LIMIT | 6G | oceanbase启动memory_limit参数配置 | @@ -113,14 +117,14 @@ docker run -d -p 2881:2881 -v $PWD/ob:/root/ob -v $PWD/obd:/root/.obd --name oce docker -v 参数的详细说明可以参考 [docker volumn](https://docs.docker.com/storage/volumes/)。 ## 快速单机启动镜像构建 -在`tools/docker/standalone`目录下提供`fast_boot_docker_build.sh`脚本,通过该脚本可以构建快速启动镜像。在运行脚本之前,请首先修改`tools/docker/standalone/boot/_env`环境配置脚本: +在`tools/docker/standalone`目录下提供`docker_build.sh`脚本,通过该脚本可以构建快速启动镜像。在运行脚本之前,请首先修改`tools/docker/standalone/boot/_env`环境配置脚本: -- 必须:将`MODE`配置项修改为`STANDALONE` - 可选:修改其余配置项 修改完毕后,执行镜像构建脚本: -- `./fast_boot_docker_build.sh ` 例如:`./fast_boot_docker_build.sh 4.2.1.0-100000102023092807` +- 构建最新版镜像 `./docker_build.sh` +- 构建某个特别版本的oceanbase镜像 `./docker_build.sh ` 例如:`./docker_build.sh 4.2.1.0-100000102023092807` 等待构建完毕后,可使用前述相同的方式启动、测试实例。 diff --git a/tools/docker/standalone/README.md b/tools/docker/standalone/README.md index 29eaeb3971..b29a5d51fb 100644 --- a/tools/docker/standalone/README.md +++ b/tools/docker/standalone/README.md @@ -39,6 +39,9 @@ docker run -p 2881:2881 --name oceanbase-ce -e MODE=slim -e OB_MEMORY_LIMIT=5G - # deploy an instance of the largest size according to the current container docker run -p 2881:2881 --name oceanbase-ce -e MODE=normal -d oceanbase/oceanbase-ce + +# deploy a quick-start instance in any mode as desired to the current container +docker run -p 2881:2881 --name oceanbase-ce -e FASTBOOT=true -d oceanbase/oceanbase-ce ``` Two to five minutes are necessary for the boot procedure. To make sure that the boot procedure is successful, run this command: @@ -73,6 +76,7 @@ This table shows the supported environment variables of the current oceanbase-ce | Variable name | Default value | Description | | ---------------- | ------------- | ------------------------------------------------------------ | | MODE | {mini, slim, normal} | If it is mini, then the docker use mini mode to deploy OceanBase Database instance, it should be used only for research/study/evaluation. DO NOT use it for production or performance testing. If it is slim, then the docker can run in a smaller instance. It remove the obagent and can run a self tenant initial sql by yourself in the mount volume /root/boot/init.d. If you do not mount the volume path the docker does not init the tenant sql. | +| FASTBOOT | false | The container can run in a quick-start mode when FASTBOOT=true. | | EXIT_WHILE_ERROR | true | Whether quit the container while start observer failed. If start observer failed, you can not explore the logs as the container will exit. But if you set the EXIT_WHILE_ERROR=false, the container will not exit while observer starting fail and you can use docker exec to debug. | | OB_CLUSTER_NAME | obcluster | The oceanbase cluster name | | OB_TENANT_NAME | test | The oceanbase mysql tenant name | @@ -109,14 +113,14 @@ The docker image `oceanbase-ce` saves the data to /root/ob directory default. Yo You can view more information about `docker -v` at [docker volume](https://docs.docker.com/storage/volumes/). ## Fast boot image building for a standalone node -The `fast_boot_docker_build.sh` script is provided in the `tools/docker/standalone` directory, through which the fast boot image can be built. Before running the script, please first modify the `tools/docker/standalone/boot/_env` environment configuration script: +The `docker_build.sh` script is provided in the `tools/docker/standalone` directory, through which the fast boot image can be built. Before running the script, please first modify the `tools/docker/standalone/boot/_env` environment configuration script: -- Required: Modify the `MODE` configuration item to `STANDALONE` - Optional: Modify the remaining configuration items After the modification is completed, execute the image build script: -- `./fast_boot_docker_build.sh `. For example `./fast_boot_docker_build.sh 4.2.1.0-100000102023092807` +- build the image with latest oceanbase version `./docker_build.sh` +- build the image with specific oceanbase version `./docker_build.sh `. For example `./docker_build.sh 4.2.1.0-100000102023092807` After waiting for the build to be completed, you can start and test the instance in the same way as mentioned above. diff --git a/tools/docker/standalone/docker_build.sh b/tools/docker/standalone/docker_build.sh new file mode 100755 index 0000000000..cb1031a134 --- /dev/null +++ b/tools/docker/standalone/docker_build.sh @@ -0,0 +1,73 @@ +#!/bin/bash + +if [ "$#" -gt 1 ]; then + exit 1 +elif [ "$#" -gt 1 ]; then + BUILD_ARG="--build-arg VERSION=$1" +else + BUILD_ARG="" +fi + +TMP_INIT_STORE_PY_SCRIPT="init_store_for_fast_start.tmp.py" +ACTUAL_INIT_STORE_PY_SCRIPT="init_store_for_fast_start.py" + +CWD=$(cd `dirname $0`;pwd) +cd "${CWD}" + +function fast_boot_docker_build() { + rm -rf boot + cp -r step_1_boot boot + docker build $BUILD_ARG --build-arg STEP=1 -t raw_observer . + if [ $? == 0 ]; then + echo "================== build prepare docker ok ===============" + else + echo "================== build prepare docker failed ===============" + exit -1 + fi + rm -rf boot + + cd "${CWD}" && mkdir -p ${CWD}/boot/etc + docker run -it -v ${CWD}/boot:/root/dest raw_observer + if [ $? == 0 ]; then + echo "================== prepare docker run ok ===============" + else + echo "================== prepare docker run failed ===============" + rm -rf ${CWD}/boot/etc + rm -rf ${CWD}/boot/store.tar.gz + exit -1 + fi + + cd "${CWD}" + cp -r step_2_boot/* boot + docker build $BUILD_ARG --build-arg STEP=2 -t oceanbase-ce . + if [ $? == 0 ]; then + echo "================== docker build ok ===============" + else + echo "================== docker build failed ===============" + exit -1 + fi +} + +source ./step_2_boot/_env +OS=`uname` +cp ${TMP_INIT_STORE_PY_SCRIPT} ${ACTUAL_INIT_STORE_PY_SCRIPT} + +if [ "$OS" == 'Darwin' ]; then + sed -i '' -e "s/@OB_SERVER_IP@/${OB_SERVER_IP}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i '' -e "s/@OB_MYSQL_PORT@/${OB_MYSQL_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i '' -e "s/@OB_RPC_PORT@/${OB_RPC_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i '' -e "s/@OB_TENANT_NAME@/${OB_TENANT_NAME}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i '' -e "s/@OB_TENANT_LOWER_CASE_TABLE_NAMES@/${OB_TENANT_LOWER_CASE_TABLE_NAMES}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} +else + sed -i'' -e "s/@OB_SERVER_IP@/${OB_SERVER_IP}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i'' -e "s/@OB_MYSQL_PORT@/${OB_MYSQL_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i'' -e "s/@OB_RPC_PORT@/${OB_RPC_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i'' -e "s/@OB_TENANT_NAME@/${OB_TENANT_NAME}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} + sed -i'' -e "s/@OB_TENANT_LOWER_CASE_TABLE_NAMES@/${OB_TENANT_LOWER_CASE_TABLE_NAMES}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} +fi + +fast_boot_docker_build +if [ $? != 0 ]; then + echo "use local rpm build docker failed" + exit -1 +fi diff --git a/tools/docker/standalone/fast_boot_docker_build.sh b/tools/docker/standalone/fast_boot_docker_build.sh deleted file mode 100755 index ee6ed636a0..0000000000 --- a/tools/docker/standalone/fast_boot_docker_build.sh +++ /dev/null @@ -1,64 +0,0 @@ -#!/bin/bash -RPM_VERSION=$1 - -TMP_INIT_STORE_PY_SCRIPT="init_store_for_fast_start.tmp.py" -ACTUAL_INIT_STORE_PY_SCRIPT="./fast_boot_docker_build_prepare/init_store_for_fast_start.py" - -CWD=$(cd `dirname $0`;pwd) -cd "${CWD}" - -function fast_boot_docker_build() { - cd fast_boot_docker_build_prepare && \ - docker build --build-arg VERSION="${RPM_VERSION}" -t raw_observer . - if [ $? == 0 ]; then - echo "================== build prepare docker ok ===============" - else - echo "================== build prepare docker failed ===============" - exit -1 - fi - - cd "${CWD}" && mkdir -p ${CWD}/boot/etc - docker run -it -v ${CWD}/boot:/root/dest raw_observer - if [ $? == 0 ]; then - echo "================== prepare docker run ok ===============" - else - echo "================== prepare docker run failed ===============" - rm -rf ${CWD}/boot/etc - rm -rf ${CWD}/boot/store.tar.gz - exit -1 - fi - - cd "${CWD}" - docker build --build-arg VERSION="${RPM_VERSION}" -t oceanbase-ce . - if [ $? == 0 ]; then - echo "================== fast boot docker build ok ===============" - else - echo "================== fast boot docker build failed ===============" - exit -1 - fi -} - -source ./boot/_env -if [ "x${MODE}" != "xSTANDALONE" ]; then - echo "please set MODE to STANDALONE for building fast boot docker" - exit -1 -fi -OS=`uname` -cp ${TMP_INIT_STORE_PY_SCRIPT} ${ACTUAL_INIT_STORE_PY_SCRIPT} - -if [ "$OS" == 'Darwin' ]; then - alias sedi="sed -i '' -e" -else - alias sedi="sed -i'' -e" -fi - -sedi "s/@OB_MYSQL_PORT@/${OB_MYSQL_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} -sedi "s/@OB_RPC_PORT@/${OB_RPC_PORT}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} -sedi "s/@OB_TENANT_NAME@/${OB_TENANT_NAME}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} -sedi "s/@OB_TENANT_LOWER_CASE_TABLE_NAMES@/${OB_TENANT_LOWER_CASE_TABLE_NAMES}/g" ${ACTUAL_INIT_STORE_PY_SCRIPT} - -fast_boot_docker_build -if [ $? != 0 ]; then - echo "use local rpm build docker failed" - exit -1 -fi diff --git a/tools/docker/standalone/fast_boot_docker_build_prepare/Dockerfile b/tools/docker/standalone/fast_boot_docker_build_prepare/Dockerfile deleted file mode 100644 index fcc8584352..0000000000 --- a/tools/docker/standalone/fast_boot_docker_build_prepare/Dockerfile +++ /dev/null @@ -1,35 +0,0 @@ -FROM openanolis/anolisos - -# docker build --build-arg VERSION={VERSION} . -ARG VERSION - -RUN yum install -y yum-utils && \ - yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo && \ - sed -i 's/$releasever/7/' /etc/yum.repos.d/OceanBase.repo && \ - yum install -y libaio mysql && \ - yum clean all - -ENV OBVersion=$VERSION -RUN if [ -z "${OBVersion}" ]; then \ - echo "VERSION is empty, then build the docker with latest rpm"; \ - VersionPre=`yum info oceanbase-ce | grep Version | awk '{print $3}'`; \ - Release=`yum info oceanbase-ce | grep Release | awk '{print $3}' | awk -F. '{print $1}'`; \ - OBVersion="${VersionPre}-${Release}"; \ - else \ - echo "build the docker with VERSION ${OBVersion}"; \ - fi && \ - mkdir -p /root/pkg && mkdir -p /root/store && mkdir -p /root/dest && \ - cd /root/pkg && \ - yum install -y --downloadonly --downloaddir=. oceanbase-ce-${OBVersion}.el7 oceanbase-ce-libs-${OBVersion}.el7 && \ - rm -rf /usr/obd/mirror/remote/* && \ - yum clean all - -COPY boot /root/boot/ -COPY init_store_for_fast_start.py /root/boot/ -ENV PATH /root/boot:$PATH -ENV LD_LIBRARY_PATH /home/admin/oceanbase/lib:/root/ob/lib:$LD_LIBRARY_PATH - -WORKDIR /root -CMD _boot - -EXPOSE 2881 \ No newline at end of file diff --git a/tools/docker/standalone/init_store_for_fast_start.tmp.py b/tools/docker/standalone/init_store_for_fast_start.tmp.py index 1d19bf1e47..f1333668f8 100644 --- a/tools/docker/standalone/init_store_for_fast_start.tmp.py +++ b/tools/docker/standalone/init_store_for_fast_start.tmp.py @@ -25,6 +25,7 @@ def check_file_or_path_exist(bin_abs_path, home_abs_path, store_tar_file_path, e logging.warn("invalid store tar file path") return False if not os.path.isdir(etc_dest_dir): + logging.warn(etc_dest_dir) logging.warn("invalid etc dest dir") return False return True @@ -46,16 +47,15 @@ if __name__ == "__main__": parser.add_argument("-z", dest="zone", type=str, default="zone1") parser.add_argument("-c", dest="cluster_id", type=str, default="1") parser.add_argument("-d", dest="data_path", type=str, default="/data/store") - parser.add_argument("-i", dest="devname", type=str, default="lo") - parser.add_argument("-r", dest="rootservice", type=str, default="127.0.0.1:@OB_RPC_PORT@") - parser.add_argument("-I", dest="ip", type=str, default="127.0.0.1") + parser.add_argument("-r", dest="rootservice", type=str, default="@OB_SERVER_IP@:@OB_RPC_PORT@") + parser.add_argument("-I", dest="ip", type=str, default="@OB_SERVER_IP@") parser.add_argument("-l", dest="log_level", type=str, default="INFO") parser.add_argument("-o", dest="opt_str", type=str, default="__min_full_resource_pool_memory=2147483648,memory_limit=6G,system_memory=1G,datafile_size=256M,log_disk_size=5G,cpu_count=16") parser.add_argument("-N", dest="daemon", type=str, default="1") parser.add_argument("--tenant_name", type=str, default="@OB_TENANT_NAME@") parser.add_argument("--tenant_lower_case_table_names", type=int, default="@OB_TENANT_LOWER_CASE_TABLE_NAMES@") - parser.add_argument("--max_cpu", type=float, default=14.0) - parser.add_argument("--min_cpu", type=float, default=14.0) + parser.add_argument("--max_cpu", type=float, default=7.0) + parser.add_argument("--min_cpu", type=float, default=7.0) parser.add_argument("--memory_size", type=int, default=3221225472) parser.add_argument("--log_disk_size", type=int, default=3221225472) args = parser.parse_args() @@ -83,8 +83,8 @@ if __name__ == "__main__": # prepare observer start parameters daemon_option = "-N" if args.daemon=="1" else "" - observer_args = "-p %s -P %s -z %s -c %s -d %s -i %s -r %s -I %s -l %s -o %s %s" % (args.mysql_port, args.rpc_port, args.zone, \ - args.cluster_id, data_abs_path, args.devname, \ + observer_args = "-p %s -P %s -z %s -c %s -d %s -r %s -I %s -l %s -o %s %s" % (args.mysql_port, args.rpc_port, args.zone, \ + args.cluster_id, data_abs_path, \ args.rootservice, args.ip, args.log_level, args.opt_str, \ daemon_option) os.chdir(home_abs_path) diff --git a/tools/docker/standalone/fast_boot_docker_build_prepare/boot/_boot b/tools/docker/standalone/step_1_boot/_boot similarity index 100% rename from tools/docker/standalone/fast_boot_docker_build_prepare/boot/_boot rename to tools/docker/standalone/step_1_boot/_boot diff --git a/tools/docker/standalone/fast_boot_docker_build_prepare/boot/env.sh b/tools/docker/standalone/step_1_boot/env.sh similarity index 100% rename from tools/docker/standalone/fast_boot_docker_build_prepare/boot/env.sh rename to tools/docker/standalone/step_1_boot/env.sh diff --git a/tools/docker/standalone/boot/_boot b/tools/docker/standalone/step_2_boot/_boot similarity index 95% rename from tools/docker/standalone/boot/_boot rename to tools/docker/standalone/step_2_boot/_boot index ee5cbce7d9..f0feb805b2 100755 --- a/tools/docker/standalone/boot/_boot +++ b/tools/docker/standalone/step_2_boot/_boot @@ -56,7 +56,6 @@ function get_mode() { MODE=${MODE^^} } - function exit_while_error() { if test -z ${EXIT_WHILE_ERROR} then @@ -66,6 +65,15 @@ function exit_while_error() { return `is_true ${EXIT_WHILE_ERROR}` } +function fastboot() { + if test -z ${FASTBOOT} + then + return 0 + fi + + return `is_true ${FASTBOOT}` +} + function remove_disk_check_logic_in_obd() { # make sure obd copy the plugin code obd cluster list @@ -126,9 +134,9 @@ else # nothing here, bootstrap TMPFILE="boot.${STAMP}.yaml" get_mode - if [ "x${MODE}" == "xSTANDALONE" ]; then - echo "oceanbase-ce docker in standalone mode" - cp -f boot-mini-tmp.yaml $TMPFILE + if [ "x${MODE}" == "xNORMAL" ]; then + echo "oceanbase-ce docker in normal mode" + cp -f boot-tmp.yaml $TMPFILE elif [ "x${MODE}" == "xMINI" ]; then echo "oceanbase-ce docker in mini mode" cp -f boot-mini-tmp.yaml $TMPFILE @@ -136,14 +144,14 @@ else # nothing here, bootstrap echo "oceanbase-ce docker in slim mode" cp -f boot-mini-tmp.yaml $TMPFILE else - cp -f boot-tmp.yaml $TMPFILE + cp -f boot-mini-tmp.yaml $TMPFILE fi if [ "x${MODE}" != "xSLIM" ]; then cat obagent.yaml >> $TMPFILE fi - if [ "x${MODE}" != "xMINI" ] && [ "x${MODE}" != "xSTANDALONE" ]; then + if [ "x${MODE}" == "xSLIM" ]; then cat ob-configserver.yaml >> $TMPFILE fi @@ -171,7 +179,7 @@ else # nothing here, bootstrap print_start_phase "Ob-deploy deploy" remove_disk_check_logic_in_obd - if [ "x${MODE}" == "xSTANDALONE" ]; then + if fastboot; then obd devmode enable && obd cluster deploy "${OB_CLUSTER_NAME}" -c $TMPFILE; if [ $? -ne 0 ]; then deploy_failed @@ -195,6 +203,11 @@ else # nothing here, bootstrap print_start_phase "Ob-deploy start" obd cluster start ${OB_CLUSTER_NAME} print_end_phase + + if [ "x${MODE}" == "xSLIM" ]; then + run_custom_scripts /root/boot/init.d + fi + else print_start_phase "Ob-deploy autodeploy" obd devmode enable && obd cluster autodeploy "${OB_CLUSTER_NAME}" -c $TMPFILE; @@ -223,6 +236,7 @@ else # nothing here, bootstrap fi print_end_phase fi + if [ $? -ne 0 ]; then deploy_failed fi diff --git a/tools/docker/standalone/boot/_env b/tools/docker/standalone/step_2_boot/_env similarity index 90% rename from tools/docker/standalone/boot/_env rename to tools/docker/standalone/step_2_boot/_env index 25cf09d346..847baa91aa 100755 --- a/tools/docker/standalone/boot/_env +++ b/tools/docker/standalone/step_2_boot/_env @@ -1,7 +1,8 @@ MODE=${MODE:-MINI} +FASTBOOT=${FASTBOOT:-false} EXIT_WHILE_ERROR=${EXIT_WHILE_ERROR:-true} OB_HOME_PATH="/root/ob" -OB_SERVER_IP=$(hostname -i) +OB_SERVER_IP="127.0.0.1" OB_MYSQL_PORT="2881" OB_RPC_PORT="2882" OB_CLUSTER_NAME=${OB_CLUSTER_NAME:-obcluster} diff --git a/tools/docker/standalone/boot/boot-mini-tmp.yaml b/tools/docker/standalone/step_2_boot/boot-mini-tmp.yaml similarity index 98% rename from tools/docker/standalone/boot/boot-mini-tmp.yaml rename to tools/docker/standalone/step_2_boot/boot-mini-tmp.yaml index b4819829f5..115d7cc4e1 100644 --- a/tools/docker/standalone/boot/boot-mini-tmp.yaml +++ b/tools/docker/standalone/step_2_boot/boot-mini-tmp.yaml @@ -17,7 +17,7 @@ oceanbase-ce: datafile_size: @OB_DATAFILE_SIZE@ # Size of the data file. log_disk_size: @OB_LOG_DISK_SIZE@ # The size of disk space used by the clog files. cpu_count: 16 - production_mode: true + production_mode: false syslog_level: INFO # System log level. The default value is INFO. enable_syslog_wf: false # Print system logs whose levels are higher than WARNING to a separate log file. The default value is true. enable_syslog_recycle: true # Enable auto system log recycling or not. The default value is false. diff --git a/tools/docker/standalone/boot/boot-tmp.yaml b/tools/docker/standalone/step_2_boot/boot-tmp.yaml similarity index 92% rename from tools/docker/standalone/boot/boot-tmp.yaml rename to tools/docker/standalone/step_2_boot/boot-tmp.yaml index 74470882c9..b3ea85ae39 100644 --- a/tools/docker/standalone/boot/boot-tmp.yaml +++ b/tools/docker/standalone/step_2_boot/boot-tmp.yaml @@ -9,6 +9,7 @@ oceanbase-ce: rpc_port: @OB_RPC_PORT@ datafile_size: 20G log_disk_size: 20G + production_mode: false appname: @OB_CLUSTER_NAME@ root_password: @OB_ROOT_PASSWORD@ enable_rich_error_msg: true diff --git a/tools/docker/standalone/boot/init_tenant_user.sql b/tools/docker/standalone/step_2_boot/init_tenant_user.sql similarity index 100% rename from tools/docker/standalone/boot/init_tenant_user.sql rename to tools/docker/standalone/step_2_boot/init_tenant_user.sql diff --git a/tools/docker/standalone/boot/ob-configserver.yaml b/tools/docker/standalone/step_2_boot/ob-configserver.yaml similarity index 100% rename from tools/docker/standalone/boot/ob-configserver.yaml rename to tools/docker/standalone/step_2_boot/ob-configserver.yaml diff --git a/tools/docker/standalone/boot/ob-mysql b/tools/docker/standalone/step_2_boot/ob-mysql similarity index 100% rename from tools/docker/standalone/boot/ob-mysql rename to tools/docker/standalone/step_2_boot/ob-mysql diff --git a/tools/docker/standalone/boot/obagent.yaml b/tools/docker/standalone/step_2_boot/obagent.yaml similarity index 100% rename from tools/docker/standalone/boot/obagent.yaml rename to tools/docker/standalone/step_2_boot/obagent.yaml