Skip to content

Commit

Permalink
tiflow: adjust README files (#5375)
Browse files Browse the repository at this point in the history
ref #3194
  • Loading branch information
niubell authored May 11, 2022
1 parent e915545 commit 858613b
Show file tree
Hide file tree
Showing 3 changed files with 79 additions and 87 deletions.
73 changes: 4 additions & 69 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,80 +1,15 @@
# TiCDC
# TiFlow

[![Build Status](https://github.com/pingcap/tiflow/actions/workflows/check_and_build.yaml/badge.svg?branch=master)](https://github.com/pingcap/tiflow/actions/workflows/check_and_build.yaml?query=event%3Apush+branch%3Amaster)
[![codecov](https://codecov.io/gh/pingcap/tiflow/branch/master/graph/badge.svg)](https://codecov.io/gh/pingcap/tiflow)
[![Coverage Status](https://coveralls.io/repos/github/pingcap/tiflow/badge.svg)](https://coveralls.io/github/pingcap/tiflow)
[![LICENSE](https://img.shields.io/github/license/pingcap/tiflow.svg)](https://github.com/pingcap/tiflow/blob/master/LICENSE)
[![Go Report Card](https://goreportcard.com/badge/github.com/pingcap/tiflow)](https://goreportcard.com/report/github.com/pingcap/tiflow)

**TiCDC** is [TiDB](https://docs.pingcap.com/tidb/stable)'s change data capture framework. It supports replicating change data to various downstreams, including MySQL protocol-compatible databases, message queues via the open CDC protocol and other systems such as local file storage.
## Introduction

## Architecture

<img src="docs/media/cdc_architecture.svg?sanitize=true" alt="architecture" width="600"/>

See a detailed introduction to [the TiCDC architecture](https://docs.pingcap.com/tidb/stable/ticdc-overview#ticdc-architecture).

## Documentation

- [English](https://docs.pingcap.com/tidb/stable/ticdc-overview)
- [Chinese](https://docs.pingcap.com/zh/tidb/stable/ticdc-overview)

## Blog

- [English](https://pingcap.com/blog/)
- [Chinese](https://pingcap.com/blog-cn/)

## Building

To check the source code, run test cases and build binaries, you can simply run:

```bash
$ make
$ make test
```

Note that TiCDC supports building with Go version `Go >= 1.16`.

When TiCDC is built successfully, you can find binary in the `bin` directory. Instructions for unit test and integration
test can be found in [Running tests](./tests/integration_tests/README.md).

## Deployment

You can setup a CDC cluster for replication test manually as following:

1. Setup a TiDB cluster.
2. Start a CDC cluster, which contains one or more CDC servers. The command to start on CDC server is `cdc server --pd http://10.0.10.25:2379`, where `http://10.0.10.25:2379` is the client-url of pd-server.
3. Start a replication changefeed by `cdc cli changefeed create --pd http://10.0.10.25:2379 --start-ts 413105904441098240 --sink-uri mysql://root:123456@127.0.0.1:3306/`. The TSO is TiDB `timestamp oracle`. If it is not provided or set to zero, the TSO of start time will be used. Currently, we support MySQL protocol-compatible databases as downstream sinks only, and will add more sink types in the future.

For details, see [Deploy TiCDC](https://docs.pingcap.com/tidb/stable/deploy-ticdc).

## Quick start

```sh
# Start TiDB cluster
$ docker-compose -f ./deployments/ticdc/docker-compose/docker-compose-mysql.yml up -d

# Attach to control container to run TiCDC
$ docker exec -it ticdc_controller sh

# Start to feed the changes on the upstream tidb, and sink to the downstream tidb
$ ./cdc cli changefeed create --pd http://upstream-pd:2379 --sink-uri mysql://root@downstream-tidb:4000/

# Exit the control container
$ exit

# Load data to the upstream tidb
$ sysbench --mysql-host=127.0.0.1 --mysql-user=root --mysql-port=4000 --mysql-db=test oltp_insert --tables=1 --table-size=100000 prepare

# Check sync progress
$ mysql -h 127.0.0.1 -P 5000 -u root -e "SELECT COUNT(*) FROM test.sbtest1"
```

## Contributing

Contributions are welcomed and greatly appreciated. See [CONTRIBUTING.md](./CONTRIBUTING.md)
for details on submitting patches and the contribution workflow.
**TiFlow** is a unified data replication platform around [TiDB](https://docs.pingcap.com/tidb/stable), including two main components: DM and TiCDC. DM supports full data migration and incremental data replication from MySQL/MariaDB into [TiDB](https://docs.pingcap.com/tidb/stable). TiCDC supports replicating change data to various downstreams, including MySQL protocol-compatible databases, message queues via the open TiCDC protocol and other systems such as local file storage. More details can be found in [DM README](./README_DM.md) and [TiCDC README](./README_TiCDC.md).

## License

TiCDC is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.
**TiFlow** is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.
23 changes: 5 additions & 18 deletions dm/README.md → README_DM.md
Original file line number Diff line number Diff line change
@@ -1,17 +1,10 @@
# TiDB Data Migration Platform

[![Build Status](https://internal.pingcap.net/idc-jenkins/job/build_dm_multi_branch/job/master/badge/icon)](https://internal.pingcap.net/idc-jenkins/job/build_dm_multi_branch/job/master)
![GitHub release](https://img.shields.io/github/tag/pingcap/dm.svg)
[![Coverage Status](https://coveralls.io/repos/github/pingcap/dm/badge.svg)](https://coveralls.io/github/pingcap/dm)
[![codecov](https://codecov.io/gh/pingcap/dm/branch/master/graph/badge.svg)](https://codecov.io/gh/pingcap/dm)
[![Go Report Card](https://goreportcard.com/badge/github.com/pingcap/dm)](https://goreportcard.com/report/github.com/pingcap/dm)
[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgh.neting.cc%2Fpingcap%2Fdm.svg?type=shield)](https://app.fossa.com/projects/git%2Bgh.neting.cc%2Fpingcap%2Fdm?ref=badge_shield)

[**TiDB Data Migration (DM)**](https://docs.pingcap.com/tidb-data-migration/stable) is an integrated data migration task management platform that supports full data migration and incremental data replication from MySQL/MariaDB into [TiDB](https://docs.pingcap.com/tidb/stable). It helps reduce the operations cost and simplify the troubleshooting process.

## Architecture

![architecture](docs/media/dm-architecture.png)
![architecture](dm/docs/media/dm-architecture.png)

## Documentation

Expand All @@ -26,7 +19,7 @@ To check the code style and build binaries, you can simply run:
make build
```

Note that DM supports building with Go version `Go >= 1.16`, and unit test preparation can be found in [Running/Unit Test](tests/README.md#Unit-Test)
Note that DM supports building with Go version `Go >= 1.16`, and unit test preparation can be found in [Running/Unit Test](dm/tests/README.md#Unit-Test)

If you only want to build binaries, you can run:

Expand All @@ -44,7 +37,7 @@ When DM is built successfully, you can find binaries in the `bin` directory.

Run all tests, including unit tests and integration tests:

See [test/README.md](./tests/README.md) for a more detailed guidance.
See [Tests README](dm/tests/README.md) for a more detailed guidance.

```bash
make test
Expand All @@ -60,21 +53,15 @@ See the "Configuration" section in [our doc](https://docs.pingcap.com/tidb-data-

## Roadmap

Read the [Roadmap](roadmap.md).
Read the [Roadmap](dm/roadmap.md).

## Contributing

Contributions are welcomed and greatly appreciated. See [CONTRIBUTING.md](./CONTRIBUTING.md)
Contributions are welcomed and greatly appreciated. See [CONTRIBUTING.md](dm/CONTRIBUTING.md)
for details on submitting patches and the contribution workflow.

Any questions? Let's discuss on [TiDB Internals forum](https://internals.tidb.io/).

## License

DM is under the Apache 2.0 license. See the [LICENSE](./LICENSE) file for details.

[![FOSSA Status](https://app.fossa.com/api/projects/git%2Bgh.neting.cc%2Fpingcap%2Fdm.svg?type=large)](https://app.fossa.com/projects/git%2Bgh.neting.cc%2Fpingcap%2Fdm?ref=badge_large)

## More resources

- TiDB blog
Expand Down
70 changes: 70 additions & 0 deletions README_TiCDC.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# TiCDC

**TiCDC** is [TiDB](https://docs.pingcap.com/tidb/stable)'s change data capture framework. It supports replicating change data to various downstreams, including MySQL protocol-compatible databases, message queues via the open CDC protocol and other systems such as local file storage.

## Architecture

<img src="docs/media/cdc_architecture.svg?sanitize=true" alt="architecture" width="600"/>

See a detailed introduction to [the TiCDC architecture](https://docs.pingcap.com/tidb/stable/ticdc-overview#ticdc-architecture).

## Documentation

- [English](https://docs.pingcap.com/tidb/stable/ticdc-overview)
- [Chinese](https://docs.pingcap.com/zh/tidb/stable/ticdc-overview)

## Blog

- [English](https://pingcap.com/blog/)
- [Chinese](https://pingcap.com/blog-cn/)

## Building

To check the source code, run test cases and build binaries, you can simply run:

```bash
$ make
$ make test
```

Note that TiCDC supports building with Go version `Go >= 1.16`.

When TiCDC is built successfully, you can find binary in the `bin` directory. Instructions for unit test and integration
test can be found in [Running tests](./tests/integration_tests/README.md).

## Deployment

You can setup a CDC cluster for replication test manually as following:

1. Setup a TiDB cluster.
2. Start a CDC cluster, which contains one or more CDC servers. The command to start on CDC server is `cdc server --pd http://10.0.10.25:2379`, where `http://10.0.10.25:2379` is the client-url of pd-server.
3. Start a replication changefeed by `cdc cli changefeed create --pd http://10.0.10.25:2379 --start-ts 413105904441098240 --sink-uri mysql://root:123456@127.0.0.1:3306/`. The TSO is TiDB `timestamp oracle`. If it is not provided or set to zero, the TSO of start time will be used. Currently, we support MySQL protocol-compatible databases as downstream sinks only, and will add more sink types in the future.

For details, see [Deploy TiCDC](https://docs.pingcap.com/tidb/stable/deploy-ticdc).

## Quick start

```sh
# Start TiDB cluster
$ docker-compose -f ./deployments/ticdc/docker-compose/docker-compose-mysql.yml up -d

# Attach to control container to run TiCDC
$ docker exec -it ticdc_controller sh

# Start to feed the changes on the upstream tidb, and sink to the downstream tidb
$ ./cdc cli changefeed create --pd http://upstream-pd:2379 --sink-uri mysql://root@downstream-tidb:4000/

# Exit the control container
$ exit

# Load data to the upstream tidb
$ sysbench --mysql-host=127.0.0.1 --mysql-user=root --mysql-port=4000 --mysql-db=test oltp_insert --tables=1 --table-size=100000 prepare

# Check sync progress
$ mysql -h 127.0.0.1 -P 5000 -u root -e "SELECT COUNT(*) FROM test.sbtest1"
```

## Contributing

Contributions are welcomed and greatly appreciated. See [CONTRIBUTING.md](./CONTRIBUTING.md)
for details on submitting patches and the contribution workflow.

0 comments on commit 858613b

Please sign in to comment.