Skip to content

Commit 9f4e1b3

Browse files
update readme
1 parent 53f4e4f commit 9f4e1b3

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

oceanbase-ce/README.md

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ OceanBase provide a standalone test image named [oceanbase-ce](https://hub.docke
55
**WARNING**
66

77
- The `oceanbase-ce` docker image is just used for study or test;
8-
- Please use [ob-operator](https://github.com/oceanbase/ob-operator) instead if you want to deploy OceanBase in k8s;
9-
- You should not deploy it with important data as it is not used in production environment.
8+
- Please use [ob-operator](https://github.com/oceanbase/ob-operator) instead if you want to deploy OceanBase on Kubernetes;
9+
- You should not deploy it with important data as it is not designed to use in production environment.
1010

1111
Reasons:
1212

@@ -30,14 +30,15 @@ To start an OceanBase instance, run this command:
3030
# deploy mini instance
3131
docker run -p 2881:2881 --name oceanbase-ce -d oceanbase/oceanbase-ce
3232

33-
# deploy an instance of the slim size according to the current container
34-
docker run -p 2881:2881 --name oceanbase-ce -e MODE=slim -e OB_MEMORY_LIMIT=5G -v {init_sql_folder_path}:/root/boot/init.d -d oceanbase/oceanbase-ce
35-
3633
# deploy an instance of the largest size according to the current container
3734
docker run -p 2881:2881 --name oceanbase-ce -e MODE=normal -d oceanbase/oceanbase-ce
3835

3936
# deploy a quick-start instance in any mode as desired to the current container
40-
docker run -p 2881:2881 --name oceanbase-ce -e FASTBOOT=true -d oceanbase/oceanbase-ce
37+
docker run -p 2881:2881 --name oceanbase-ce -e MODE=slim -d oceanbase/oceanbase-ce
38+
39+
# deploy an instance and execute init sqls
40+
docker run -p 2881:2881 --name oceanbase-ce -v {init_sql_folder_path}:/root/boot/init.d -d oceanbase/oceanbase-ce
41+
4142
```
4243

4344
Up to five minutes are necessary for the boot procedure. To make sure that the boot procedure is successful, run this command:
@@ -75,14 +76,14 @@ This table shows the supported environment variables of the current oceanbase-ce
7576

7677
| Variable name | Default value | Description |
7778
|-------------------------|----------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
78-
| 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. |
79+
| 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 container starts in quick start mode. It remove the obagent and ob-configserver. |
7980
| 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. |
8081
| OB_CLUSTER_NAME | obcluster | The oceanbase cluster name |
8182
| OB_TENANT_NAME | test | The oceanbase mysql tenant name |
8283
| OB_MEMORY_LIMIT | 6G | The oceanbase cluster memory_limit configuration |
8384
| OB_DATAFILE_SIZE | 5G | The oceanbase cluster datafile_size configuration |
8485
| OB_LOG_DISK_SIZE | 5G | The oceanbase cluster log_disk_size configuration |
85-
| OB_ROOT_PASSWORD | | The oceanbase root user password of sys tenant |
86+
| OB_SYS_PASSWORD | | The oceanbase root user password of sys tenant |
8687
| OB_SYSTEM_MEMORY | 1G | The oceanbase cluster system_memory configuration |
8788
| OB_TENANT_MINI_CPU | | The oceanbase tenant mini_cpu configuration |
8889
| OB_TENANT_MEMORY_SIZE | | The oceanbase tenant memory_size configuration |
@@ -103,24 +104,15 @@ You can use `-v /your/host/path:/container/path` parameter in docker `run` comma
103104
Below is an example.
104105

105106
```bash
106-
docker run -d -p 2881:2881 -v $PWD/ob:/root/ob -v $PWD/obd:/root/.obd --name oceanbase oceanbase/oceanbase-ce
107+
docker run -d -p 2881:2881 -v $PWD/ob:/root/ob -v $PWD/obd/cluster:/root/.obd/cluster --name oceanbase oceanbase/oceanbase-ce
107108
```
108109

109110
Note that you should use your own path.
110111

111-
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.
112+
The docker image `oceanbase-ce` saves the data to /root/ob directory default. You should bind both the /root/ob and /root/.obd/cluster. 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.
112113

113114
You can view more information about `docker -v` at [docker volume](https://docs.docker.com/storage/volumes/).
114115

115-
## Fast boot image building for a standalone node
116-
117-
The `docker_build.sh` script is provided to build the fast boot image of `oceanbase-ce`. You can execute it to:
118-
119-
- build the image with latest version `./docker_build.sh`
120-
- build the image with specific version `./docker_build.sh <oceanbase_rpm_version>`. For example `./docker_build.sh 4.2.1.0-100000102023092807`
121-
122-
After waiting for the build to be completed, you can start and test the instance in the same way as mentioned above.
123-
124116
## Fault Diagnosis
125117

126118
A series of diagnostic methods are provided to diagnose errors in Docker.

0 commit comments

Comments
 (0)