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/08/30 11:28:05 UTC

[incubator-servicecomb-docs] branch master updated (248d1fa -> c4ef17e)

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 248d1fa  update java-chassis-reference/en_US/edge/zuul.md
     new a6d8a9f  change instance_description to service_description
     new c4ef17e  change instance_description to service_description

The 2 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:
 java-chassis-reference/en_US/assets/env.PNG        | Bin 28965 -> 17087 bytes
 .../general-development/local-develop-test.md      |  32 +++++++++---------
 java-chassis-reference/zh_CN/assets/env.PNG        | Bin 28965 -> 17087 bytes
 .../general-development/local-develop-test.md      |  36 ++++++++++-----------
 4 files changed, 34 insertions(+), 34 deletions(-)


[incubator-servicecomb-docs] 01/02: change instance_description to service_description

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 a6d8a9f5a83b2f67055dd15aa9261d15af8c99d8
Author: weichao666 <we...@huawei.com>
AuthorDate: Thu Aug 30 14:35:54 2018 +0800

    change instance_description to service_description
---
 java-chassis-reference/zh_CN/assets/env.PNG        | Bin 28965 -> 17087 bytes
 .../general-development/local-develop-test.md      |  36 ++++++++++-----------
 2 files changed, 18 insertions(+), 18 deletions(-)

diff --git a/java-chassis-reference/zh_CN/assets/env.PNG b/java-chassis-reference/zh_CN/assets/env.PNG
index 1e1b2c4..60977c6 100644
Binary files a/java-chassis-reference/zh_CN/assets/env.PNG and b/java-chassis-reference/zh_CN/assets/env.PNG differ
diff --git a/java-chassis-reference/zh_CN/general-development/local-develop-test.md b/java-chassis-reference/zh_CN/general-development/local-develop-test.md
index e38f946..bda27ca 100644
--- a/java-chassis-reference/zh_CN/general-development/local-develop-test.md
+++ b/java-chassis-reference/zh_CN/general-development/local-develop-test.md
@@ -21,7 +21,7 @@
      <li data-toggle="tab" class="active"><a data-toggle="tab" href="#windows">Windows</a></li>
      <li data-toggle="tab"><a data-toggle="tab" href="#linux">Linux</a></li>
    </ul>
