You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by li...@apache.org on 2018/05/30 10:37:22 UTC

[incubator-servicecomb-docs] branch master updated (42d66cd -> e16a491)

This is an automated email from the ASF dual-hosted git repository.

liubao pushed a change to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git.


    from 42d66cd  publishAddress配置网卡的时候,需要用括号
     new 0810c43  增加URLMappedEdgeDispatcher的文档说明
     new 43df12a  pathIndex修改为prefixSegmentCount
     new 2ebba71  拼写错误和描述增加
     new d66e21d  增加versionRule的描述
     new 4f91af3  解决表格显示不全的问题
     new e16a491  解决表格显示不全的问题CSS错误

The 6 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.


Summary of changes:
 .../zh_CN/edge/by-servicecomb-sdk.md               | 40 ++++++++++++++++++----
 java-chassis-reference/zh_CN/styles/website.css    |  5 +++
 2 files changed, 38 insertions(+), 7 deletions(-)
 create mode 100644 java-chassis-reference/zh_CN/styles/website.css

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 01/06: 增加URLMappedEdgeDispatcher的文档说明

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit 0810c430cd049ea16aa109abca201c464e6838e1
Author: liubao <ba...@huawei.com>
AuthorDate: Tue May 29 15:17:27 2018 +0800

    增加URLMappedEdgeDispatcher的文档说明
---
 .../zh_CN/edge/by-servicecomb-sdk.md               | 40 ++++++++++++++++++----
 1 file changed, 33 insertions(+), 7 deletions(-)

diff --git a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
index 816df59..1e32ce3 100644
--- a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
+++ b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
@@ -76,16 +76,16 @@ servicecomb:
           enabled: true
           prefix: rest
           withVersion: true
-          pathIndex: 2
+          pathIndex: 1
 ```
 
 常见的这些配置项的示例及含义如下:
-* [prefix=rest;withVersion=true;pathIndex=2]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=true;pathIndex=3]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=true;pathIndex=4]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=2]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求可能转发到任意微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=3]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,,请求可能转发到任意微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=3]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/abc,,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=true;pathIndex=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=true;pathIndex=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=true;pathIndex=3]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=false;pathIndex=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=false;pathIndex=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=false;pathIndex=2]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/abc,,请求可能转发到任意微服务实例。
 
 withVersion配置项提供了客户端灰度规则,可以让客户端指定访问的服务端版本。Edge Service还包含根据接口兼容性自动路由的功能,请求会转发到包含了该接口的实例。假设某微服务,兼容规划为所有高版本必须兼容低版本,部署了以下版本实例:
 
@@ -99,6 +99,32 @@ Edge Service在转发operation2时,会自动使用1.1.0+的规则来过滤实
 
 以上过程用户不必做任何干预,全自动完成,以避免将新版本的operation转发到旧版本的实例中去。
 
+### 使用URLMappedEdgeDispatcher
+URLMappedEdgeDispatcher运行用户配置URL和微服务的映射关系。使用它可以非常灵活的定义那些URL转发到哪些微服务。它包含如下几个配置项:
+```
+servicecomb:
+  http:
+    dispatcher:
+      edge:
+        url:
+          enabled: true
+          mappings:
+            businessV1:
+              pathIndex: 1
+              path: "/url/business/v1/.*"
+              microserviceName: business
+              versionRule: 1.0.0-2.0.0
+            businessV2:
+              pathIndex: 1
+              path: "/url/business/v2/.*"
+              microserviceName: business
+              versionRule: 2.0.0-3.0.0
+```
+
+businessV1配置项表示的含义是将请求路径为/usr/business/v1/.*的请求,转发到business这个微服务,并且只转发到版本号为1.0.0-2.0.0的实例(不含2.0.0)。转发的时候URL为/business/v1/.*。path使用的是JDK的正则表达式,可以查看Pattern类的说明。
+
+从上面的配置可以看出,URLMappedEdgeDispatcher也支持客户端灰度。当然配置项会比DefaultEdgeDispatcher多。URLMappedEdgeDispatcher支持通过配置中心动态的修改配置,调整路由规则。
+
 ### 自定义Dispatcher
 
 自定义Dispatcher包含两个步骤:

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 03/06: 拼写错误和描述增加

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit 2ebba71822cb3301f5ceb1f481dda8becfb8ad41
Author: liubao <ba...@huawei.com>
AuthorDate: Tue May 29 15:57:41 2018 +0800

    拼写错误和描述增加
---
 java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
index 96b3bd8..8ebbc80 100644
--- a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
+++ b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
@@ -100,7 +100,7 @@ Edge Service在转发operation2时,会自动使用1.1.0+的规则来过滤实
 以上过程用户不必做任何干预,全自动完成,以避免将新版本的operation转发到旧版本的实例中去。
 
 ### 使用URLMappedEdgeDispatcher
-URLMappedEdgeDispatcher运行用户配置URL和微服务的映射关系。使用它可以非常灵活的定义那些URL转发到哪些微服务。它包含如下几个配置项:
+URLMappedEdgeDispatcher允许用户配置URL和微服务的映射关系。使用它可以非常灵活的定义哪些URL转发到哪些微服务。它包含如下几个配置项:
 ```
 servicecomb:
   http:
@@ -121,7 +121,7 @@ servicecomb:
               versionRule: 2.0.0-3.0.0
 ```
 
-businessV1配置项表示的含义是将请求路径为/usr/business/v1/.*的请求,转发到business这个微服务,并且只转发到版本号为1.0.0-2.0.0的实例(不含2.0.0)。转发的时候URL为/business/v1/.*。path使用的是JDK的正则表达式,可以查看Pattern类的说明。
+businessV1配置项表示的含义是将请求路径为/usr/business/v1/.*的请求,转发到business这个微服务,并且只转发到版本号为1.0.0-2.0.0的实例(不含2.0.0)。转发的时候URL为/business/v1/.*。path使用的是JDK的正则表达式,可以查看Pattern类的说明。prefixSegmentCount表示前缀的URL Segment数量,前缀不包含在转发的URL路径中。
 
 从上面的配置可以看出,URLMappedEdgeDispatcher也支持客户端灰度。当然配置项会比DefaultEdgeDispatcher多。URLMappedEdgeDispatcher支持通过配置中心动态的修改配置,调整路由规则。
 

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 02/06: pathIndex修改为prefixSegmentCount

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit 43df12a4ec39339a9e801c9efe33f6734b678711
Author: liubao <ba...@huawei.com>
AuthorDate: Tue May 29 15:51:56 2018 +0800

    pathIndex修改为prefixSegmentCount
---
 .../zh_CN/edge/by-servicecomb-sdk.md                   | 18 +++++++++---------
 1 file changed, 9 insertions(+), 9 deletions(-)

diff --git a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
index 1e32ce3..96b3bd8 100644
--- a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
+++ b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
@@ -76,16 +76,16 @@ servicecomb:
           enabled: true
           prefix: rest
           withVersion: true
-          pathIndex: 1
+          prefixSegmentCount: 1
 ```
 
 常见的这些配置项的示例及含义如下:
-* [prefix=rest;withVersion=true;pathIndex=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=true;pathIndex=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=true;pathIndex=3]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求可能转发到任意微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,,请求可能转发到任意微服务实例。
-* [prefix=rest;withVersion=false;pathIndex=2]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/abc,,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=true;prefixSegmentCount=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=true;prefixSegmentCount=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=true;prefixSegmentCount=3]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/v1/abc,请求只转发到[1.0.0-2.0.0)版本的微服务实例。
+* [prefix=rest;withVersion=false;prefixSegmentCount=1]微服务xService提供的URL为: /xService/v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=false;prefixSegmentCount=2]微服务xService提供的URL为: /v1/abc,通过Edge访问的地址为/rest/xService/v1/abc,,请求可能转发到任意微服务实例。
+* [prefix=rest;withVersion=false;prefixSegmentCount=2]微服务xService提供的URL为: /abc,通过Edge访问的地址为/rest/xService/abc,,请求可能转发到任意微服务实例。
 
 withVersion配置项提供了客户端灰度规则,可以让客户端指定访问的服务端版本。Edge Service还包含根据接口兼容性自动路由的功能,请求会转发到包含了该接口的实例。假设某微服务,兼容规划为所有高版本必须兼容低版本,部署了以下版本实例:
 
