This is an automated email from the ASF dual-hosted git repository.
dockerzhang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/inlong-website.git
The following commit(s) were added to refs/heads/master by this push:
new ebd60b4015 [INLONG-906][Doc] Add MySQL to StarRocks example document
for data sync (#907)
ebd60b4015 is described below
commit ebd60b40151fb5ef4cf8a8ebbb4f57d1220e40d5
Author: haifxu <[email protected]>
AuthorDate: Wed Dec 20 09:50:16 2023 +0800
[INLONG-906][Doc] Add MySQL to StarRocks example document for data sync
(#907)
---
.../data_sync/img/mysql_starrocks/approve.png | Bin 0 -> 32722 bytes
.../img/mysql_starrocks/audit_starrocks.png | Bin 0 -> 49529 bytes
.../img/mysql_starrocks/create_cluster_tag.png | Bin 0 -> 28397 bytes
.../img/mysql_starrocks/create_fields.png | Bin 0 -> 22321 bytes
.../img/mysql_starrocks/create_group_stream.png | Bin 0 -> 19587 bytes
.../img/mysql_starrocks/create_pulsar_cluster.png | Bin 0 -> 26969 bytes
.../data_sync/img/mysql_starrocks/create_sink.png | Bin 0 -> 24007 bytes
.../img/mysql_starrocks/create_source.png | Bin 0 -> 27032 bytes
.../mysql_starrocks/create_starrocks_datanode.png | Bin 0 -> 23327 bytes
.../data_sync/img/mysql_starrocks/result_sink.png | Bin 0 -> 7820 bytes
.../img/mysql_starrocks/result_source.png | Bin 0 -> 6710 bytes
.../data_sync/img/mysql_starrocks/success.png | Bin 0 -> 6978 bytes
.../data_sync/mysql_starrocks_example.md | 122 +++++++++++++++++++++
.../data_sync/img/mysql_starrocks/approve.png | Bin 0 -> 30831 bytes
.../img/mysql_starrocks/audit_starrocks.png | Bin 0 -> 56342 bytes
.../img/mysql_starrocks/create_cluster_tag.png | Bin 0 -> 14019 bytes
.../img/mysql_starrocks/create_fields.png | Bin 0 -> 20215 bytes
.../img/mysql_starrocks/create_group_stream.png | Bin 0 -> 20494 bytes
.../img/mysql_starrocks/create_pulsar_cluster.png | Bin 0 -> 28881 bytes
.../data_sync/img/mysql_starrocks/create_sink.png | Bin 0 -> 24071 bytes
.../img/mysql_starrocks/create_source.png | Bin 0 -> 28629 bytes
.../mysql_starrocks/create_starrocks_datanode.png | Bin 0 -> 23369 bytes
.../data_sync/img/mysql_starrocks/result_sink.png | Bin 0 -> 7820 bytes
.../img/mysql_starrocks/result_source.png | Bin 0 -> 6710 bytes
.../data_sync/img/mysql_starrocks/success.png | Bin 0 -> 7237 bytes
.../data_sync/mysql_starrocks_example.md | 116 ++++++++++++++++++++
26 files changed, 238 insertions(+)
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/approve.png
b/docs/quick_start/data_sync/img/mysql_starrocks/approve.png
new file mode 100644
index 0000000000..d12423af97
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/approve.png differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png
b/docs/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png
new file mode 100644
index 0000000000..1d4b56dba5
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png differ
diff --git
a/docs/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png
new file mode 100644
index 0000000000..bc1fc8a16d
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/create_fields.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_fields.png
new file mode 100644
index 0000000000..8a0fff2b55
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_fields.png differ
diff --git
a/docs/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png
new file mode 100644
index 0000000000..76cfb34ee2
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png differ
diff --git
a/docs/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
new file mode 100644
index 0000000000..eb725498e7
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/create_sink.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_sink.png
new file mode 100644
index 0000000000..4c9e66f767
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_sink.png differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/create_source.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_source.png
new file mode 100644
index 0000000000..1bab203937
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_source.png differ
diff --git
a/docs/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
b/docs/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
new file mode 100644
index 0000000000..9448f8caee
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/result_sink.png
b/docs/quick_start/data_sync/img/mysql_starrocks/result_sink.png
new file mode 100644
index 0000000000..bcb7b4eb89
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/result_sink.png differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/result_source.png
b/docs/quick_start/data_sync/img/mysql_starrocks/result_source.png
new file mode 100644
index 0000000000..f58943623c
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/result_source.png differ
diff --git a/docs/quick_start/data_sync/img/mysql_starrocks/success.png
b/docs/quick_start/data_sync/img/mysql_starrocks/success.png
new file mode 100644
index 0000000000..90e6d3d27d
Binary files /dev/null and
b/docs/quick_start/data_sync/img/mysql_starrocks/success.png differ
diff --git a/docs/quick_start/data_sync/mysql_starrocks_example.md
b/docs/quick_start/data_sync/mysql_starrocks_example.md
new file mode 100644
index 0000000000..710cbd74b7
--- /dev/null
+++ b/docs/quick_start/data_sync/mysql_starrocks_example.md
@@ -0,0 +1,122 @@
+---
+title: MySQL to StarRocks Example
+sidebar_position: 2
+---
+
+Here we use an example to introduce how to use Apache InLong creating `MySQL
-> StarRocks` data synchronization.
+
+## Deployment
+### Install InLong
+
+Before we begin, we need to install InLong. Here we provide two ways:
+- [Docker Deployment](deployment/docker.md) (Recommended)
+- [Bare Metal Deployment](deployment/bare_metal.md)
+
+### Add Connectors
+
+Download the [connectors](https://inlong.apache.org/downloads/) corresponding
to Flink 1.13, and after decompression, place
`sort-connector-starrocks-[version]-SNAPSHOT.jar` in `/inlong-sort/connectors/`
directory.
+
+### Install StarRocks
+Please refer to the [Installation
Tutorial](https://docs.starrocks.io/docs/quick_start/) on the Apache StarRocks
official website
+
+## Cluster Initialize
+When all containers are successfully started, you can access the InLong
dashboard address http://localhost, and use the following default account to
log in.
+```
+User: admin
+Password: inlong
+```
+
+### Create Cluster Tag
+Click [Clusters] -> [ClusterTags] -> [Create] on the page to specify the
cluster label name and responsible person.
+
+
+:::caution
+`default_cluster` is the default ClusterTags reported by each component. If
you decide to use a different name, make sure to update the corresponding tag
configuration accordingly.
+:::
+
+### Register Pulsar Cluster
+Click [Clusters] -> [Cluster] -> [Create] on the page to register Pulsar
Cluster.
+
+
+
+:::note
+The ClusterTags selects the newly created `default_cluster`, the Pulsar
cluster deployed by docker:
+
+Service URL is `pulsar://pulsar:6650`, Admin URL is `http://pulsar:8080`.
+:::
+
+### Register StarRocks DataNodes
+Click [DataNodes] -> [Create] on the page to register StarRocks DataNodes.
+
+
+:::note
+- Please do not fill in `http://` for LOAD URL, just fill in `IP:PORT`.
+:::
+
+## Create Task
+### Create Data Streams Group
+Click [Synchronization] → [Create] on the page and input the Group ID, Stream
ID and Full database migration:
+
+
+### Create Data Source
+In the data source, click [New] → [MySQL] to configure the source name,
address, databases and tables information.
+
+
+:::note
+- When the read mode is selected as `Full + Incremental`, the existing data in
the table will also be collected, but not in the `Incremental` mode.
+- The table white list format is `<dbName>.<tableName>` and supports regular
expressions.
+:::
+
+### Create Data Sink
+In the data sink, click [New] → [StarRocks] to configure the sink name,
database name, table name and created StarRocks data node.
+
+
+
+### Approve Data Stream
+Click [Approval] -> [MyApproval] -> [Approval] -> [Ok].
+
+
+
+Back to [Synchronization] page, wait for [success].
+
+
+
+## Test Data
+### Send Data
+```
+#!/bin/bash
+
+# MySQL info
+DB_HOST="mysql"
+DB_USER="root"
+DB_PASS="inlong"
+DB_NAME="test"
+DB_TABLE="source_table"
+
+# Insert data in a loop
+for ((i=1; i<=1000; i++))
+do
+ # Generate data
+ id=$i
+ name="name_$i"
+
+ # Build an insert SQL
+ query="INSERT INTO $DB_TABLE (id, name) VALUES ($id, '$name');"
+
+ # Execute insert SQL
+ mysql -h $DB_HOST -u $DB_USER -p$DB_PASS $DB_NAME -e "$query"
+done
+```
+
+Modify the variables in the script according to the actual environment, and
add a total of 1000 pieces of data to the `source_table`:
+
+
+
+### Verify Data
+Enter StarRocks, check data in `sink_table`.
+
+
+
+You can also view audit data on the page:
+
+
\ No newline at end of file
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/approve.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/approve.png
new file mode 100644
index 0000000000..7286890501
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/approve.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png
new file mode 100644
index 0000000000..553ac40ed8
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/audit_starrocks.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png
new file mode 100644
index 0000000000..aa4b45fdc8
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_cluster_tag.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_fields.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_fields.png
new file mode 100644
index 0000000000..ccf8320c9e
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_fields.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png
new file mode 100644
index 0000000000..11163509ff
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_group_stream.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
new file mode 100644
index 0000000000..fb75c178aa
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_pulsar_cluster.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_sink.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_sink.png
new file mode 100644
index 0000000000..10a0164c80
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_sink.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_source.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_source.png
new file mode 100644
index 0000000000..dc11cc2148
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_source.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
new file mode 100644
index 0000000000..22c0429bf1
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/create_starrocks_datanode.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_sink.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_sink.png
new file mode 100644
index 0000000000..bcb7b4eb89
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_sink.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_source.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_source.png
new file mode 100644
index 0000000000..f58943623c
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/result_source.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/success.png
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/success.png
new file mode 100644
index 0000000000..02ede01d21
Binary files /dev/null and
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/img/mysql_starrocks/success.png
differ
diff --git
a/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/mysql_starrocks_example.md
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/mysql_starrocks_example.md
new file mode 100644
index 0000000000..64b31a95bc
--- /dev/null
+++
b/i18n/zh-CN/docusaurus-plugin-content-docs/current/quick_start/data_sync/mysql_starrocks_example.md
@@ -0,0 +1,116 @@
+---
+title: MySQL 到 StarRocks 示例
+sidebar_position: 2
+---
+
+在下面的内容中,我们将通过一个完整的示例介绍如何使用 Apache InLong 创建 MySQL -> StarRocks 数据同步。
+
+## 环境部署
+### 安装 InLong
+
+在开始之前,我们需要安装 InLong 的全部组件,这里提供两种方式:
+- [Docker 部署](deployment/docker.md)(推荐)
+- [Bare Metal 部署](deployment/bare_metal.md)
+
+### 添加 Connectors
+
+下载 Flink 1.13 对应版本的
[connectors](https://inlong.apache.org/zh-CN/downloads),解压后将
`sort-connector-starrocks-[version]-SNAPSHOT.jar` 放在 `/inlong-sort/connectors/`
目录下。
+
+### 安装 StarRocks
+请参考 Apache StarRocks 官网的[安装教程](https://docs.starrocks.io/docs/quick_start/)。
+
+## 集群初始化
+容器启动成功后,访问 InLong Dashboard 地址 http://localhost,并使用以下默认账号登录:
+```
+User: admin
+Password: inlong
+```
+
+### 创建集群标签
+页面点击 【集群管理】->【标签管理】->【新建】,指定集群标签名称和负责人:
+
+
+**注:default_cluster 是各个组件默认上报集群标签,如果使用其它名称,确认对应标签配置已修改。**
+
+### 注册 Pulsar 集群
+页面点击 【集群管理】 -> 【集群管理】 -> 【新建集群】,注册 Pulsar 集群:
+
+
+:::note
+集群标签选择刚创建的 `default_cluster`,配置 Docker 部署的 Pulsar 集群:
+
+Service URL 为 `pulsar://pulsar:6650`, Admin URL 为 `http://pulsar:8080`.
+:::
+
+### 注册 StarRocks 数据节点
+页面点击 【数据节点】 -> 【创建】 ,新增 StarRocks 数据节点.
+
+
+:::note
+- LOAD URL 请勿携带 `http://`, 填写 IP + 端口即可。
+:::
+
+## 任务创建
+### 新建数据流组
+页面点击【数据同步】 → 【创建】,输入 Group ID、Steam ID 和 是否整库迁移:
+
+
+### 创建数据源
+数据源中点击 【新建】 → 【MySQL】 配置数据源名称、地址、库表信息等。
+
+
+:::note
+- 读取模式选择 `全量+增量` 时,表中的存量数据也会被采集,`仅增量` 模式则不会。
+- 表名白名单格式为 `<dbName>.<tableName>`,支持正则表达。
+:::
+
+### 创建数据目标
+数据目标中点击 【新建】 → 【StarRocks】,设置数据目标名称并选择创建好的 StarRocks 数据节点, 并填写库表名称。
+
+
+### 审批数据流
+点击 【审批管理】 -> 【我的审批】 -> 【审批】 -> 【通过】.
+
+
+返回【数据集成】,等待任务配置成功:
+
+
+## 测试数据
+### 发送数据
+```
+#!/bin/bash
+
+# MySQL info
+DB_HOST="mysql"
+DB_USER="root"
+DB_PASS="inlong"
+DB_NAME="test"
+DB_TABLE="source_table"
+
+# Insert data in a loop
+for ((i=1; i<=1000; i++))
+do
+ # Generate data
+ id=$i
+ name="name_$i"
+
+ # Build an insert SQL
+ query="INSERT INTO $DB_TABLE (id, name) VALUES ($id, '$name');"
+
+ # Execute insert SQL
+ mysql -h $DB_HOST -u $DB_USER -p$DB_PASS $DB_NAME -e "$query"
+done
+```
+
+根据实际环境修改脚本中的变量,执行脚本向 `source_table` 表中累计添加 1000 条数据:
+
+
+
+### 验证数据
+进入 StarRocks,查看 sink_table 表数据
+
+
+
+也可以在页面查看审计数据:
+
+
\ No newline at end of file