提交 8c00386d 编写于 作者: T terrymanu

update sharding-scaling-quick-start

上级 da598b11
+++
pre = "<b>2.3. </b>"
title = "Sharding-Scaling(Alpha)"
title = "ShardingSphere-Scaling(Alpha)"
weight = 3
+++
......@@ -8,7 +8,7 @@ weight = 3
### 部署启动
#### 1. 执行以下命令,编译生成sharding-scaling二进制包:
#### 1. 执行以下命令,编译生成ShardingSphere-Scaling二进制包:
```
......@@ -17,7 +17,7 @@ cd shardingsphere;
mvn clean install -Prelease;
```
发布包所在目录为:`/sharding-distribution/sharding-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-sharding-scaling-bin.tar.gz`
发布包所在目录为:`/shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz`
#### 2. 解压缩发布包,修改配置文件`conf/server.yaml`,这里主要修改启动端口,保证不与本机其他端口冲突,其他值保持默认即可:
......@@ -28,21 +28,22 @@ pushTimeout: 1000
workerThread: 30
```
#### 3. 启动sharding-scaling:
#### 3. 启动ShardingSphere-Scaling:
```
sh bin/start.sh
```
**注意**
如果后端连接MySQL数据库,需要下载[MySQL Connector/J](https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.47.tar.gz)
解压缩后,将mysql-connector-java-5.1.47.jar拷贝到${sharding-scaling}\lib目录。
解压缩后,将mysql-connector-java-5.1.47.jar拷贝到${shardingsphere-scaling}\lib目录。
#### 4. 查看日志`logs/stdout.log`,确保启动成功。
### 创建迁移任务
Sharding-Scaling提供相应的HTTP接口来管理迁移任务,部署启动成功后,我们可以调用相应的接口来启动迁移任务。
ShardingSphere-Scaling提供相应的HTTP接口来管理迁移任务,部署启动成功后,我们可以调用相应的接口来启动迁移任务。
创建迁移任务:
......@@ -69,7 +70,7 @@ curl -X POST \
注意:上述需要修改`ruleConfiguration.sourceDatasource``ruleConfiguration.sourceRule`,分别为源端ShardingSphere数据源和数据表规则相关配置;
以及`ruleConfiguration.destinationDataSources`中目标端sharding-proxy的相关信息。
以及`ruleConfiguration.destinationDataSources`中目标端ShardingSphere-Proxy的相关信息。
返回如下信息,表示任务创建成功:
......@@ -82,7 +83,7 @@ curl -X POST \
}
```
需要注意的是,目前Sharding-Scaling任务创建成功后,便会自动运行,进行数据的迁移。
需要注意的是,目前ShardingSphere-Scaling任务创建成功后,便会自动运行,进行数据的迁移。
### 查询任务进度
......@@ -193,7 +194,7 @@ curl -X POST \
}
```
### 结束Sharding-Scaling
### 结束ShardingSphere-Scaling
```
sh bin/stop.sh
......
+++
pre = "<b>2.3. </b>"
title = "Sharding-Scaling(Alpha)"
title = "ShardingSphere-Scaling(Alpha)"
weight = 3
+++
......@@ -8,7 +8,7 @@ weight = 3
### Deployment
#### 1. Execute the following command to compile and generate the sharding-scaling binary package:
#### 1. Execute the following command to compile and generate the shardingsphere-scaling binary package:
```
git clone https://github.com/apache/shardingsphere.git;
......@@ -16,7 +16,7 @@ cd shardingsphere;
mvn clean install -Prelease;
```
The binary package's directory is:`/sharding-distribution/sharding-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-sharding-scaling-bin.tar.gz`
The binary package's directory is:`/shardingsphere-distribution/shardingsphere-scaling-distribution/target/apache-shardingsphere-${latest.release.version}-shardingsphere-scaling-bin.tar.gz`
#### 2. Unzip the distribution package, modify the configuration file `conf/server.yaml`, we should ensure the port does not conflict with others, and other values can be left as default:
......@@ -27,21 +27,22 @@ pushTimeout: 1000
workerThread: 30
```
#### 3. start up sharding-scaling:
#### 3. start up ShardingSphere-Scaling:
```
sh bin/start.sh
```
**Attention**:
If the backend database is MySQL, download [MySQL Connector/J](https://cdn.mysql.com//Downloads/Connector-J/mysql-connector-java-5.1.47.tar.gz)
and decompress, then copy mysql-connector-java-5.1.47.jar to ${sharding-scaling}\lib directory.
and decompress, then copy mysql-connector-java-5.1.47.jar to ${shardingsphere-scaling}\lib directory.
#### 4. See the log file `logs/stdout.log`,ensure successful startup.
### Start scaling job
Sharding-Scaling provides a corresponding HTTP interface to manage the migration jobs. We can invoke the appropriate interface to start the migration job.
ShardingSphere-Scaling provides a corresponding HTTP interface to manage the migration jobs. We can invoke the appropriate interface to start the migration job.
Start scaling job:
......@@ -68,7 +69,7 @@ curl -X POST \
Note: The `ruleConfiguration.sourceDatasource` and `ruleConfiguration.sourceRule` should be changed to source's ShardingSphere's datasource and table rule.
What's more, the `ruleConfiguration.destinationDataSources` should be changed to destination's sharding-proxy.
What's more, the `ruleConfiguration.destinationDataSources` should be changed to destination's ShardingSphere-Proxy.
The following information is returned, indicating that the job was successfully created:
......@@ -81,7 +82,7 @@ The following information is returned, indicating that the job was successfully
}
```
It should be noted that, after the Sharding-Scaling's job is successfully created, it will automatically run.
It should be noted that, after the ShardingSphere-Scaling's job is successfully created, it will automatically run.
### Get scaling progress
......@@ -192,7 +193,7 @@ Response:
}
```
### Shutdown Sharding-Scaling
### Shutdown ShardingSphere-Scaling
```
sh bin/stop.sh
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册