imlidian closed pull request #127:     update deploy logic and make  arc and 
setup-env docs migration
URL: https://github.com/apache/incubator-servicecomb-website/pull/127
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/_docs/servicecomb-arc.md b/_docs/servicecomb-arc.md
new file mode 100644
index 00000000..ae8cf2de
--- /dev/null
+++ b/_docs/servicecomb-arc.md
@@ -0,0 +1,36 @@
+---
+title: "Java Chassis系统架构"
+lang: cn
+ref: servicecomb-introduction
+permalink: /cn/docs/servicecomb-arc/
+excerpt: "Java Chassis系统架构"
+last_modified_at: 2017-06-14T10:01:43-04:00
+---
+
+{% include toc %}
+## 框架概述
+![ServiceComb Model](/assets/images/servicecomb-models.png){: .align-center}
+
+## 主要设计意图
+
+1.编程模型和通信模型分离,不同的编程模型可以灵活组合不同的通信模型。应用开发者在开发阶段只关注接口开发,部署阶段灵活切换通信方式;支持legacy系统的切换,legacy系统只需要修改服务发布的配置文件(或者annotation),而不需要修改代码。
+
+现阶段支持SpringMVC、JAX-RS和透明RPC三种开发方式。
+
+2.内建API-first支持。通过契约规范化微服务开发,实现跨语言的通信,并支持配套的软件工具链(契约生成代码、代码生成契约等)开发,构建完整的开发生态。
+
+3.定义了常用的微服务运行模型,将微服务从发现到交互过程中的各种容错手段都封装起来。该运行模型支持自定义和扩展。
+
+## 模块说明
+
+| 类型 | artifact id | 是否可选 | 功能说明 |
+| :--- | :--- | :--- | :--- |
+| 编程模型 | provider-pojo | 是 | 提供RPC开发模式 |
+| 编程模型 | provider-jaxrs | 是 | 提供JAX RS开发模式 |
+| 编程模型 | provider-springmvc | 是 | 提供Spring MVC开发模式 |
+| 通信模型 | transport-rest-vertx | 是 | 运行于HTTP之上的开发框架,不依赖WEB容器,应用打包为可执行jar |
+| 通信模型 | transport-rest-servlet | 是 | 运行于WEB容器的开发框架,应用打包为war包 |
+| 通信模型 | transport-highway | 是 | 提供高性能的私有通信协议,仅用于java之间互通。 |
+| 运行模型 | handler-loadbalance | 是 | 负载均衡模块。提供各种路由策略和配置方法。一般客户端使用。 |
+| 运行模型 | handler-bizkeeper | 是 | 和服务治理相关的功能,比如隔离、熔断、容错。 |
+| 运行模型 | handler-tracing | 是 | 调用链跟踪模块,对接监控系统,吐出打点数据。 |
diff --git a/_docs/setup-environment.md b/_docs/setup-environment.md
new file mode 100644
index 00000000..72654de2
--- /dev/null
+++ b/_docs/setup-environment.md
@@ -0,0 +1,191 @@
+---
+title: "环境配置"
+lang: cn
+ref: setup-environment
+permalink: /cn/docs/setup-environment/
+excerpt: "环境配置"
+last_modified_at: 2018-04-13T10:01:43-04:00
+---
+
+{% include toc %}
+
+## 安装Java开发环境
+
+* 
安装git,详情可参考[git安装教程](https://git-scm.com/book/zh/v2/%E8%B5%B7%E6%AD%A5-%E5%AE%89%E8%A3%85-Git)
+
+* 安装JDK 
1.8,详情可参考[JDK安装教程](https://docs.oracle.com/javase/8/docs/technotes/guides/install/install_overview.html){:target="_blank"}。
+
+* 安装Maven 
3.x,详情可参考[Maven安装教程](https://maven.apache.org/install.html){:target="_blank"}。
+
+* 安装IntelliJ Idea 
IDE,详情可参考[IntelliJ安装教程](https://www.jetbrains.com/help/idea/installing-and-launching.html){:target="_blank"}。
+
+## 运行 Service Center
+### 运行 Stand-alone Service Center
+运行Stand-alone Service Center有以下两种方式:
+
+1. 以可执行文件的方式运行
+
+   <ul class="nav nav-tabs">
+     <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-m2/apache-servicecomb-incubating-service-center-1.0.0-m2-windows-amd64.tar.gz)
+   2. 解压缩到当前文件夹
+   3. 进入解压缩后的目录,然后双击运行**start-service-center.bat**文件
+     </div>
+     <div id="linux" class="tab-pane fade" markdown="1">
+   1. 下载服务注册中心可执行文件压缩包并解压缩
+   ```bash
+   wget 
http://apache.org/dyn/closer.cgi/incubator/servicecomb/incubator-servicecomb-service-center/1.0.0-m2/apache-servicecomb-incubating-service-center-1.0.0-m2-linux-amd64.tar.gz
+   tar xvf 
apache-servicecomb-incubating-service-center-1.0.0-m2-linux-amd64.tar.gz
+   ```
+   2. 运行服务注册中心
+   ```bash
+   bash 
apache-servicecomb-incubating-service-center-1.0.0-m2-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即可。
+    {: .notice--warning}
+  
+    </div>
+   </div>
+
+   注意:Window和Linux版本均只支持64位系统。
+   {: .notice--warning}
+
+2. 以Docker的方式运行
+
+```bash
+docker pull servicecomb/service-center
+docker run -d -p 30100:30100 servicecomb/service-center:latest
+```
+
+**注意事项:** 服务注册中心运行后绑定的IP为:*http://127.0.0.1:30100*。  
+如使用Docker Toolbox,可通过 `docker-machine ip` 获取服务绑定IP地址。
+{: .notice--warning}
+
+### 运行 Service Center 集群
+Service Center是一个无状态的应用因此它很容易以集群的模式部署提供HA。
+
+它依赖[etcd](https://github.com/coreos/etcd)存储微服务的信息,etcd既支持standalone模式运行也支持[集群模式](https://coreos.com/etcd/docs/latest/op-guide/clustering.html)运行。
+
+提示:我们强烈推荐etcd以集群模式运行,这样才能从整体上保证Service 
Center的HA能力;另外在这篇[文档](https://coreos.com/etcd/docs/latest/op-guide/runtime-configuration.html)中我们可以了解到etcd需要部署至少三个节点才能够避免Majority
 Failure。
+
+
+部署了standalone或集群etcd后,你可以按下面的步骤部署Service Center集群,我们以在两台VM上各部署一个Service 
Center实例为例:
+
+| Name    | Address     |
+| :-----: | :---------: |
+| VM1     | 10.12.0.1   |
+| VM2     | 10.12.0.2   |
+
+我们假定你的etcd运行在http://10.12.0.4:2379 上:
+
+##### 第一步
+在所有的VM上从[ServiceComb官网](https://github.com/apache/incubator-servicecomb-service-center/releases)下载最新版本的Service
 Center并解压:
+
+```bash
+tar -xvf service-center-X.X.X-linux-amd64.tar.gz
+```
+
+提示:请不要按stand-alone提示的方式执行start-service-center.sh,因为这样会启动内置的etcd。
+
+##### 第二步
+编辑ServcieComb的配置文件,修改ip/port以及etcd地址:
+###### VM1
+```bash
+vi conf/app.conf
+```
+
+修改下面的配置 :
+```text
+httpaddr = 10.12.0.1
+manager_cluster = "10.12.0.4:2379"
+```
+
+然后启动Service Center :
+```bash
+./service-center
+```
+
+###### VM2
+```bash
+vi conf/app.conf
+```
+
+修改下面的配置 :
+```text
+httpaddr = 10.12.0.2
+manager_cluster = "10.12.0.4:2379"
+```
+
+然后启动Service Center :
+```bash
+./service-center
+```
+
+提示:在`manger_cluster`配置中你可以填写多个在etcd群集中的etcd实例地址:
+```
+manager_cluster= "10.12.0.4:2379,10.12.0.X:2379,10.12.0.X:2379"
+```
+
+##### 第三步
+验证你部署完毕的Service Center实例 :
+```bash
+curl http://10.12.0.1:30101/v4/default/registry/health
+```
+将会返回下面的内容 :
+```json
+{
+    "instances": [
+        {
+            "instanceId": "d6e9e976f9df11e7a72b286ed488ff9f",
+            "serviceId": "d6e99f4cf9df11e7a72b286ed488ff9f",
+            "endpoints": [
+                "rest://10.12.0.1:30100"
+            ],
+            "hostName": "service_center_10_12_0_1",
+            "status": "UP",
+            "healthCheck": {
+                "mode": "push",
+                "interval": 30,
+                "times": 3
+            },
+            "timestamp": "1516012543",
+            "modTimestamp": "1516012543"
+        },
+        {
+            "instanceId": "16d4cb35f9e011e7a58a286ed488ff9f",
+            "serviceId": "d6e99f4cf9df11e7a72b286ed488ff9f",
+            "endpoints": [
+                "rest://10.12.0.2:30100"
+            ],
+            "hostName": "service_center_10_12_0_2",
+            "status": "UP",
+            "healthCheck": {
+                "mode": "push",
+                "interval": 30,
+                "times": 3
+            },
+            "timestamp": "1516012650",
+            "modTimestamp": "1516012650"
+        }
+    ]
+}
+```
+
+
+我们可以看到Service Center能够自动发现所有正在集群中运行的实例,[Java-Chassis 
SDK](https://github.com/apache/incubator-servicecomb-java-chassis)将使用这个特性至少找到一个Service
 Center实例。
+
+在你的microservice.yaml中你可以填写一个或多个Service Center实例,如果[Java-Chassis 
SDK](https://github.com/apache/incubator-servicecomb-java-chassis)发现配置的第一个地址(实例)失败,它将会自动使用下一个地址(实例):
+```yaml
+servicecomb:
+  service:
+    registry:
+      address: "http://10.12.0.1:30100,http://10.12.0.2:30100";
+      autodiscovery: true
+```
+上面的例子里包含了我们已经配置好的两个Service Center实例。
diff --git a/_users/cn/servicecomb-introduction.md 
b/_users/cn/servicecomb-introduction.md
index aff74ba8..4670f44e 100644
--- a/_users/cn/servicecomb-introduction.md
+++ b/_users/cn/servicecomb-introduction.md
@@ -1,38 +1,21 @@
 ---
-title: "Java Chassis系统架构"
+title: "用户手册"
 lang: cn
 ref: servicecomb-introduction
 permalink: /cn/users/
-excerpt: "Java Chassis系统架构"
+excerpt: "用户手册"
 last_modified_at: 2017-06-14T10:01:43-04:00
 redirect_from:
   - /theme-setup/
 ---
 
 {% include toc %}
-## 框架概述
-![ServiceComb Model](/assets/images/servicecomb-models.png){: .align-center}
 
-## 主要设计意图
+## [Java Chassis](/users/servicecomb-java-chassis-doc/zh_CN/){:target="_blank"}
+• ⾼性能的微服务框架,提供服务注册发现以及动态配置管理,以及限流降级,容错熔 断等服务治理功能  
+## [Service 
Center](https://github.com/apache/incubator-servicecomb-service-center){:target="_blank"}
  
+• 基于Etcd⾼性能,⾼可⽤服务注册中⼼  
 
-1.编程模型和通信模型分离,不同的编程模型可以灵活组合不同的通信模型。应用开发者在开发阶段只关注接口开发,部署阶段灵活切换通信方式;支持legacy系统的切换,legacy系统只需要修改服务发布的配置文件(或者annotation),而不需要修改代码。
-
-现阶段支持SpringMVC、JAX-RS和透明RPC三种开发方式。
-
-2.内建API-first支持。通过契约规范化微服务开发,实现跨语言的通信,并支持配套的软件工具链(契约生成代码、代码生成契约等)开发,构建完整的开发生态。
-
-3.定义了常用的微服务运行模型,将微服务从发现到交互过程中的各种容错手段都封装起来。该运行模型支持自定义和扩展。
-
-## 模块说明
-
-| 类型 | artifact id | 是否可选 | 功能说明 |
-| :--- | :--- | :--- | :--- |
-| 编程模型 | provider-pojo | 是 | 提供RPC开发模式 |
-| 编程模型 | provider-jaxrs | 是 | 提供JAX RS开发模式 |
-| 编程模型 | provider-springmvc | 是 | 提供Spring MVC开发模式 |
-| 通信模型 | transport-rest-vertx | 是 | 运行于HTTP之上的开发框架,不依赖WEB容器,应用打包为可执行jar |
-| 通信模型 | transport-rest-servlet | 是 | 运行于WEB容器的开发框架,应用打包为war包 |
-| 通信模型 | transport-highway | 是 | 提供高性能的私有通信协议,仅用于java之间互通。 |
-| 运行模型 | handler-loadbalance | 是 | 负载均衡模块。提供各种路由策略和配置方法。一般客户端使用。 |
-| 运行模型 | handler-bizkeeper | 是 | 和服务治理相关的功能,比如隔离、熔断、容错。 |
-| 运行模型 | handler-tracing | 是 | 调用链跟踪模块,对接监控系统,吐出打点数据。 |
+## 
[Saga](https://github.com/apache/incubator-servicecomb-saga){:target="_blank"}  
+• 微服务事务最终⼀致性问题解决⽅案  
+• 提供⼀个集中式的事务协调器,协调微服务之间的事务调⽤,保证事务最终⼀致性  
\ No newline at end of file
diff --git a/script/deploy b/script/deploy
index 990e1b7c..866a9459 100755
--- a/script/deploy
+++ b/script/deploy
@@ -1,10 +1,9 @@
 #!/bin/bash
 
-
-git clone https://github.com/apache/incubator-servicecomb-docs.git
-
-gitbook build incubator-servicecomb-docs/java-chassis-reference 
users/servicecomb-java-chassis-doc
- 
-bundle exec jekyll build --config _config.yml
-
-bundle exec jekyll server --port 4000 --host 
+script_dir=$(cd `dirname $0`; pwd)
+echo cru$script_dir
+base_dir=`dirname ${script_dir}`
+echo build $base_dir
+cd ${base_dir}
+sudo bundle exec jekyll build --config _config.yml
+sudo bundle exec jekyll server --port 4000 --host 


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services

Reply via email to