Skip to content

Commit d68e69b

Browse files
authored
update github action and readme for v4 (#65)
1 parent 4151b23 commit d68e69b

File tree

4 files changed

+81
-98
lines changed

4 files changed

+81
-98
lines changed

.github/workflows/build_rpm.yml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
name: Build RPM
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
centos_release:
7+
required: true
8+
type: string
9+
10+
env:
11+
mount_directory: /mnt/oblogproxy
12+
build_workspace: /opt/oblogproxy
13+
14+
jobs:
15+
build-rpm:
16+
runs-on: ubuntu-latest
17+
steps:
18+
- name: Free disk space on Ubuntu runner
19+
uses: kfir4444/free-disk-space@main
20+
with:
21+
tool-cache: false
22+
android: true
23+
dotnet: true
24+
haskell: true
25+
large-packages: true
26+
swap-storage: true
27+
28+
- name: Check out repository code
29+
uses: actions/checkout@v4
30+
31+
- name: Prepare CentOS container
32+
run: |
33+
sudo mkdir -p ${mount_directory}
34+
sudo chmod 777 ${mount_directory}
35+
36+
docker run --name=centos -v ${mount_directory}:${build_workspace} -w ${build_workspace} -id centos:${{ inputs.centos_release }}
37+
docker cp . centos:${build_workspace}
38+
39+
docker exec -i centos /bin/sh -c "sed -i 's/mirrorlist/#mirrorlist/g' /etc/yum.repos.d/CentOS-*"
40+
docker exec -i centos /bin/sh -c "sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-*"
41+
docker exec -i centos yum install -y sudo git which wget make rpm-build gcc-c++ autoconf zlib-devel openssl-devel
42+
docker exec -i centos yum clean all
43+
44+
- name: Build and package
45+
run: |
46+
docker exec -i centos /bin/sh -c "export PROJECT_NAME=obbinlog-ce && sh ${build_workspace}/rpm/obbinlog-ce-build.sh ${build_workspace} obbinlog-ce 4.x $(date +%Y%m%d%H)"
47+
48+
rpm_file=$(docker exec -i centos /bin/sh -c "ls ${build_workspace}/rpm/*.rpm")
49+
docker cp centos:${rpm_file} .
50+
51+
- name: Upload artifact
52+
uses: actions/upload-artifact@v4
53+
with:
54+
name: rpm-el${{ inputs.centos_release }}
55+
path: "**.rpm"

.github/workflows/ci.yml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- 'v4'
7+
pull_request:
8+
branches:
9+
- 'v4'
10+
11+
concurrency:
12+
group: ci-${{ github.event.pull_request.number || github.ref }}
13+
cancel-in-progress: true
14+
15+
jobs:
16+
build:
17+
strategy:
18+
matrix:
19+
centos_release: [ "7", "8" ]
20+
uses: ./.github/workflows/build_rpm.yml
21+
with:
22+
centos_release: ${{ matrix.centos_release }}

.github/workflows/cmake_build.yml

Lines changed: 0 additions & 23 deletions
This file was deleted.

README.md

Lines changed: 4 additions & 75 deletions
Original file line numberDiff line numberDiff line change
@@ -1,83 +1,12 @@
1-
<p align="center">
2-
<a href="https://github.com/oceanbase/oblogproxy/blob/dev/LICENSE">
3-
<img alt="license" src="https://img.shields.io/badge/license-MulanPubL--2.0-blue" />
4-
</a>
5-
<a href="https://github.com/oceanbase/oblogproxy/releases/latest">
6-
<img alt="license" src="https://img.shields.io/badge/dynamic/json?color=blue&label=release&query=tag_name&url=https%3A%2F%2Fapi.github.com%2Frepos%2Foceanbase%2Foblogproxy%2Freleases%2Flatest" />
7-
</a>
8-
<a href="https://www.oceanbase.com/docs/oblogproxy-doc">
9-
<img alt="Chinese doc" src="https://img.shields.io/badge/文档-简体中文-blue" />
10-
</a>
11-
<a href="https://github.com/oceanbase/oblogproxy/commits/dev">
12-
<img alt="last commit" src="https://img.shields.io/github/last-commit/oceanbase/oblogproxy/dev" />
13-
</a>
14-
</p>
15-
161
# OBLogProxy
172

18-
[OBLogProxy](https://github.com/oceanbase/oblogproxy)[OceanBase](https://github.com/oceanbase/oceanbase) 的增量日志代理服务,它可以与 OceanBase 建立连接并进行增量日志读取,为下游服务提供了变更数据捕获(CDC)的能力。
19-
20-
## OBLogProxy 功能特点
21-
22-
OBLogProxy 有 2 种模式,分别是 Binlog 模式和 CDC 模式。
23-
24-
### Binlog 模式
25-
26-
Binlog 模式为 OceanBase 兼容 MySQL binlog 而推出,支持现有的 MySQL binlog 增量解析工具实时同步 OceanBase,使 MySQL binlog 增量解析工具可以平滑切换到 OceanBase 数据库。
27-
28-
### CDC 模式
29-
30-
CDC 模式用于解决数据同步,CDC 模式下 OBLogProxy 可以订阅 OceanBase 数据库中的数据变更,并将这些数据变更实时同步至下游服务,实现数据的实时或准实时复制和同步。
31-
32-
**有关于 OBLogProxy 的更多内容,请参考 [OBLogProxy 文档](https://www.oceanbase.com/docs/oblogproxy-doc)**
33-
34-
## 源码构建 OBLogProxy
35-
36-
### 前提条件
37-
38-
安装 CMake,要求版本 3.20 及以上。下载安装,请参考 [CMake 官方网站](https://cmake.org/download)
39-
40-
### 安装依赖
41-
42-
基于 Fedora (包括 CentOS,Fedora,OpenAnolis,RedHat,UOS 等)
43-
44-
```bash
45-
yum install -y which git wget rpm rpm-build cpio gcc gcc-c++ make glibc-devel glibc-headers libstdc++-static binutils zlib zlib-devel bison flex java-11-openjdk
46-
```
47-
48-
### 源码编译
49-
50-
```shell
51-
git clone https://github.com/oceanbase/oblogproxy.git
52-
cd oblogproxy
53-
mkdir build
54-
cd build
55-
cmake ..
56-
cmake --build . -j 8
57-
```
58-
### 编译选项
59-
60-
在执行 CMake 编译时,可以添加编译选项改变默认的行为。例如, 编译出 Demo,成功后,当前目录还会产出 `demo_client` 二进制。
61-
62-
```bash
63-
mkdir build
64-
cd build
65-
cmake -DWITH_DEMO=ON ..
66-
cmake --build . -j 8
67-
```
68-
69-
项目中的其他编译选项。
3+
OBLogProxy 是 OceanBase 数据库的增量日志代理工具,可以用于获取 OceanBase 数据库的增量日志,为下游服务提供变更数据捕获(CDC)的能力。更多信息请参考 [产品文档](https://www.oceanbase.com/docs/oblogproxy-doc)
704

71-
| 选项 | 默认 | 说明 |
72-
|------------|-----|------------------------------------------------------------------------------------|
73-
| WITH_DEBUG | ON | 调试模式带 Debug 符号 |
74-
| WITH_ASAN | OFF | 编译带 [AddressSanitizer](https://github.com/google/sanitizers/wiki/AddressSanitizer) |
75-
| WITH_TEST | OFF | 测试 |
76-
| WITH_DEMO | OFF | Demo |
5+
本仓库为 OBLogProxy 社区版的代码仓库。自 4.x 版本开始,OBLogProxy 的产品名已由 `oblogproxy` 变更为 `obbinlog`
776

787
## 许可
798

80-
OBLogProxy 使用 MulanPubL-2.0 许可。当您修改或分发源代码时,请遵守 [MulanPubL-2.0](LICENSE)
9+
本项目使用 MulanPubL-2.0 许可。当您修改或分发源代码时,请遵守 [MulanPubL-2.0](LICENSE)
8110

8211
## 贡献
8312

@@ -88,7 +17,7 @@ OBLogProxy 使用 MulanPubL-2.0 许可。当您修改或分发源代码时,请
8817

8918
## 支持
9019

91-
如果您在使用 OBLogProxy 时遇到任何问题,欢迎联系我们寻求帮助:
20+
如果您在使用本项目时遇到任何问题,欢迎联系我们寻求帮助:
9221

9322
- [GitHub Issue](https://github.com/oceanbase/oblogproxy/issues)
9423
- [问答论坛](https://ask.oceanbase.com/)

0 commit comments

Comments
 (0)