add readme for fast boot image

Signed-off-by: 汪渺 <shanhaikang.shk@oceanbase.com>
This commit is contained in:
汪渺
2023-11-09 16:27:19 +08:00
parent 8d62326974
commit dd2c7bbff7
2 changed files with 26 additions and 0 deletions

View File

@ -110,3 +110,16 @@ docker run -d -p 2881:2881 -v $PWD/ob:/root/ob -v $PWD/obd:/root/.obd --name oce
`oceanbase-ce` docker默认会将数据保存到 /root/ob 目录。必须同时绑定 /root/ob 和 /root/.obd 目录。如果仅仅绑定 /root/ob 目录的话,容器就没办法重启了,因为oceanbase-ce 是使用 [obd](https://github.com/oceanbase/obdeploy)来管理数据库集群的,而启动一个全新的docker容器时,里面没有任何数据库集群信息。
docker -v 参数的详细说明可以参考 [docker volumn](https://docs.docker.com/storage/volumes/)。
## 快速单机启动镜像构建
`tools/docker/standalone`目录下提供`fast_boot_docker_build.sh`脚本,通过该脚本可以构建快速启动镜像。在运行脚本之前,请首先修改`tools/docker/standalone/boot/_env`环境配置脚本:
- 必须:将`MODE`配置项修改为`STANDALONE`
- 可选:修改其余配置项
修改完毕后,执行镜像构建脚本,目前支持使用远程RPM包构建以及本地编译生成的RPM包两种方式:
- 本地:`./fast_boot_docker_build.sh -L <oceanbase_rpm_path> <oceanbase_lib_rpm_path>`
- 远程:`./fast_boot_docker_build.sh -R <remote_rpm_version>`
等待构建完毕后,可使用前述相同的方式启动、测试实例。

View File

@ -107,3 +107,16 @@ Note that you should use your own path.
The docker image `oceanbase-ce` saves the data to /root/ob directory default. You should bind both the /root/ob and /root/.obd. You can not start new docker image if you only bind the /root/ob directory, because the docker image oceanbase-ce uses the [obd](https://github.com/oceanbase/obdeploy) to manage database clusters and there is no information about the database cluster in a new docker container.
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:
- Required: Modify the `MODE` configuration item to `STANDALONE`
- Optional: Modify the remaining configuration items
After the modification is completed, execute the image build script. Currently, two methods are supported: building with remote RPM packages and building with RPM packages generated by local compilation:
- Local: `./fast_boot_docker_build.sh -L <oceanbase_rpm_path> <oceanbase_lib_rpm_path>`
- Remote: `./fast_boot_docker_build.sh -R <remote_rpm_version>`
After waiting for the build to be completed, you can start and test the instance in the same way as mentioned above.