Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
.project
/_build
*.DS_Store
Binary file added _static/data_image/start_step_1.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/data_image/start_step_2.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/data_image/start_step_3.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/data_image/start_step_4.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added _static/data_image/start_step_5.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
421 changes: 421 additions & 0 deletions data-subscription-guide/data_developer_guide.rst

Large diffs are not rendered by default.

74 changes: 74 additions & 0 deletions data-subscription-guide/data_user_guide.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
.. _data_user_guide:

数据订阅服务 入门指南
=======================

欢迎来到 数据订阅服务 入门指南。
这个指南的目的是指导你如何启动一个 数据订阅服务。在这个教程中,你将执行如下步骤:

- 步骤1:准备工作
- 步骤2:启动 数据订阅服务

准备工作
-----------
在你启动第一个 数据订阅服务 前,确保在这个章节中完成如下准备工作:

- 注册青云账号
- 设置 MySQL

注册青云账号
~~~~~~~~~~~~~~~
你首先需要注册一个青云账号,如果还没有的话。如果你已经拥有了一个青云账号,那么你可以使用这个号
进行接下来的操作,跳过这个步骤。

1. 打开链接\ `<http://qingcloud.com>`__\,点击注册。
2. 按照页面提示完成注册流程。

设置MySQL
~~~~~~~~~~~~
在 数据订阅服务 成功启动前,需要对你的 MySQL 服务器进行相应设置。

1. 日志模式必须被设置为采用 row-level binary logging 的模式。
2. 需要一个拥有 SELECT,RELOAD,SHOW DATABASES,REPLICATION SLAVE,REPLICATION CLIENT 权限的数据库用户。

启动 数据订阅服务
--------------------------------
完成上面的前提步骤后,现在你能够开始启动一个 数据订阅服务。

1. 打开青云 AppCenter 中的\ `数据订阅 <https://appcenter.qingcloud.com/apps/app-o511zoe9>`__\ 服务主页。
2. 点击部署到 QingCloud,你可以选择在哪个数据中心启动你的 数据订阅服务。在这个教程中,我们选择了北京3区。
3. 创建依赖资源:你需要有一个已连接到 VPC 的私有网络。如果您没有创建好依赖资源,点击创建后,可以按照提示完成下面的步骤:

- 创建私有网络:计算机与网络 -> 私有网络,点击创建
- 创建 VPC 网络:计算机与网络 -> VPC网络,点击创建
- 连接私有网络到 VPC 网络:计算机与网络 -> VPC网络,点击创建完成的VPC网络,将上面创建完成的私有网络添加到VPC中

4. 创建好私有网络后,就可以启动 数据订阅服务 了:

- 填写基本信息,选择服务版本

.. image:: ../_static/data_image/start_step_1.png

- 配置节点参数

.. image:: ../_static/data_image/start_step_2.png

- 选择之前创建的私有网络
- 选择依赖的 Kafka 服务
- 设置服务环境参数:必填项包括要同步的 MySQL 数据库ip地址,用户名,密码;选填项包括 MySQL Namespace,要同步的 MySQL 数据库的名字,和要同步的 MySQL 表的名字,其中:

- MySQL Namespace:用户自定义的 MySQL 数据库的逻辑名称,用来提供给被监控的 MySQL 数据库一个 namespace。这个 namespace 对每一个 数据订阅服务 应当是唯一的,因为它会作为这个 数据订阅服务 产生消息到 Kafka topic 中的 topic 前缀。默认值是该青云服务的集群id,但我们推荐用户填写一个合理且有意义的名字。
- 要同步的 MySQL 数据库的名字:即数据库的白名单,填写在这里的数据库会被监控。数据库的名字用逗号分隔,例如:demo1,demo2。错误的输入格式可能会导致服务错误。不指定数据库名等价于所有数据库都要被同步。
- 要同步的 MySQL 表的名字:即数据库表的白名单,填写在这里的表会被监控。表名用逗号分隔,例如:part1,part2。错误的输入格式可能会导致服务错误。不指定表名等价于所有表都要被同步。

.. image:: ../_static/data_image/start_step_3.png

5. 配置完以上参数,点击提交后,新的服务将会在几分钟之内启动完毕。下图是服务启动时的状态:

.. image:: ../_static/data_image/start_step_4.png

6. 在 AppCenter 控制面板中,选择新启动的服务并且查看服务状态信息。正确启动的服务,服务状态为正常,下方显示四个监控项。

.. image:: ../_static/data_image/start_step_5.png

完成以上步骤后,你已经成功启动了你的 数据订阅服务。
14 changes: 14 additions & 0 deletions data-subscription-guide/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
.. _data_subscription:

数据订阅服务
@@@@@@@@@@@@@@@@

数据订阅服务
=========================

.. toctree::
:numbered:
:maxdepth: 2

data_user_guide
data_developer_guide
1 change: 1 addition & 0 deletions index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,4 @@ HashData Warehouse 帮助文档
cluster-management-guide/cluster-management-guide
developer-guide/index
best-practices/index
data-subscription-guide/index