You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ti...@apache.org on 2019/08/19 02:28:01 UTC

[servicecomb-mesher] branch master updated: Edit quick start example. (#63)

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

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


The following commit(s) were added to refs/heads/master by this push:
     new 2d3d7fa  Edit quick start example. (#63)
2d3d7fa is described below

commit 2d3d7fa8dfba1526e36f1ef3be0b8cbd36b702d7
Author: surechen <81...@qq.com>
AuthorDate: Mon Aug 19 10:27:57 2019 +0800

    Edit quick start example. (#63)
    
    Signed-off-by: surechen <ch...@huawei.com>
---
 .../httpserver-gateway/httpservergateway.go        | 96 ----------------------
 examples/quick_start/httpserver/httpserver.go      | 87 --------------------
 .../httpserver_calculator.py}                      |  4 +
 .../httpserver_webapp/httpserver_webapp.js         | 61 ++++++++++++++
 .../static}/index.html                             |  2 +-
 .../conf/auth.yaml                                 |  0
 .../conf/chassis.yaml                              |  4 +-
 .../conf/egress.yaml                               |  0
 .../conf/fault.yaml                                |  0
 .../conf/lager.yaml                                |  0
 .../conf/mesher.yaml                               |  0
 .../conf/microservice.yaml                         |  2 +-
 .../conf/router.yaml                               |  0
 .../{mersher-b => mersher_webapp}/conf/auth.yaml   |  0
 .../conf/chassis.yaml                              |  2 +-
 .../{mersher-b => mersher_webapp}/conf/egress.yaml |  0
 .../{mersher-b => mersher_webapp}/conf/fault.yaml  |  0
 .../{mersher-b => mersher_webapp}/conf/lager.yaml  |  0
 .../{mersher-b => mersher_webapp}/conf/mesher.yaml |  0
 .../conf/microservice.yaml                         |  2 +-
 .../{mersher-g => mersher_webapp}/conf/router.yaml |  6 +-
 .../httpserver_calculator.py}                      |  8 +-
 .../mersher_calculator}/conf/auth.yaml             |  0
 .../mersher_calculator}/conf/chassis.yaml          |  0
 .../mersher_calculator}/conf/egress.yaml           |  0
 .../mersher_calculator}/conf/fault.yaml            |  0
 .../mersher_calculator}/conf/lager.yaml            |  0
 .../mersher_calculator}/conf/mesher.yaml           |  0
 .../mersher_calculator}/conf/microservice.yaml     |  2 +-
 .../mersher_calculator}/conf/router.yaml           |  0
 examples/quick_start/webapp/application.yaml       | 33 --------
 31 files changed, 81 insertions(+), 228 deletions(-)

