You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@servicecomb.apache.org by ni...@apache.org on 2018/08/27 11:26:10 UTC

[incubator-servicecomb-saga] branch master updated (314e0cc -> 8ff04bd)

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

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


    from 314e0cc  SCB-865 Added the license header to NoOpEventAwareInterceptor
     new 4e3bb69  Expose alpha's gRPC port(8090)
     new 5f55399  Add the load test guide.
     new 8ff04bd  Update the k8s base/ folder description. Add the intro of jmeter-collector and the load test ref.

The 3 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:
 docs/load_test.md                            | 49 ++++++++++++++++++++++++++++
 saga-demo/saga-k8s-resources/README.md       |  2 +-
 saga-demo/saga-k8s-resources/base/alpha.yaml |  4 ++-
 3 files changed, 53 insertions(+), 2 deletions(-)
 create mode 100644 docs/load_test.md


[incubator-servicecomb-saga] 02/03: Add the load test guide.

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

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

commit 5f55399aabcd0882552e8306047239dbd1f62f01
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Mon Aug 27 15:49:32 2018 +0800

    Add the load test guide.
---
 docs/load_test.md | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/docs/load_test.md b/docs/load_test.md
new file mode 100644
index 0000000..dccdb01
--- /dev/null
+++ b/docs/load_test.md
@@ -0,0 +1,49 @@
+### Load testing saga with Kubernetes
+
+First make sure a [saga-demo](https://github.com/apache/incubator-servicecomb-saga/tree/master/saga-demo) is running in the kubernetes cluster(you can find useful info at [saga's k8s demo](https://github.com/apache/incubator-servicecomb-saga/tree/master/saga-demo/saga-k8s-resources)), here we take the [saga-spring-demo](https://github.com/apache/incubator-servicecomb-saga/tree/master/saga-demo/saga-spring-demo) as an example.
+
+Navigate to `saga-demo/saga-k8s-resources/spring-demo/test`, there is a jmeter service and corresponding configmap where jmeter's
+
+There is a jmeter service definition in jmeter.yaml, and a configmap where the jmeter service's config is stored. We first deploy the configmap in the cluster:
+
+```bash
+$ kubectl aplly -f ./jmeter.config.yaml
+configmap "springdemo-jmeter-script" created
+```
+
+So the configmap is there in the cluster, we can edit it any time with `kubectl edit`:
+
+```bash
+$ kubectl edit configmap springdemo-jmeter-script -n servicecomb
+```
+
+Adjust the testing parameters, you may be interested in `ThreadGroup.num_threads`, `ThreadGroup.ramp_time`, `ThreadGroup.duration`, which are: the number of max testing threads, the duration to start the max threads and the total testing time.
+
+Then we deploy the jmeter service:
+
+```bash
+$ kubectl apply -f ./jmeter.yaml
+```
+
+If you're interested in what's going on inside the service, open the jmeter.yaml file, and you'll see the configmap is delivered to jmeter through a volume mount:
+
+```yaml
+# ...
+containers:
+- name: spring-demo-jmeter
+env:
+- name: REPORT_UPLOAD_SERVER
+  value: jmeter-collector.servicecomb
+# ...
+  volumeMounts:
+  - name: jmeter-script
+    mountPath: /tmp/
+volumes:
+  - name: jmeter-script
+    configMap:
+      name: springdemo-jmeter-script
+```
+
+What's more, when we deploy the resources in spring-demo's base folder, a `jmeter-collector` service is started, it will receive the jmeter service's uploading archives. The collector's upload URL is defined in environment variable `REPORT_UPLOAD_SERVER`.
+
+Since the jmeter service's instance is defined in a [kubernetes deployment](https://kubernetes.io/docs/concepts/workloads/controllers/deployment/), the restartPolicy will be 'Always', it will keep testing, uploading, exiting, restarting again and again. When we want to adjust the load test parameter, we edit the configmap with `kubectl edit`, save it, restart the `jmeter` deployment and test with the new parameters.
\ No newline at end of file


[incubator-servicecomb-saga] 03/03: Update the k8s base/ folder description. Add the intro of jmeter-collector and the load test ref.

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

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

commit 8ff04bda57c5ebfbc2c5f8f38701235e3ee25344
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Mon Aug 27 15:52:11 2018 +0800

    Update the k8s base/ folder description.
    Add the intro of jmeter-collector and the load test ref.
---
 saga-demo/saga-k8s-resources/README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/saga-demo/saga-k8s-resources/README.md b/saga-demo/saga-k8s-resources/README.md
index 894bd88..a84a6ca 100644
--- a/saga-demo/saga-k8s-resources/README.md
+++ b/saga-demo/saga-k8s-resources/README.md
@@ -4,7 +4,7 @@ You can now play with saga under Kubernetes!
 
 The demos' Kubernetes resources are splitted into 3 categories:
 
-- **base**: The base resources that all demos needs under `base/` folder, including the `alpha-server` and `postgresql` database
+- **base**: The base resources that all demos needs under `base/` folder, including the `alpha-server,`the `postgresql` database, and a `jmeter-collector` for [load test](https://github.com/apache/incubator-servicecomb-saga/blob/master/docs/load_test.md).
 - **demos**: The resources that each demo will consume, stored in the folder named with `xxx-demo/`
 - **tests**: A [jmeter](https://jmeter.apache.org/) deployment is provided for each demo under the demo's `test/` folder, there is also a [Kubernetes configmap](http://kubernetes-v1-4.github.io/docs/user-guide/configmap/) where you can change and apply the jmeter test plans. So you can change the plan at any time and pull up the jmeter deployment to test the demos.
 


[incubator-servicecomb-saga] 01/03: Expose alpha's gRPC port(8090)

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

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

commit 4e3bb6993718bcb7697f5f3d1b2a31fb05b29d24
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Mon Aug 27 15:45:42 2018 +0800

    Expose alpha's gRPC port(8090)
---
 saga-demo/saga-k8s-resources/base/alpha.yaml | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/saga-demo/saga-k8s-resources/base/alpha.yaml b/saga-demo/saga-k8s-resources/base/alpha.yaml
index 79298d8..1dd303a 100644
--- a/saga-demo/saga-k8s-resources/base/alpha.yaml
+++ b/saga-demo/saga-k8s-resources/base/alpha.yaml
@@ -25,7 +25,9 @@ metadata:
 spec:
   ports:
   - port: 8080
-    name: alpha
+    name: alpha-http
+  - port: 8090
+    name: alpha-grpc
   selector:
     app: alphaserver
 ---