@@ -110,12 +110,12 @@ servicecomb:
           enabled: true
           mappings:
             businessV1:
-              pathIndex: 1
+              prefixSegmentCount: 1
               path: "/url/business/v1/.*"
               microserviceName: business
               versionRule: 1.0.0-2.0.0
             businessV2:
-              pathIndex: 1
+              prefixSegmentCount: 1
               path: "/url/business/v2/.*"
               microserviceName: business
               versionRule: 2.0.0-3.0.0

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 06/06: 解决表格显示不全的问题CSS错误

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit e16a4910e941746acd699e4429c87932b9f9f5d5
Author: liubao <ba...@huawei.com>
AuthorDate: Wed May 30 18:36:32 2018 +0800

    解决表格显示不全的问题CSS错误
---
 java-chassis-reference/zh_CN/styles/website.css | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java-chassis-reference/zh_CN/styles/website.css b/java-chassis-reference/zh_CN/styles/website.css
index d837b95..815fe4b 100644
--- a/java-chassis-reference/zh_CN/styles/website.css
+++ b/java-chassis-reference/zh_CN/styles/website.css
@@ -1,4 +1,4 @@
-.markdown-section table {
+table {
     table-layout: fixed;
     display:block;
     overflow-x: auto;

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 05/06: 解决表格显示不全的问题

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit 4f91af3eb4599b44506f62a670ee15487b84e113
Author: liubao <ba...@huawei.com>
AuthorDate: Wed May 30 18:34:49 2018 +0800

    解决表格显示不全的问题
---
 java-chassis-reference/zh_CN/styles/website.css | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/java-chassis-reference/zh_CN/styles/website.css b/java-chassis-reference/zh_CN/styles/website.css
new file mode 100644
index 0000000..d837b95
--- /dev/null
+++ b/java-chassis-reference/zh_CN/styles/website.css
@@ -0,0 +1,5 @@
+.markdown-section table {
+    table-layout: fixed;
+    display:block;
+    overflow-x: auto;
+}
\ No newline at end of file

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.

[incubator-servicecomb-docs] 04/06: 增加versionRule的描述

Posted by li...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

liubao pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-servicecomb-docs.git

commit d66e21d77507be981c3dbd3947691093cf83841e
Author: liubao <ba...@huawei.com>
AuthorDate: Tue May 29 16:14:22 2018 +0800

    增加versionRule的描述
---
 java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
index 8ebbc80..bda6b16 100644
--- a/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
+++ b/java-chassis-reference/zh_CN/edge/by-servicecomb-sdk.md
@@ -121,7 +121,7 @@ servicecomb:
               versionRule: 2.0.0-3.0.0
 ```
 
-businessV1配置项表示的含义是将请求路径为/usr/business/v1/.*的请求,转发到business这个微服务,并且只转发到版本号为1.0.0-2.0.0的实例(不含2.0.0)。转发的时候URL为/business/v1/.*。path使用的是JDK的正则表达式,可以查看Pattern类的说明。prefixSegmentCount表示前缀的URL Segment数量,前缀不包含在转发的URL路径中。
+businessV1配置项表示的含义是将请求路径为/usr/business/v1/.*的请求,转发到business这个微服务,并且只转发到版本号为1.0.0-2.0.0的实例(不含2.0.0)。转发的时候URL为/business/v1/.*。path使用的是JDK的正则表达式,可以查看Pattern类的说明。prefixSegmentCount表示前缀的URL Segment数量,前缀不包含在转发的URL路径中。有三种形式的versionRule可以指定。2.0.0-3.0.0表示版本范围,含2.0.0,但不含3.0.0;2.0.0+表示大于2.0.0的版本,含2.0.0;2.0.0表示只转发到2.0.0版本。2,2.0等价于2.0.0。
 
 从上面的配置可以看出,URLMappedEdgeDispatcher也支持客户端灰度。当然配置项会比DefaultEdgeDispatcher多。URLMappedEdgeDispatcher支持通过配置中心动态的修改配置,调整路由规则。
 

-- 
To stop receiving notification emails like this one, please contact
liubao@apache.org.