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/30 10:51:41 UTC
[incubator-servicecomb-saga] 01/02: SCB-868 Add kamon related
configs to alpha docker-compose file.
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 3e3751b4b0a086e6fc8b29c58972a140a922a883
Author: Zhen Ju <ju...@huawei.com>
AuthorDate: Thu Aug 30 17:20:33 2018 +0800
SCB-868 Add kamon related configs to alpha docker-compose file.
---
.../docker-compose-alpha-perf.yaml | 58 ++++++++++++++++++++++
saga-demo/saga-spring-demo/saga-demo.sh | 7 +++
2 files changed, 65 insertions(+)
diff --git a/saga-demo/saga-spring-demo/docker-compose-alpha-perf.yaml b/saga-demo/saga-spring-demo/docker-compose-alpha-perf.yaml
new file mode 100644
index 0000000..c0ab950
--- /dev/null
+++ b/saga-demo/saga-spring-demo/docker-compose-alpha-perf.yaml
@@ -0,0 +1,58 @@
+## ---------------------------------------------------------------------------
+## 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.
+## ---------------------------------------------------------------------------
+
+version: '2.1'
+
+services:
+ database:
+ image: "postgres"
+ hostname: postgres
+ environment:
+ - POSTGRES_DB=saga
+ - POSTGRES_USER=saga
+ - POSTGRES_PASSWORD=password
+ healthcheck:
+ test: ["CMD-SHELL", "nc -z localhost 5432 &> /dev/null; echo $$?"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
+
+ alpha:
+ image: "alpha-server:${TAG}"
+ hostname: alpha-server
+ links:
+ - "database:postgresql.servicecomb.io"
+ - "grafana:grafana.servicecomb.io"
+ environment:
+ - JAVA_OPTS=-javaagent:/maven/saga/aspectjweaver.jar -Dspring.profiles.active=prd -Dkamon.statsd.hostname=grafana.servicecomb.io -Dkamon.statsd.port=8125 -Dkamon.modules.kamon-annotation.auto-start=yes -Dkamon.modules.kamon-log-reporter.auto-start=yes -Dkamon.modules.kamon-statsd.auto-start=yes
+ healthcheck:
+ test: ["CMD-SHELL", "nc -z localhost 8080 &> /dev/null; echo $$?"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
+ depends_on:
+ database:
+ condition: service_healthy
+
+ grafana:
+ image: "kamon/grafana_graphite"
+ hostname: grafana
+ healthcheck:
+ test: ["CMD-SHELL", "nc -z localhost 80 &> /dev/null; echo $$?"]
+ interval: 30s
+ timeout: 10s
+ retries: 5
diff --git a/saga-demo/saga-spring-demo/saga-demo.sh b/saga-demo/saga-spring-demo/saga-demo.sh
index 2b3cf47..b89cd72 100755
--- a/saga-demo/saga-spring-demo/saga-demo.sh
+++ b/saga-demo/saga-spring-demo/saga-demo.sh
@@ -45,6 +45,13 @@ case $1 in
exit $?
;;
+ up-alpha-perf)
+ fetch_version
+ echo "Starting ${service}:${version}"
+ TAG=$version docker-compose -f docker-compose-alpha.yaml up
+ exit $?
+ ;;
+
up-demo)
fetch_version
echo "Starting ${service}:${version}"