-   
+
    <div class="tab-content">
      <div id="windows" class="tab-pane active" markdown="1">
    1. 下载[服务注册中心可执行文件压缩包](http://apache.org/dyn/closer.cgi/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0-m1/apache-servicecomb-incubating-service-center-1.0.0-m1-windows-amd64.tar.gz)
@@ -38,9 +38,9 @@
    ```bash
    bash apache-servicecomb-incubating-service-center-1.0.0-m1-linux-amd64/start-service-center.sh
    ```
-   
+
     注意:前端(frontend)在Linux环境下默认会绑定ipv6地址,导致浏览器报错,修复办法为:先修改conf/app.conf中的httpaddr为外部可达网卡ip,之后修改app/appList/apiList.js中`ip : 'http://127.0.0.1'`为对应ip,最后重启ServiceCenter即可。
-  
+
     </div>
    </div>
 
@@ -48,21 +48,21 @@
 
 2. 以Docker的方式运行
 
-```bash
+ ```bash
 docker pull servicecomb/service-center
 docker run -d -p 30100:30100 servicecomb/service-center:latest
-```
+ ```
 
 * **步骤 2 **启动本地服务中心后,在服务提供/消费者的microservice.yaml文件中配置ServerCenter的地址和端口,示例代码:
 
-```yaml
+ ```yaml
 servicecomb:
   service:
     registry:
       address:
         # 服务中心地址及端口
         http://127.0.0.1:30100
-```
+ ```
 
 * **步骤 3 **开发服务提供/消费者,启动微服务进行本地测试。
 
@@ -82,9 +82,9 @@ producer端仍然像“进程内调用”一样声明即可
 同样,因为Mock不能跨进程,consumer也无法动态取得producer的契约信息,所以,需要在本地提供契约文件
 (这个场景,使用Mock服务中心,比使用standalone的服务中心,成本高得多得多,不建议使用)
 
-* **步骤 1**新建本地服务中心定义文件,假设名字为registry.yaml,内容示例如下:
+* **步骤 1 **新建本地服务中心定义文件,假设名字为registry.yaml,内容示例如下:
 
-```yaml
+ ```yaml
 localserv:
   - id: "100"
     version: "0.0.1"
@@ -95,11 +95,11 @@ localserv:
       - endpoints:
         - rest://localhost:8080
         - highway://localhost:7070
-```
-* **步骤 2**consumer本地部署契约文件
+ ```
+* **步骤 2 **consumer本地部署契约文件
 
-参考:[定义服务契约](https://huaweicse.github.io/servicecomb-java-chassis-doc/zh_CN/build-provider/define-contract.html)
-* **步骤 3**在consumer main函数,启动ServiceComb引擎之前声明:
+ 参考:[定义服务契约](https://huaweicse.github.io/servicecomb-java-chassis-doc/zh_CN/build-provider/define-contract.html)
+* **步骤 3 **在consumer main函数,启动ServiceComb引擎之前声明:
 
 ```java
   System.setProperty("local.registry.file", "/path/registry.yaml");
@@ -110,14 +110,14 @@ setProperty第二个参数填写registry.yaml在磁盘中的系统绝对路径
 
 ## 通过设置环境信息方便本地调试
 java chassis在设计时,严格依赖于契约,所以正常来说契约变了就必须要修改微服务的版本。但是如果当前还是开发模式,那么修改接口是很正常的情况,每次都需要改版本的话,对用户来说非常的不友好,所以增加了一个环境设置。如果微服务配置成开发环境,接口修改了(schema发生了变化),重启就可以注册到服务中心,而不用修改版本号。但是如果有consumer已经调用了重启之前的服务,那么consumer端需要重启才能获取最新的schema。比如A -> B,B接口进行了修改并且重启,那么A这个时候还是使用B老的schema,调用可能会出错,以免出现未知异常,A也需要重启。有三种方式可以设置,推荐使用方法1
-* 方法1:通过JVM启动参数**-Dinstance_description.environment=development**进行设置
+* 方法1:通过JVM启动参数**-Dservice_description.environment=development**进行设置
 
 * 方法2:通过microservice.yaml配置文件来指定
 
-```yaml
-instance_description:
+ ```yaml
+service_description:
   environment: development
-```
+ ```
 
-* 方法3:通过环境变量来指定(仅限于Windowns系统),比如在Eclipse下面进行如下设置
+* 方法3:通过环境变量来指定(仅限于Windows系统),比如在Eclipse下面进行如下设置
 ![](/assets/env.PNG)


[incubator-servicecomb-docs] 02/02: change instance_description to service_description

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 c4ef17e776a28aeb581c53278c950a16c3e219ca
Author: weichao666 <we...@huawei.com>
AuthorDate: Thu Aug 30 14:35:54 2018 +0800

    change instance_description to service_description
---
 java-chassis-reference/en_US/assets/env.PNG        | Bin 28965 -> 17087 bytes
 .../general-development/local-develop-test.md      |  32 ++++++++++-----------
 2 files changed, 16 insertions(+), 16 deletions(-)

diff --git a/java-chassis-reference/en_US/assets/env.PNG b/java-chassis-reference/en_US/assets/env.PNG
index 1e1b2c4..60977c6 100644
Binary files a/java-chassis-reference/en_US/assets/env.PNG and b/java-chassis-reference/en_US/assets/env.PNG differ
diff --git a/java-chassis-reference/en_US/general-development/local-develop-test.md b/java-chassis-reference/en_US/general-development/local-develop-test.md
index eee5812..c66349b 100644
--- a/java-chassis-reference/en_US/general-development/local-develop-test.md
+++ b/java-chassis-reference/en_US/general-development/local-develop-test.md
@@ -7,13 +7,13 @@ This section describes how developers can locally develop and commission consume
 
 * Starting Local Service Center [Mock mechanism](#section960893593759)。
 
-### Local debugging by setting up environmental information 
+### Local debugging by setting up environmental information
 
 Service center is an important component in the microservice architecture, and is used for managing, registering, and detecting metadata and instance metadata. The logic relationship between the service center and microservice provider/consumer is as follows:![](../assets/images/local_develop_test_en.png)
 
 ## Starting Local ServiceCenter
 
-* **Step 1** Starting local service center 
+* **Step 1** Starting local service center
 
 1. run in executable files  
 
@@ -21,13 +21,13 @@ Service center is an important component in the microservice architecture, and i
      <li data-toggle="tab" class="active"><a data-toggle="tab" href="#windows">Windows</a></li>
      <li data-toggle="tab"><a data-toggle="tab" href="#linux">Linux</a></li>
    </ul>
-   
+
    <div class="tab-content">
      <div id="windows" class="tab-pane active" markdown="1">
     (1) Download the [Service Registry Executable Compressor] (http://apache.org/dyn/closer.cgi/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0-m1/apache-servicecomb- Incubating-service-center-1.0.0-m1-windows-amd64.tar.gz)  
     (2) Extract to the current folder  
     (3) Go to the unzipped directory and double-click to run the **start-service-center.bat** file.  
-  
+
       </div>
       <div id="linux" class="tab-pane fade" markdown="1">
     1) Download the Service Registry executable file archive and extract it  
@@ -49,21 +49,21 @@ Service center is an important component in the microservice architecture, and i
 
 2. Run as Docker  
 
-```bash
+ ```bash
 Docker pull servicecomb/service-center
 Docker run -d -p 30100:30100 servicecomb/service-center:latest
-```
+ ```
 
 * **Step 2 ** After starting the local service center, configure the ServerCenter address and port in the service provider/consumer's microservice.yaml file. Example code:
 
-```yaml
+ ```yaml
 Servicecomb:
   Service:
     Registry:
       Address:
         #Service Center address and port
         Http://127.0.0.1:30100
-```
+ ```
 
 * **Step 3 **Development service provider/consumer, launch microservices for local testing.
 
@@ -87,7 +87,7 @@ Similarly, because the Mock cannot cross processes, the consumer cannot dynamica
 
 * **Step 1** Create a new local service center definition file, assuming the name is registry.yaml, the content example is as follows:
 
-```yaml
+ ```yaml
 localserv:
   - id: "100"
     version: "0.0.1"
@@ -98,15 +98,15 @@ localserv:
       - endpoints:
         - rest://localhost:8080
         - highway://localhost:7070
-```
+ ```
 * **Step 2**consumer local deployment contract file
 
-Reference: [Define Service Contract] (https://docs.servicecomb.io/java-chassis/zh_CN/build-provider/define-contract.html)
+ Reference: [Define Service Contract] (https://docs.servicecomb.io/java-chassis/zh_CN/build-provider/define-contract.html)
 * **Step 3** In the consumer main function, declare the ServiceComb engine before starting:
 
-```java
+ ```java
   System.setProperty("local.registry.file", "/path/registry.yaml");
-```
+ ```
 
 The second parameter of setProperty fills in the absolute path of the registry.yaml system on the disk, pay attention to distinguish the corresponding path separator in different systems.
 
@@ -117,14 +117,14 @@ If you need to change the version every time, it is very unfriendly to the user,
 However, if  consumer client has already called the service before the restart, the consumer client needs to be restarted to get the latest schema. For example, A -> B, B interface has been modified and restarted, then A is still using B last schema at this time, the call may be wrong, so as to avoid unknown exceptions, A also needs to restart. There are three ways to set it up, Recommended method 1  
 
 * Method 1: Set by the JVM startup parameter   
-**-Dinstance_description.environment=development**
+**-Dservice_description.environment=development**
 
 * Method 2: Specify by microservice.yaml configuration file
 
 ```yaml
-instance_description:
+service_description:
   environment: development
 ```
 
-* Method 3: Specify by environment variable (only for Windowns system), such as the following settings under Eclipse
+* Method 3: Specify by environment variable (only for Windows system), such as the following settings under Eclipse
 ![](../assets/env.PNG)