Skip to content

Commit

Permalink
[docs][cdc-connector][oceanbase] update docker image and os compatibi…
Browse files Browse the repository at this point in the history
…lity in quickstart (apache#2897)

* [docs][cdc-connector] update docker image and description in oceanbase quickstart

* revert removal by accident
  • Loading branch information
whhe authored Dec 27, 2023
1 parent c12c44d commit cebfe2e
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 32 deletions.
23 changes: 7 additions & 16 deletions docs/content/quickstart/oceanbase-tutorial.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,20 @@

Create `docker-compose.yml`.

*Note*: `host` network mode is required in this demo, so it can only work on Linux, see [network-tutorial-host](https://docs.docker.com/network/network-tutorial-host/).

```yaml
version: '2.1'
services:
observer:
image: oceanbase/oceanbase-ce:4.0.0.0
image: oceanbase/oceanbase-ce:4.2.0.0
container_name: observer
environment:
- 'MODE=slim'
- 'OB_ROOT_PASSWORD=pswd'
network_mode: "host"
oblogproxy:
image: whhe/oblogproxy:1.1.0_4x
image: whhe/oblogproxy:1.1.3_4x
container_name: oblogproxy
environment:
- 'OB_SYS_USERNAME=root'
Expand Down Expand Up @@ -60,20 +65,6 @@ docker-compose up -d

### Set password

There is no password for 'root' user by default, but we need a user of 'sys' tenant with non-empty password in oblogproxy. So here we should set a password for 'root@sys' firstly.

Login 'root' user of 'sys' tenant.

```shell
docker-compose exec observer obclient -h127.0.0.1 -P2881 -uroot@sys
```

Set a password, note that the password needs to be consistent with the environment variable 'OB_SYS_PASSWORD' of oblogproxy service.

```mysql
ALTER USER root IDENTIFIED BY 'pswd';
```

From OceanBase 4.0.0.0 CE, we can only fetch the commit log of non-sys tenant.

Here we use the 'test' tenant for example.
Expand Down
23 changes: 7 additions & 16 deletions docs/content/快速上手/oceanbase-tutorial-zh.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,20 @@

配置 `docker-compose.yml`

*注意*:本示例需要使用`host`网络,所以只能在 Linux 系统上运行,更多信息见 [network-tutorial-host](https://docs.docker.com/network/network-tutorial-host/)

```yaml
version: '2.1'
services:
observer:
image: oceanbase/oceanbase-ce:4.0.0.0
image: oceanbase/oceanbase-ce:4.2.0.0
container_name: observer
environment:
- 'MODE=slim'
- 'OB_ROOT_PASSWORD=pswd'
network_mode: "host"
oblogproxy:
image: whhe/oblogproxy:1.1.0_4x
image: whhe/oblogproxy:1.1.3_4x
container_name: oblogproxy
environment:
- 'OB_SYS_USERNAME=root'
Expand Down Expand Up @@ -61,20 +66,6 @@ docker-compose up -d

### 设置密码

OceanBase 中 root 用户默认是没有密码的,但是 oblogproxy 需要配置一个使用非空密码的系统租户用户,因此这里我们需要先为 root@sys 用户设置一个密码。

登陆 sys 租户的 root 用户:

```shell
docker-compose exec observer obclient -h127.0.0.1 -P2881 -uroot@sys
```

设置密码,注意这里的密码需要与上一步中 oblogproxy 服务的环境变量 'OB_SYS_PASSWORD' 保持一样。

```mysql
ALTER USER root IDENTIFIED BY 'pswd';
```

OceanBase 从社区版 4.0.0.0 开始只支持对非 sys 租户的增量数据拉取,这里我们使用 test 租户的 root 用户作为示例。

登陆 test 租户的 root 用户:
Expand Down

0 comments on commit cebfe2e

Please sign in to comment.