diff --git a/examples/quick_start/httpserver-gateway/httpservergateway.go b/examples/quick_start/httpserver-gateway/httpservergateway.go
deleted file mode 100644
index 0792c7a..0000000
--- a/examples/quick_start/httpserver-gateway/httpservergateway.go
+++ /dev/null
@@ -1,96 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
-	"fmt"
-	"io/ioutil"
-	"net/http"
-	"net/url"
-)
-
-func handlerGateway(w http.ResponseWriter, r *http.Request) {
-
-	queryInfo, err := url.ParseQuery(r.URL.RawQuery)
-	if err != nil {
-		fmt.Println("parse queryInfo wrong: ", queryInfo)
-		fmt.Fprintln(w, "parse queryInfo wrong")
-		return
-	}
-	fmt.Println("height:%s,weight:%s", queryInfo.Get("height"), queryInfo.Get("weight"))
-	strReqURL := "http://mersher-provider:4540/bmi?height=" + queryInfo.Get("height") + "&weight=" + queryInfo.Get("weight")
-	resp, err := http.Get(strReqURL)
-	if err != nil {
-		// handle error
-	}
-	defer resp.Body.Close()
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		// handle error
-		fmt.Println("body err: ", body, err)
-		return
-	}
-	fmt.Println("body: " + string(body))
-	w.Header().Set("Content-Type", "application/json")
-	w.Header().Set("Access-Control-Allow-Origin", "*")
-	w.Write(body)
-
-}
-
-func handlerGateway2(w http.ResponseWriter, r *http.Request) {
-	queryInfo, err := url.ParseQuery(r.URL.RawQuery)
-	if err != nil {
-		fmt.Println("parse queryInfo wrong: ", queryInfo)
-		fmt.Fprintln(w, "parse queryInfo wrong")
-		return
-	}
-	fmt.Println("height:%s,weight:%s", queryInfo.Get("height"), queryInfo.Get("weight"))
-	strReqURL := "http://mersher-provider/bmi?height=" + queryInfo.Get("height") + "&weight=" + queryInfo.Get("weight")
-	//strReqURL := "http://mersher-ht-provider/bmi?height=" + queryInfo.Get("height") + "&weight=" + queryInfo.Get("weight")
-	//strReqURL := "http://mersher-ht-provider:4555/bmi?height=" + queryInfo.Get("height") + "&weight=" + queryInfo.Get("weight")
-	proxy, _ := url.Parse("http://127.0.0.1:30101") //将mesher设置为http代理
-	httpClient := http.Client{
-		Transport: &http.Transport{
-			Proxy: http.ProxyURL(proxy),
-		},
-	}
-	req, err := http.NewRequest(http.MethodGet, strReqURL, nil)
-	if err != nil {
-		fmt.Println("make req err: ", err)
-	}
-	resp, err := httpClient.Do(req)
-	if err != nil {
-		fmt.Println("Do err: ", resp, err)
-	}
-	defer resp.Body.Close()
-	body, err := ioutil.ReadAll(resp.Body)
-	if err != nil {
-		// handle error
-		fmt.Println("body err: ", body, err)
-		return
-	}
-	fmt.Println("body: " + string(body))
-	w.Header().Set("Content-Type", "application/json")
-	w.Header().Set("Access-Control-Allow-Origin", "*")
-	w.Write(body)
-}
-
-func main() {
-	http.HandleFunc("/bmi", handlerGateway2)
-	http.ListenAndServe("192.168.88.64:4538", nil)
-}
diff --git a/examples/quick_start/httpserver/httpserver.go b/examples/quick_start/httpserver/httpserver.go
deleted file mode 100644
index e8a0b45..0000000
--- a/examples/quick_start/httpserver/httpserver.go
+++ /dev/null
@@ -1,87 +0,0 @@
-/*
- * Licensed to the Apache Software Foundation (ASF) under one or more
- * contributor license agreements.  See the NOTICE file distributed with
- * this work for additional information regarding copyright ownership.
- * The ASF licenses this file to You under the Apache License, Version 2.0
- * (the "License"); you may not use this file except in compliance with
- * the License.  You may obtain a copy of the License at
- *
- *     http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-package main
-
-import (
-	"encoding/json"
-	"fmt"
-	"net/http"
-	"net/url"
-	"strconv"
-	"strings"
-	"time"
-)
-
-type resultInfo struct {
-	Result     float64 `json:"result"`
-	InstanceId string  `json:"instanceId"`
-	CallTime   string  `json:"callTime"`
-}
-
-func handlerCalculator(w http.ResponseWriter, r *http.Request) {
-	fmt.Println("HandlerCalculator1 begin")
-	queryInfo, err := url.ParseQuery(r.URL.RawQuery)
-	if err != nil {
-		fmt.Println("parse queryInfo wrong: ", queryInfo)
-		fmt.Fprintln(w, "parse queryInfo wrong")
-		return
-	}
-	fmt.Println("height:%s,weight:%s", queryInfo.Get("height"), queryInfo.Get("weight"))
-	ddwHeight, err := strconv.ParseFloat(queryInfo.Get("height"), 64)
-	if err != nil {
-		fmt.Println("para height wrong: %s", queryInfo.Get("height"))
-		fmt.Fprintln(w, "para height wrong")
-	}
-	if ddwHeight <= 0 {
-		time.Sleep(10 * time.Second)
-		panic("err input height: ")
-	}
-	ddwHeight /= 100
-	ddwWeight, err := strconv.ParseFloat(queryInfo.Get("weight"), 64)
-	if err != nil {
-		fmt.Println("para height wrong: %s", queryInfo.Get("weight"))
-		fmt.Fprintln(w, "para height wrong")
-	}
-	if ddwWeight <= 0 {
-		time.Sleep(10 * time.Second)
-		panic("err input weight: ")
-	}
-	ddwBmi := ddwWeight / (ddwHeight * ddwHeight)
-	fmt.Println("bmi:", ddwBmi)
-	var result resultInfo
-	result.Result, _ = strconv.ParseFloat(fmt.Sprintf("%.1f", ddwBmi), 64)
-	strTime := time.Now().Format("2006-01-02 15:04:05")
-	arrTime := strings.Split(strTime, " ")
-	result = resultInfo{result.Result, "goHttpServer", arrTime[1]}
-	bResult, err := json.Marshal(result)
-	if err != nil {
-		fmt.Println("result err ", result, string(bResult), err)
-		http.Error(w, err.Error(), http.StatusInternalServerError)
-		return
-	}
-	fmt.Println("result ", result, string(bResult))
-	w.Header().Set("Content-Type", "application/json")
-	w.Header().Set("Access-Control-Allow-Origin", "*")
-	w.Write(bResult)
-
-}
-
-func main() {
-	http.HandleFunc("/bmi", handlerCalculator)
-	http.ListenAndServe("127.0.0.1:4537", nil)
-}
diff --git a/examples/quick_start/httpserver_py/http_server.py b/examples/quick_start/httpserver_calculator/httpserver_calculator.py
similarity index 94%
copy from examples/quick_start/httpserver_py/http_server.py
copy to examples/quick_start/httpserver_calculator/httpserver_calculator.py
index 8038a61..ceb936c 100644
--- a/examples/quick_start/httpserver_py/http_server.py
+++ b/examples/quick_start/httpserver_calculator/httpserver_calculator.py
@@ -47,6 +47,10 @@ class CalculatorHandler(BaseHTTPRequestHandler):
             return
         dwHeight = float(arrHeight[1])
         dwWeight = float(arrWeight[1])
+        if dwHeight < 0 or dwWeight < 0 :
+            time.sleep(6)
+            raise RuntimeError('para Error')
+            return 
         ddwBmi = Calculator(dwHeight, dwWeight)
         print "calculator result:" + str(ddwBmi)
         self.send_response(200)
diff --git a/examples/quick_start/httpserver_webapp/httpserver_webapp.js b/examples/quick_start/httpserver_webapp/httpserver_webapp.js
new file mode 100644
index 0000000..0d61cd3
--- /dev/null
+++ b/examples/quick_start/httpserver_webapp/httpserver_webapp.js
@@ -0,0 +1,61 @@
+/*
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+ 
+const http = require("http");
+const fs = require("fs");
+const server = http.createServer();
+
+server.on("request", function(req, res) {
+  var arrPara = req.url.split("?")
+  console.log("arrPara : " + arrPara);
+  if (req.url == '/') {
+    res.setHeader('Content-Type', 'text/html; charset=utf-8')
+
+    fs.readFile("static/index.html", "utf-8", function(error, data) {
+      //  用error来判断文件是否读取成功
+      if (error) return console.log("err index.html : " + error.message);
+      console.log("index.html : " + data);
+      res.end(data)
+    });
+  } else if (arrPara[0] == '/calculator/bmi') {
+    var arrPara = req.url.split("?")
+    console.log("arrPara : " + arrPara);
+    if (arrPara.length != 2) {
+      res.end("para err : " + req.url);
+    }
+    var arrInfo = arrPara[1].split("&");
+    if (arrInfo.length != 2) {
+      res.end("para err : " + req.url)
+    }
+    var request = require("request");
+    request('http://calculator/bmi?' + arrPara[1], function(error, response, body) {
+      console.log(body);
+      if (!error && response.statusCode == 200) {
+        res.setHeader("Content-Type", "application/json")
+        res.setHeader("Access-Control-Allow-Origin", "*")
+        res.end(body);
+      };
+      if (error || response.statusCode != 200) {
+        res.end(body);
+      };
+    });
+  } else {
+    res.end("err url : " + req.url)
+  }
+});
+
+server.listen(4597);
diff --git a/examples/quick_start/webapp/index.html b/examples/quick_start/httpserver_webapp/static/index.html
similarity index 97%
rename from examples/quick_start/webapp/index.html
rename to examples/quick_start/httpserver_webapp/static/index.html
index c7681e8..faabdf7 100644
--- a/examples/quick_start/webapp/index.html
+++ b/examples/quick_start/httpserver_webapp/static/index.html
@@ -65,7 +65,7 @@
           return;
         }
         $.ajax({
-          url: "http://192.168.88.64:4538/bmi?height=" + $("#height").val() + "&weight=" + $("#weight").val(),
+          url: "/calculator/bmi?height=" + $("#height").val() + "&weight=" + $("#weight").val(),
           type: "GET",
           success: function (data) {
             $("#error").hide();
diff --git a/examples/quick_start/mersher-g/conf/auth.yaml b/examples/quick_start/mersher_calculator/conf/auth.yaml
similarity index 100%
rename from examples/quick_start/mersher-g/conf/auth.yaml
rename to examples/quick_start/mersher_calculator/conf/auth.yaml
diff --git a/examples/quick_start/mersher-a/conf/chassis.yaml b/examples/quick_start/mersher_calculator/conf/chassis.yaml
similarity index 97%
rename from examples/quick_start/mersher-a/conf/chassis.yaml
rename to examples/quick_start/mersher_calculator/conf/chassis.yaml
index 2361c2b..21deed6 100644
--- a/examples/quick_start/mersher-a/conf/chassis.yaml
+++ b/examples/quick_start/mersher_calculator/conf/chassis.yaml
@@ -91,9 +91,9 @@ cse:
 #      qps:
 #        enabled: true  # enable rate limiting or not
 #        global:
-#          limit: 100   # default limit of provider
+#          limit: 0   # default limit of provider
 #        limit:
-#          Server: 100  # rate limit for request from a provider, it represents 100 request per second
+#          Server: 0  # rate limit for request from a provider, it represents 100 request per second
 
 #ssl:
 ## Set those config to make mesher as https service
diff --git a/examples/quick_start/mersher-g/conf/egress.yaml b/examples/quick_start/mersher_calculator/conf/egress.yaml
similarity index 100%
rename from examples/quick_start/mersher-g/conf/egress.yaml
rename to examples/quick_start/mersher_calculator/conf/egress.yaml
diff --git a/examples/quick_start/mersher-g/conf/fault.yaml b/examples/quick_start/mersher_calculator/conf/fault.yaml
similarity index 100%
rename from examples/quick_start/mersher-g/conf/fault.yaml
rename to examples/quick_start/mersher_calculator/conf/fault.yaml
diff --git a/examples/quick_start/mersher-g/conf/lager.yaml b/examples/quick_start/mersher_calculator/conf/lager.yaml
similarity index 100%
rename from examples/quick_start/mersher-g/conf/lager.yaml
rename to examples/quick_start/mersher_calculator/conf/lager.yaml
diff --git a/examples/quick_start/mersher-g/conf/mesher.yaml b/examples/quick_start/mersher_calculator/conf/mesher.yaml
similarity index 100%
rename from examples/quick_start/mersher-g/conf/mesher.yaml
rename to examples/quick_start/mersher_calculator/conf/mesher.yaml
diff --git a/examples/quick_start/mersher-a/conf/microservice.yaml b/examples/quick_start/mersher_calculator/conf/microservice.yaml
similarity index 88%
rename from examples/quick_start/mersher-a/conf/microservice.yaml
rename to examples/quick_start/mersher_calculator/conf/microservice.yaml
index dc70a0a..e119ec9 100644
--- a/examples/quick_start/mersher-a/conf/microservice.yaml
+++ b/examples/quick_start/mersher_calculator/conf/microservice.yaml
@@ -1,6 +1,6 @@
 ## microservice property
 service_description:
-  name: mersher-provider
+  name: calculator
   version: 1.1.1
   environment:  #microservice environment
   properties:
diff --git a/examples/quick_start/mersher-b/conf/router.yaml b/examples/quick_start/mersher_calculator/conf/router.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/router.yaml
rename to examples/quick_start/mersher_calculator/conf/router.yaml
diff --git a/examples/quick_start/mersher-b/conf/auth.yaml b/examples/quick_start/mersher_webapp/conf/auth.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/auth.yaml
rename to examples/quick_start/mersher_webapp/conf/auth.yaml
diff --git a/examples/quick_start/mersher-g/conf/chassis.yaml b/examples/quick_start/mersher_webapp/conf/chassis.yaml
similarity index 98%
rename from examples/quick_start/mersher-g/conf/chassis.yaml
rename to examples/quick_start/mersher_webapp/conf/chassis.yaml
index 1129aac..4c02d2c 100644
--- a/examples/quick_start/mersher-g/conf/chassis.yaml
+++ b/examples/quick_start/mersher_webapp/conf/chassis.yaml
@@ -32,7 +32,7 @@ cse:
         incoming:   #provider handlers
 #  loadbalance:
 #    strategy:
-#      name: RoundRobin  # Random|RoundRobin|SessionStickiness
+#      name: Random  # Random|RoundRobin|SessionStickiness
 #    retryEnabled: false # if there is error, retry request or not
 #    retryOnNext: 2      # times to switch to another instance based on strategy
 #    retryOnSame: 3      # times to retry on the same instance
diff --git a/examples/quick_start/mersher-b/conf/egress.yaml b/examples/quick_start/mersher_webapp/conf/egress.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/egress.yaml
rename to examples/quick_start/mersher_webapp/conf/egress.yaml
diff --git a/examples/quick_start/mersher-b/conf/fault.yaml b/examples/quick_start/mersher_webapp/conf/fault.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/fault.yaml
rename to examples/quick_start/mersher_webapp/conf/fault.yaml
diff --git a/examples/quick_start/mersher-b/conf/lager.yaml b/examples/quick_start/mersher_webapp/conf/lager.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/lager.yaml
rename to examples/quick_start/mersher_webapp/conf/lager.yaml
diff --git a/examples/quick_start/mersher-b/conf/mesher.yaml b/examples/quick_start/mersher_webapp/conf/mesher.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/mesher.yaml
rename to examples/quick_start/mersher_webapp/conf/mesher.yaml
diff --git a/examples/quick_start/mersher-g/conf/microservice.yaml b/examples/quick_start/mersher_webapp/conf/microservice.yaml
similarity index 88%
rename from examples/quick_start/mersher-g/conf/microservice.yaml
rename to examples/quick_start/mersher_webapp/conf/microservice.yaml
index 83e53c2..a5640d6 100644
--- a/examples/quick_start/mersher-g/conf/microservice.yaml
+++ b/examples/quick_start/mersher_webapp/conf/microservice.yaml
@@ -1,6 +1,6 @@
 ## microservice property
 service_description:
-  name: mersher-consumer
+  name: webapp
   version: 0.0.1
   environment:  #microservice environment
   properties:
diff --git a/examples/quick_start/mersher-g/conf/router.yaml b/examples/quick_start/mersher_webapp/conf/router.yaml
similarity index 60%
rename from examples/quick_start/mersher-g/conf/router.yaml
rename to examples/quick_start/mersher_webapp/conf/router.yaml
index d2bc227..07d6029 100644
--- a/examples/quick_start/mersher-g/conf/router.yaml
+++ b/examples/quick_start/mersher_webapp/conf/router.yaml
@@ -1,10 +1,10 @@
 #routeRule:
-#  mersher-provider:        #service name
+#  calculator:        #service name
 #    - precedence: 2    #precedence of route rule
 #      route:           #route rule list
 #      - tags:
 #          version: 1.1.1
-#        weight: 50     #weight of 20%
+#        weight: 70     #weight of 20%
 #      - tags:
 #          version: 1.1.2
-#        weight: 50     #weight of 20%
\ No newline at end of file
+#        weight: 30     #weight of 20%
\ No newline at end of file
diff --git a/examples/quick_start/httpserver_py/http_server.py b/examples/quick_start/test_balance/httpserver_calculator/httpserver_calculator.py
similarity index 88%
rename from examples/quick_start/httpserver_py/http_server.py
rename to examples/quick_start/test_balance/httpserver_calculator/httpserver_calculator.py
index 8038a61..427f97a 100644
--- a/examples/quick_start/httpserver_py/http_server.py
+++ b/examples/quick_start/test_balance/httpserver_calculator/httpserver_calculator.py
@@ -47,6 +47,10 @@ class CalculatorHandler(BaseHTTPRequestHandler):
             return
         dwHeight = float(arrHeight[1])
         dwWeight = float(arrWeight[1])
+        if dwHeight < 0 or dwWeight < 0 :
+            time.sleep(6)
+            raise RuntimeError('para Error')
+            return 
         ddwBmi = Calculator(dwHeight, dwWeight)
         print "calculator result:" + str(ddwBmi)
         self.send_response(200)
@@ -56,14 +60,14 @@ class CalculatorHandler(BaseHTTPRequestHandler):
         # Send the html message
         date = time.strftime("%Y-%m-%d %H:%M:%S", time.localtime())
         arrDate = str.split(date, " ")
-        result = {"result": ddwBmi, "instanceId": "pythonServer", "callTime": str(arrDate[1])}
+        result = {"result": ddwBmi, "instanceId": "pythonServer2", "callTime": str(arrDate[1])}
         strResult = json.dumps(result)
         print "json result:" + strResult
         self.wfile.write(strResult)
         return
 
 try:
-    server = HTTPServer(('127.0.0.1', 4540), CalculatorHandler)
+    server = HTTPServer(('127.0.0.1', 4537), CalculatorHandler)
     print 'http server begin:\n'
     server.serve_forever()
 
diff --git a/examples/quick_start/mersher-a/conf/auth.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/auth.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/auth.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/auth.yaml
diff --git a/examples/quick_start/mersher-b/conf/chassis.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/chassis.yaml
similarity index 100%
rename from examples/quick_start/mersher-b/conf/chassis.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/chassis.yaml
diff --git a/examples/quick_start/mersher-a/conf/egress.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/egress.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/egress.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/egress.yaml
diff --git a/examples/quick_start/mersher-a/conf/fault.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/fault.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/fault.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/fault.yaml
diff --git a/examples/quick_start/mersher-a/conf/lager.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/lager.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/lager.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/lager.yaml
diff --git a/examples/quick_start/mersher-a/conf/mesher.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/mesher.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/mesher.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/mesher.yaml
diff --git a/examples/quick_start/mersher-b/conf/microservice.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/microservice.yaml
similarity index 88%
rename from examples/quick_start/mersher-b/conf/microservice.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/microservice.yaml
index dc70a0a..e119ec9 100644
--- a/examples/quick_start/mersher-b/conf/microservice.yaml
+++ b/examples/quick_start/test_balance/mersher_calculator/conf/microservice.yaml
@@ -1,6 +1,6 @@
 ## microservice property
 service_description:
-  name: mersher-provider
+  name: calculator
   version: 1.1.1
   environment:  #microservice environment
   properties:
diff --git a/examples/quick_start/mersher-a/conf/router.yaml b/examples/quick_start/test_balance/mersher_calculator/conf/router.yaml
similarity index 100%
rename from examples/quick_start/mersher-a/conf/router.yaml
rename to examples/quick_start/test_balance/mersher_calculator/conf/router.yaml
diff --git a/examples/quick_start/webapp/application.yaml b/examples/quick_start/webapp/application.yaml
deleted file mode 100644
index e4bad11..0000000
--- a/examples/quick_start/webapp/application.yaml
+++ /dev/null
@@ -1,33 +0,0 @@
-## ---------------------------------------------------------------------------
-## Licensed to the Apache Software Foundation (ASF) under one or more
-## contributor license agreements.  See the NOTICE file distributed with
-## this work for additional information regarding copyright ownership.
-## The ASF licenses this file to You under the Apache License, Version 2.0
-## (the "License"); you may not use this file except in compliance with
-## the License.  You may obtain a copy of the License at
-##
-##      http://www.apache.org/licenses/LICENSE-2.0
-##
-## Unless required by applicable law or agreed to in writing, software
-## distributed under the License is distributed on an "AS IS" BASIS,
-## WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-## See the License for the specific language governing permissions and
-## limitations under the License.
-## ---------------------------------------------------------------------------
-
-zuul:
-  routes:
-    calculator: /calculator/**
-
-# disable netflix eurkea since it's not used for service discovery
-ribbon:
-  eureka:
-    enabled: false
-
-server:
-  address: 192.168.88.64
-  port: 8889
-
-servicecomb:
-  tracing:
-    enabled: false