GithubHelp home page GithubHelp logo

web-logs2 / oblogproxy Goto Github PK

View Code? Open in Web Editor NEW

This project forked from oceanbase/oblogproxy

0.0 0.0 0.0 257 KB

A proxy service of incremental log of OceanBase

License: Other

Shell 1.79% C++ 88.14% C 0.15% CMake 9.92%

oblogproxy's Introduction

OceanBase LogProxy

OceanBase LogProxy (CE) is a proxy service of OceanBase CE. It is a part of OMS, and it can establish and manage connections with OceanBase for incremental log reading even with a isolated network.

Instructions before use

Version compatibility

LogProxy is based on libobcdc (former liboblog), which is packaged in oceanbase-ce-cdc rpm file from v4.0.0. You can get it from the software center or official mirrors.

For v1.1.0 or later versions of LogProxy, we no longer provide the rpm file for installation. Users should use the compressed package at software center or releases page, which already has a suitable libobcdc built in, so users no longer need to install libobcdc manually.

Please check the release note for detailed version compatibility information.

For OceanBase CE 3.x Users

The libobcdc or liboblog was packaged in oceanbase-ce-devel rpm file before v4.0.0, and users need to install it manually before deploy the LogProxy service.

The version correspondence between libobcdc and LogProxy is as follows.

libobcdc LogProxy
3.1.1 1.0.0
3.1.2 1.0.1
3.1.3 1.0.2
3.1.4 1.0.3

Installation

LogProxy service doesn't need params about OceanBase cluster to get started, one LogProxy can subscribe to multiple OceanBase clusters at the same time, and the connection configuration is passed from the client.

LogProxy will use a lot of memory, so it is strongly recommended to deploy it separately from the OceanBase server.

Getting started

Install

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, you can use the compressed package at the release page or software center. Here we take /usr/local/oblogproxy as the deployment directory.

wget https://github.com/oceanbase/oblogproxy/releases/download/v1.1.1/oblogproxy-ce-for-4x-1.1.1-20230418115957.tar.gz
tar -zxvf oblogproxy-ce-for-4x-1.1.1-20230418115957.tar.gz -C /usr/local

Build from source code

See How to 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, set the libobcdc path to environment, here we use the builtin libobcdc in the deployment directory.

export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/oblogproxy/libobcdc

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 thread) 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:

oblogproxy's People

Contributors

fankux avatar whhe avatar shimengfei avatar linxiansheng avatar amber1990zhang avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.