6f023f175d | ||
---|---|---|
.github/workflows | ||
cmake | ||
conf | ||
deps | ||
docs | ||
git-hooks | ||
proto | ||
rpm | ||
script | ||
src | ||
.clang-format | ||
.gitignore | ||
.secignore | ||
CMakeLists.txt | ||
LICENSE | ||
README.md | ||
README_CN.md |
README.md
English | 中文版
OceanBase LogProxy
OceanBase LogProxy is an incremental log proxy service for OceanBase that establishes a connection to OceanBase and performs incremental log reads, providing change data capture (CDC) capabilities for downstream services.
Instructions use
Installation
LogProxy occupies resources separately, so it is recommended to deploy it separately from the OceanBase database.
You can install a released version of LogProxy or build it from the source code.
Install a released version
If you want to install a released version, firstly you need to configure the yum repo.
yum install -y yum-utils
yum-config-manager --add-repo https://mirrors.aliyun.com/oceanbase/OceanBase.repo
Then you can install the rpm file by one of the following way:
- Download from release page
, official download page
or official mirror, and install it
with
yum install -y oblogproxy-{version}.{arch}.rpm
- Install it with
yum install -y oblogproxy-{version}
The installation directory is /usr/local/oblogproxy
by default.
Build from source code
git clone git@github.com:oceanbase/oblogproxy.git
cd oblogproxy
mkdir build
cmake -S . -B build
cmake --build build
Configure
For security reasons, LogProxy needs to configure the username and password of a certain user, which must be a sys tenant user of the OceanBase to connect with. Note that the username here should not contain cluster name or tenant name.
You can configure the username and password by one of the following ways:
- Add it to local conf at
conf/conf.json
. - Set it in the client params. See the client doc for details.
Add it to local conf
Firstly, get the encrypted username and password.
./bin/logproxy -x username
./bin/logproxy -x password
Then add the outputs to ob_sys_username
and ob_sys_password
at conf/conf.json
.
Start
You can start the service by the following command.
bash ./run.sh start
Then you can use oblogclient to subscribe the log data from LogProxy, and
the service is bind to port 2983
by default.
The service log of LogProxy is located at logs/
, and the service log of LogReader (task process) is located
at run/{client-id}/logs/
.
Licencing
OceanBase Database is under MulanPubL - 2.0 license. You can freely copy and use the source code. When you modify or distribute the source code, please obey the MulanPubL - 2.0 license.
Contributing
Contributions are warmly welcomed and greatly appreciated. Here are a few ways you can contribute:
- Raise us an issue.
- Submit Pull Requests.
Support
In case you have any problems when using OceanBase LogProxy, welcome reach out for help: