From a0265ad186447071cc5ed08595c11b110f052c5b Mon Sep 17 00:00:00 2001 From: robocanic Date: Sat, 29 Mar 2025 16:49:43 +0800 Subject: [PATCH 1/2] 1. bump java version to 17, bump dubbo version to 3.2.16; 2. add dependency support for metric and trace; 3. refractor deploy manifests --- 10-task/dubbo-samples-shop/deploy/All.yml | 379 ++++++++++- 10-task/dubbo-samples-shop/deploy/Gray.yml | 230 ------- .../dubbo-samples-shop/deploy/Namespace.yml | 25 - .../deploy/comment-v1-gray/Deployment.yml | 43 +- .../deploy/comment-v1/Deployment.yml | 43 +- .../deploy/comment-v2/Deployment.yml | 43 +- .../deploy/detail-v1-gray/Deployment.yml | 43 +- .../deploy/detail-v1/Deployment.yml | 43 +- .../deploy/detail-v2/Deployment.yml | 43 +- .../deploy/dubbo-samples-shop-all.yaml | 644 ++++++++++++++++++ .../deploy/dubbo-system.yaml | 122 ++++ .../deploy/frontend/Deployment.yml | 41 +- .../deploy/order-v1-gray/Deployment.yml | 43 +- .../deploy/order-v1/Deployment.yml | 45 +- .../deploy/order-v2/Deployment.yml | 45 +- .../deploy/user-gray/Deployment.yml | 45 +- .../deploy/user/Deployment.yml | 43 +- .../dubbo-samples-shop-comment-api/pom.xml | 4 +- .../Dockerfile | 4 + .../dubbo-samples-shop-comment-gray/pom.xml | 26 +- .../dubbo-samples-shop-comment-v1/Dockerfile | 4 + .../dubbo-samples-shop-comment-v1/pom.xml | 20 +- .../dubbo-samples-shop-comment-v2/Dockerfile | 4 + .../dubbo-samples-shop-comment-v2/pom.xml | 20 +- .../dubbo-samples-shop-detail-api/pom.xml | 4 +- .../dubbo-samples-shop-detail-gray/Dockerfile | 4 + .../dubbo-samples-shop-detail-gray/pom.xml | 20 +- .../dubbo-samples-shop-detail-v1/Dockerfile | 4 + .../dubbo-samples-shop-detail-v1/pom.xml | 20 +- .../dubbo-samples-shop-detail-v2/Dockerfile | 4 + .../dubbo-samples-shop-detail-v2/pom.xml | 20 +- .../dubbo-samples-shop-frontend-api/pom.xml | 4 +- .../dubbo-samples-shop-frontend/Dockerfile | 4 + .../dubbo-samples-shop-frontend/pom.xml | 26 +- .../src/main/resources/application.properties | 1 + .../dubbo-samples-shop-order-api/pom.xml | 4 +- .../dubbo-samples-shop-order-gray/Dockerfile | 4 + .../dubbo-samples-shop-order-gray/pom.xml | 20 +- .../dubbo-samples-shop-order-v1/Dockerfile | 4 + .../dubbo-samples-shop-order-v1/pom.xml | 20 +- .../dubbo-samples-shop-order-v2/Dockerfile | 4 + .../dubbo-samples-shop-order-v2/pom.xml | 20 +- .../dubbo-samples-shop-user-api/pom.xml | 4 +- .../dubbo-samples-shop-user-gray/Dockerfile | 9 + .../dubbo-samples-shop-user-gray/pom.xml | 20 +- .../dubbo-samples-shop-user/Dockerfile | 4 + .../dubbo-samples-shop-user/pom.xml | 23 +- 47 files changed, 1610 insertions(+), 639 deletions(-) delete mode 100644 10-task/dubbo-samples-shop/deploy/Gray.yml delete mode 100644 10-task/dubbo-samples-shop/deploy/Namespace.yml create mode 100644 10-task/dubbo-samples-shop/deploy/dubbo-samples-shop-all.yaml create mode 100644 10-task/dubbo-samples-shop/deploy/dubbo-system.yaml create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/Dockerfile create mode 100644 10-task/dubbo-samples-shop/dubbo-samples-shop-user/Dockerfile diff --git a/10-task/dubbo-samples-shop/deploy/All.yml b/10-task/dubbo-samples-shop/deploy/All.yml index 33e0c02127..78d13c28af 100644 --- a/10-task/dubbo-samples-shop/deploy/All.yml +++ b/10-task/dubbo-samples-shop/deploy/All.yml @@ -72,7 +72,7 @@ metadata: name: nacos namespace: dubbo-system spec: - type: ClusterIP + type: LoadBalancer sessionAffinity: None selector: app: nacos @@ -107,7 +107,7 @@ metadata: labels: app: dubbo-admin spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: dubbo-admin @@ -211,7 +211,7 @@ metadata: name: skywalking-oap-dashboard namespace: dubbo-system spec: - type: ClusterIP + type: LoadBalancer sessionAffinity: None selector: app: skywalking-oap-dashboard @@ -220,7 +220,21 @@ spec: name: http targetPort: 8080 --- - +apiVersion: v1 +kind: Service +metadata: + name: dubbo-qos + namespace: dubbo-demo +spec: + type: LoadBalancer + sessionAffinity: None + selector: + app-type: dubbo + ports: + - port: 22222 + name: dubbo-qos + targetPort: 22222 +--- # App FrontEnd apiVersion: apps/v1 kind: Deployment @@ -236,6 +250,7 @@ spec: metadata: labels: app: shop-frontend + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -252,21 +267,26 @@ spec: containers: - name: shop-frontend - image: apache/dubbo-demo:dubbo-samples-shop-frontend_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-frontend:0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20881 protocol: TCP - name: dubbo-qos - containerPort: 20991 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.application.qos-port=22222 -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-frontend - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -280,7 +300,7 @@ metadata: name: shop-order-v1 namespace: dubbo-demo spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: shop-order @@ -290,6 +310,7 @@ spec: labels: app: shop-order orderVersion: v1 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -306,21 +327,26 @@ spec: containers: - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_v1_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-order:v1_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20882 protocol: TCP - name: dubbo-qos - containerPort: 20992 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-order - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -336,7 +362,7 @@ metadata: name: shop-order-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-order @@ -346,6 +372,7 @@ spec: labels: app: shop-order orderVersion: v2 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -362,21 +389,26 @@ spec: containers: - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_v2_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-order:v2_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20883 protocol: TCP - name: dubbo-qos - containerPort: 20993 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-order - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -392,7 +424,7 @@ metadata: name: shop-user namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-user @@ -400,6 +432,7 @@ spec: metadata: labels: app: shop-user + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -416,21 +449,26 @@ spec: containers: - name: shop-user - image: apache/dubbo-demo:dubbo-samples-shop-user_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-user:0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20884 protocol: TCP - name: dubbo-qos - containerPort: 20994 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-user - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -444,7 +482,7 @@ metadata: name: shop-detail-v1 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-detail @@ -454,6 +492,7 @@ spec: labels: app: shop-detail detailVersion: v1 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -470,21 +509,27 @@ spec: containers: - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-detail:v1_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20885 protocol: TCP - name: dubbo-qos - containerPort: 20995 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-detail - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -500,7 +545,7 @@ metadata: name: shop-detail-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-detail @@ -510,6 +555,7 @@ spec: labels: app: shop-detail detailVersion: v2 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -526,21 +572,27 @@ spec: containers: - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_v2_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-detail:v2_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20886 protocol: TCP - name: dubbo-qos - containerPort: 20996 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-detail - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -556,7 +608,7 @@ metadata: name: shop-comment-v1 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-comment @@ -566,6 +618,7 @@ spec: labels: app: shop-comment commentVersion: v1 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -582,21 +635,27 @@ spec: containers: - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-comment:v1_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20887 protocol: TCP - name: dubbo-qos - containerPort: 20997 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-comment - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES @@ -612,7 +671,7 @@ metadata: name: shop-comment-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-comment @@ -622,6 +681,7 @@ spec: labels: app: shop-comment commentVersion: v2 + app-type: dubbo spec: volumes: - name: skywalking-agent @@ -638,25 +698,274 @@ spec: containers: - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_v2_0.0.1 + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-comment:v2_0.0.1 imagePullPolicy: Always ports: - name: dubbo containerPort: 20888 protocol: TCP - name: dubbo-qos - containerPort: 20998 + containerPort: 22222 protocol: TCP volumeMounts: - name: skywalking-agent mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" - name: SW_AGENT_NAME value: shop::shop-comment - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES value: "skywalking-oap-server.dubbo-system.svc:11800" - name: DUBBO_LABELS value: "commentVersion=v2; region=hangzhou;" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-user-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-user + template: + metadata: + labels: + app: shop-user + app-type: dubbo + spec: + volumes: + - name: skywalking-agent + emptyDir: { } + + initContainers: + - name: agent-container + image: apache/skywalking-java-agent:8.13.0-java17 + volumeMounts: + - name: skywalking-agent + mountPath: /agent + command: [ "/bin/sh" ] + args: [ "-c", "cp -R /skywalking/agent /agent/" ] + + containers: + - name: shop-user-gray + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-user:gray_0.0.1 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20892 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + volumeMounts: + - name: skywalking-agent + mountPath: /skywalking + env: + - name: JAVA_TOOL_OPTIONS + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" + - name: SW_AGENT_NAME + value: shop::shop-user + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: "skywalking-oap-server.dubbo-system.svc:11800" + - name: DUBBO_LABELS + value: "env=gray" +--- + +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-order-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-order + orderVersion: v1 + template: + metadata: + labels: + app: shop-order + orderVersion: v1 + app-type: dubbo + spec: + volumes: + - name: skywalking-agent + emptyDir: { } + + initContainers: + - name: agent-container + image: apache/skywalking-java-agent:8.13.0-java17 + volumeMounts: + - name: skywalking-agent + mountPath: /agent + command: [ "/bin/sh" ] + args: [ "-c", "cp -R /skywalking/agent /agent/" ] + + containers: + - name: shop-order + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-order:gray_0.0.1 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20891 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + volumeMounts: + - name: skywalking-agent + mountPath: /skywalking + env: + - name: JAVA_TOOL_OPTIONS + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" + - name: SW_AGENT_NAME + value: shop::shop-order + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: "skywalking-oap-server.dubbo-system.svc:11800" + - name: DUBBO_LABELS + value: "env=gray" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-detail-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-detail + detailVersion: v1 + template: + metadata: + labels: + app: shop-detail + detailVersion: v1 + app-type: dubbo + spec: + volumes: + - name: skywalking-agent + emptyDir: { } + initContainers: + - name: agent-container + image: apache/skywalking-java-agent:8.13.0-java17 + volumeMounts: + - name: skywalking-agent + mountPath: /agent + command: [ "/bin/sh" ] + args: [ "-c", "cp -R /skywalking/agent /agent/" ] + + containers: + - name: shop-detail + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-detail:gray_0.0.1 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20890 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + volumeMounts: + - name: skywalking-agent + mountPath: /skywalking + env: + - name: JAVA_TOOL_OPTIONS + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" + - name: SW_AGENT_NAME + value: shop::shop-detail + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: "skywalking-oap-server.dubbo-system.svc:11800" + - name: DUBBO_LABELS + value: "env=gray" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-comment-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-comment + commentVersion: v1 + template: + metadata: + labels: + app: shop-comment + commentVersion: v1 + app-type: dubbo + spec: + volumes: + - name: skywalking-agent + emptyDir: { } + + initContainers: + - name: agent-container + image: apache/skywalking-java-agent:8.13.0-java17 + volumeMounts: + - name: skywalking-agent + mountPath: /agent + command: [ "/bin/sh" ] + args: [ "-c", "cp -R /skywalking/agent /agent/" ] + + containers: + - name: shop-comment + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/shop-comment:gray_0.0.1 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20889 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + volumeMounts: + - name: skywalking-agent + mountPath: /skywalking + env: + - name: JAVA_TOOL_OPTIONS + value: "-javaagent:/skywalking/agent/skywalking-agent.jar + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-accept-foreign-ip=true + -Ddubbo.application.qos-anonymous-allow-commands=metrics" + - name: SW_AGENT_NAME + value: shop::shop-comment + - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES + value: "skywalking-oap-server.dubbo-system.svc:11800" + - name: DUBBO_LABELS + value: "env=gray" +--- diff --git a/10-task/dubbo-samples-shop/deploy/Gray.yml b/10-task/dubbo-samples-shop/deploy/Gray.yml deleted file mode 100644 index 5f97c156b2..0000000000 --- a/10-task/dubbo-samples-shop/deploy/Gray.yml +++ /dev/null @@ -1,230 +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. - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shop-user-gray - namespace: dubbo-demo -spec: - replicas: 3 - selector: - matchLabels: - app: shop-user - template: - metadata: - labels: - app: shop-user - spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - - containers: - - name: shop-user-gray - image: apache/dubbo-demo:dubbo-samples-shop-user_gray_0.0.1 - imagePullPolicy: Always - ports: - - name: dubbo - containerPort: 20892 - protocol: TCP - - name: dubbo-qos - containerPort: 21002 - protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking - env: - - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-user - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" - - name: DUBBO_LABELS - value: "env=gray" ---- - -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shop-order-v1-gray - namespace: dubbo-demo -spec: - replicas: 2 - selector: - matchLabels: - app: shop-order - orderVersion: v1 - template: - metadata: - labels: - app: shop-order - orderVersion: v1 - spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - - containers: - - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_gray_0.0.1 - imagePullPolicy: Always - ports: - - name: dubbo - containerPort: 20891 - protocol: TCP - - name: dubbo-qos - containerPort: 21001 - protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking - env: - - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-order - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" - - name: DUBBO_LABELS - value: "env=gray" ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shop-detail-v1-gray - namespace: dubbo-demo -spec: - replicas: 3 - selector: - matchLabels: - app: shop-detail - detailVersion: v1 - template: - metadata: - labels: - app: shop-detail - detailVersion: v1 - spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - - containers: - - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_gray_0.0.1 - imagePullPolicy: Always - ports: - - name: dubbo - containerPort: 20890 - protocol: TCP - - name: dubbo-qos - containerPort: 21000 - protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking - env: - - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-detail - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" - - name: DUBBO_LABELS - value: "env=gray" ---- -apiVersion: apps/v1 -kind: Deployment -metadata: - name: shop-comment-v1-gray - namespace: dubbo-demo -spec: - replicas: 3 - selector: - matchLabels: - app: shop-comment - commentVersion: v1 - template: - metadata: - labels: - app: shop-comment - commentVersion: v1 - spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - - containers: - - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_gray_0.0.1 - imagePullPolicy: Always - ports: - - name: dubbo - containerPort: 20889 - protocol: TCP - - name: dubbo-qos - containerPort: 20999 - protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking - env: - - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-comment - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" - - name: DUBBO_LABELS - value: "env=gray" ---- \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/Namespace.yml b/10-task/dubbo-samples-shop/deploy/Namespace.yml deleted file mode 100644 index 20d311f10f..0000000000 --- a/10-task/dubbo-samples-shop/deploy/Namespace.yml +++ /dev/null @@ -1,25 +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. - -apiVersion: v1 -kind: Namespace -metadata: - name: dubbo-demo ---- - -apiVersion: v1 -kind: Namespace -metadata: - name: dubbo-system \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/comment-v1-gray/Deployment.yml b/10-task/dubbo-samples-shop/deploy/comment-v1-gray/Deployment.yml index 0e6425e8eb..462bc0daa3 100644 --- a/10-task/dubbo-samples-shop/deploy/comment-v1-gray/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/comment-v1-gray/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-comment-v1-gray namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-comment @@ -29,40 +29,35 @@ spec: labels: app: shop-comment commentVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_gray_0.0.1 + image: apache/dubbo-demo:dubbo-demo-comment_gray_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20889 protocol: TCP - name: dubbo-qos - containerPort: 20999 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-comment - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "env=gray" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/comment-v1/Deployment.yml b/10-task/dubbo-samples-shop/deploy/comment-v1/Deployment.yml index 54d551e81f..10c470cfa2 100644 --- a/10-task/dubbo-samples-shop/deploy/comment-v1/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/comment-v1/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-comment-v1 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-comment @@ -29,40 +29,35 @@ spec: labels: app: shop-comment commentVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_0.0.1 + image: apache/dubbo-demo:dubbo-demo-comment_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20887 protocol: TCP - name: dubbo-qos - containerPort: 20997 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-comment - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "commentVersion=v1; region=beijing" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/comment-v2/Deployment.yml b/10-task/dubbo-samples-shop/deploy/comment-v2/Deployment.yml index 566a77b04d..b5c077db6f 100644 --- a/10-task/dubbo-samples-shop/deploy/comment-v2/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/comment-v2/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-comment-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-comment @@ -29,40 +29,35 @@ spec: labels: app: shop-comment commentVersion: v2 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-comment - image: apache/dubbo-demo:dubbo-samples-shop-comment_v2_0.0.1 + image: apache/dubbo-demo:dubbo-demo-comment_v2_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20888 protocol: TCP - name: dubbo-qos - containerPort: 20998 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-comment - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "commentVersion=v2; region=hangzhou;" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/detail-v1-gray/Deployment.yml b/10-task/dubbo-samples-shop/deploy/detail-v1-gray/Deployment.yml index 6895a4b3fd..7692ebdb9c 100644 --- a/10-task/dubbo-samples-shop/deploy/detail-v1-gray/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/detail-v1-gray/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-detail-v1-gray namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-detail @@ -29,40 +29,35 @@ spec: labels: app: shop-detail detailVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_gray_0.0.1 + image: apache/dubbo-demo:dubbo-demo-detail_gray_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20890 protocol: TCP - name: dubbo-qos - containerPort: 21000 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-detail - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "env=gray" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/detail-v1/Deployment.yml b/10-task/dubbo-samples-shop/deploy/detail-v1/Deployment.yml index 4efa357b9d..9bad8a05ef 100644 --- a/10-task/dubbo-samples-shop/deploy/detail-v1/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/detail-v1/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-detail-v1 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-detail @@ -29,40 +29,35 @@ spec: labels: app: shop-detail detailVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_0.0.1 + image: apache/dubbo-demo:dubbo-demo-detail_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20885 protocol: TCP - name: dubbo-qos - containerPort: 20995 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-detail - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "detailVersion=v1; region=beijing" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/detail-v2/Deployment.yml b/10-task/dubbo-samples-shop/deploy/detail-v2/Deployment.yml index ed7df3a1a7..e926657246 100644 --- a/10-task/dubbo-samples-shop/deploy/detail-v2/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/detail-v2/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-detail-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-detail @@ -29,40 +29,35 @@ spec: labels: app: shop-detail detailVersion: v2 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-detail - image: apache/dubbo-demo:dubbo-samples-shop-detail_v2_0.0.1 + image: apache/dubbo-demo:dubbo-demo-detail_v2_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20886 protocol: TCP - name: dubbo-qos - containerPort: 20996 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-detail - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "detailVersion=v2; region=hangzhou;" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/dubbo-samples-shop-all.yaml b/10-task/dubbo-samples-shop/deploy/dubbo-samples-shop-all.yaml new file mode 100644 index 0000000000..3bb390850b --- /dev/null +++ b/10-task/dubbo-samples-shop/deploy/dubbo-samples-shop-all.yaml @@ -0,0 +1,644 @@ +# 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. + +# Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: dubbo-demo + +--- +# QOS Service +apiVersion: v1 +kind: Service +metadata: + name: dubbo-qos + namespace: dubbo-demo + labels: + org.apache.dubbo/service: dubbo-qos +spec: + type: ClusterIP + sessionAffinity: None + selector: + app-type: dubbo + ports: + - port: 22222 + name: dubbo-qos + targetPort: 22222 + +--- +# App FrontEnd Service +apiVersion: v1 +kind: Service +metadata: + name: shop-frontend + namespace: dubbo-demo +spec: + type: ClusterIP + sessionAffinity: None + selector: + app: shop-frontend + ports: + - port: 8080 + name: web + targetPort: 8080 + +--- +# App FrontEnd +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-frontend + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-frontend + template: + metadata: + labels: + app: shop-frontend + app-type: dubbo + spec: + containers: + - name: shop-frontend + image: apache/dubbo-demo:dubbo-demo-frontend_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20881 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 +--- +# App Order V1-1 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-order-v1 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-order + orderVersion: v1 + template: + metadata: + labels: + app: shop-order + orderVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-order + image: apache/dubbo-demo:dubbo-demo-order_v1_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20882 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "orderVersion=v1" +--- +# App Order V2 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-order-v2 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-order + orderVersion: v2 + template: + metadata: + labels: + app: shop-order + orderVersion: v2 + app-type: dubbo + spec: + containers: + - name: shop-order + image: apache/dubbo-demo:dubbo-demo-order_v2_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20883 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "orderVersion=v2;" +--- +# App User +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-user + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-user + template: + metadata: + labels: + app: shop-user + app-type: dubbo + spec: + containers: + - name: shop-user + image: apache/dubbo-demo:dubbo-demo-user_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20884 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + +--- +# App Detail-1 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-detail-v1 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-detail + detailVersion: v1 + template: + metadata: + labels: + app: shop-detail + detailVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-detail + image: apache/dubbo-demo:dubbo-demo-detail_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20885 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "detailVersion=v1; region=beijing" +--- +# App Detail-2 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-detail-v2 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-detail + detailVersion: v2 + template: + metadata: + labels: + app: shop-detail + detailVersion: v2 + app-type: dubbo + spec: + containers: + - name: shop-detail + image: apache/dubbo-demo:dubbo-demo-detail_v2_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20886 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "detailVersion=v2; region=hangzhou;" +--- +#App Comment v1 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-comment-v1 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-comment + commentVersion: v1 + template: + metadata: + labels: + app: shop-comment + commentVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-comment + image: apache/dubbo-demo:dubbo-demo-comment_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20887 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "commentVersion=v1; region=beijing" +--- +#App Comment v2 +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-comment-v2 + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-comment + commentVersion: v2 + template: + metadata: + labels: + app: shop-comment + commentVersion: v2 + app-type: dubbo + spec: + containers: + - name: shop-comment + image: apache/dubbo-demo:dubbo-demo-comment_v2_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20888 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "commentVersion=v2; region=hangzhou;" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-user-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-user + template: + metadata: + labels: + app: shop-user + app-type: dubbo + spec: + containers: + - name: shop-user-gray + image: apache/dubbo-demo:dubbo-demo-user_gray_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20892 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "env=gray" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-order-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-order + orderVersion: v1 + template: + metadata: + labels: + app: shop-order + orderVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-order + image: apache/dubbo-demo:dubbo-demo-order_gray_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20891 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "env=gray" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-detail-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-detail + detailVersion: v1 + template: + metadata: + labels: + app: shop-detail + detailVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-detail + image: apache/dubbo-demo:dubbo-demo-detail_gray_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20890 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "env=gray" +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: shop-comment-v1-gray + namespace: dubbo-demo +spec: + replicas: 1 + selector: + matchLabels: + app: shop-comment + commentVersion: v1 + template: + metadata: + labels: + app: shop-comment + commentVersion: v1 + app-type: dubbo + spec: + containers: + - name: shop-comment + image: apache/dubbo-demo:dubbo-demo-comment_gray_0.0.2 + imagePullPolicy: Always + ports: + - name: dubbo + containerPort: 20889 + protocol: TCP + - name: dubbo-qos + containerPort: 22222 + protocol: TCP + env: + - name: JAVA_TOOL_OPTIONS + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 + - name: DUBBO_LABELS + value: "env=gray" diff --git a/10-task/dubbo-samples-shop/deploy/dubbo-system.yaml b/10-task/dubbo-samples-shop/deploy/dubbo-system.yaml new file mode 100644 index 0000000000..d792032021 --- /dev/null +++ b/10-task/dubbo-samples-shop/deploy/dubbo-system.yaml @@ -0,0 +1,122 @@ +# Namespace +apiVersion: v1 +kind: Namespace +metadata: + name: dubbo-system +--- +# Nacos +apiVersion: apps/v1 +kind: Deployment +metadata: + name: nacos + namespace: dubbo-system +spec: + replicas: 1 + selector: + matchLabels: + app: nacos + template: + metadata: + labels: + app: nacos + spec: + containers: + - name: consumer + image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/nacos:v2.1.2 + imagePullPolicy: Always + resources: + requests: + memory: "2Gi" + cpu: "500m" + ports: + - containerPort: 8848 + name: client + - containerPort: 9848 + name: client-rpc + env: + - name: NACOS_SERVER_PORT + value: "8848" + - name: NACOS_APPLICATION_PORT + value: "8848" + - name: PREFER_HOST_MODE + value: "hostname" + - name: MODE + value: "standalone" + - name: NACOS_AUTH_ENABLE + value: "true" +--- +apiVersion: v1 +kind: Service +metadata: + name: nacos + namespace: dubbo-system +spec: + type: LoadBalancer + sessionAffinity: None + selector: + app: nacos + ports: + - port: 8848 + name: server + targetPort: 8848 + - port: 9848 + name: client-rpc + targetPort: 9848 +--- +# Dubbo Admin +apiVersion: v1 +kind: ConfigMap +metadata: + name: dubbo-admin + namespace: dubbo-system +data: + # Set the properties you want to override, properties not set here will be using the default values + # check application.properties inside dubbo-admin project for the keys supported + application.properties: | + admin.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + admin.config-center=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + admin.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos +--- +apiVersion: apps/v1 +kind: Deployment +metadata: + name: dubbo-admin + namespace: dubbo-system + labels: + app: dubbo-admin +spec: + replicas: 1 + selector: + matchLabels: + app: dubbo-admin + template: + metadata: + labels: + app: dubbo-admin + spec: + containers: + - image: registry.cn-hangzhou.aliyuncs.com/robocanic-public/dubbo-admin:0.6.0 + name: dubbo-admin + ports: + - containerPort: 38080 + volumeMounts: + - mountPath: /config + name: application-properties + volumes: + - name: application-properties + configMap: + name: dubbo-admin +--- +apiVersion: v1 +kind: Service +metadata: + name: dubbo-admin + namespace: dubbo-system +spec: + type: LoadBalancer + selector: + app: dubbo-admin + ports: + - protocol: TCP + port: 38080 + targetPort: 38080 diff --git a/10-task/dubbo-samples-shop/deploy/frontend/Deployment.yml b/10-task/dubbo-samples-shop/deploy/frontend/Deployment.yml index e05809c734..952d7b140a 100644 --- a/10-task/dubbo-samples-shop/deploy/frontend/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/frontend/Deployment.yml @@ -27,38 +27,33 @@ spec: metadata: labels: app: shop-frontend + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-frontend - image: apache/dubbo-demo:dubbo-samples-shop-frontend_0.0.1 + image: apache/dubbo-demo:dubbo-demo-frontend_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20881 protocol: TCP - name: dubbo-qos - containerPort: 20991 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-frontend - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 diff --git a/10-task/dubbo-samples-shop/deploy/order-v1-gray/Deployment.yml b/10-task/dubbo-samples-shop/deploy/order-v1-gray/Deployment.yml index 464e458baa..ceb9bdc6ea 100644 --- a/10-task/dubbo-samples-shop/deploy/order-v1-gray/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/order-v1-gray/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-order-v1-gray namespace: dubbo-demo spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: shop-order @@ -29,40 +29,35 @@ spec: labels: app: shop-order orderVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_gray_0.0.1 + image: apache/dubbo-demo:dubbo-demo-order_gray_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20891 protocol: TCP - name: dubbo-qos - containerPort: 21001 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-order - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS value: "env=gray" diff --git a/10-task/dubbo-samples-shop/deploy/order-v1/Deployment.yml b/10-task/dubbo-samples-shop/deploy/order-v1/Deployment.yml index c26e39904d..e30979d586 100644 --- a/10-task/dubbo-samples-shop/deploy/order-v1/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/order-v1/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-order-v1 namespace: dubbo-demo spec: - replicas: 2 + replicas: 1 selector: matchLabels: app: shop-order @@ -29,40 +29,35 @@ spec: labels: app: shop-order orderVersion: v1 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_v1_0.0.1 + image: apache/dubbo-demo:dubbo-demo-order_v1_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20882 protocol: TCP - name: dubbo-qos - containerPort: 20992 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-order - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS - value: "orderVersion=v1" + value: "orderVersion=v1" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/order-v2/Deployment.yml b/10-task/dubbo-samples-shop/deploy/order-v2/Deployment.yml index 5c448d74c6..7b8fe24a85 100644 --- a/10-task/dubbo-samples-shop/deploy/order-v2/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/order-v2/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-order-v2 namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-order @@ -29,40 +29,35 @@ spec: labels: app: shop-order orderVersion: v2 + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-order - image: apache/dubbo-demo:dubbo-samples-shop-order_v2_0.0.1 + image: apache/dubbo-demo:dubbo-demo-order_v2_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20883 protocol: TCP - name: dubbo-qos - containerPort: 20993 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-order - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: >- + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS - value: "orderVersion=v2;" + value: "orderVersion=v2;" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/user-gray/Deployment.yml b/10-task/dubbo-samples-shop/deploy/user-gray/Deployment.yml index 5b074a2b19..43d887689e 100644 --- a/10-task/dubbo-samples-shop/deploy/user-gray/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/user-gray/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-user-gray namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-user @@ -27,40 +27,35 @@ spec: metadata: labels: app: shop-user + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-user-gray - image: apache/dubbo-demo:dubbo-samples-shop-user_gray_0.0.1 + image: apache/dubbo-demo:dubbo-demo-user_gray_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20892 protocol: TCP - name: dubbo-qos - containerPort: 21002 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-user - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 - name: DUBBO_LABELS - value: "env=gray" + value: "env=gray" \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/deploy/user/Deployment.yml b/10-task/dubbo-samples-shop/deploy/user/Deployment.yml index c2d75d3fdf..d4f6886a44 100644 --- a/10-task/dubbo-samples-shop/deploy/user/Deployment.yml +++ b/10-task/dubbo-samples-shop/deploy/user/Deployment.yml @@ -19,7 +19,7 @@ metadata: name: shop-user namespace: dubbo-demo spec: - replicas: 3 + replicas: 1 selector: matchLabels: app: shop-user @@ -27,38 +27,33 @@ spec: metadata: labels: app: shop-user + app-type: dubbo spec: - volumes: - - name: skywalking-agent - emptyDir: { } - - initContainers: - - name: agent-container - image: apache/skywalking-java-agent:8.13.0-java17 - volumeMounts: - - name: skywalking-agent - mountPath: /agent - command: [ "/bin/sh" ] - args: [ "-c", "cp -R /skywalking/agent /agent/" ] - containers: - name: shop-user - image: apache/dubbo-demo:dubbo-samples-shop-user_0.0.1 + image: apache/dubbo-demo:dubbo-demo-user_0.0.2 imagePullPolicy: Always ports: - name: dubbo containerPort: 20884 protocol: TCP - name: dubbo-qos - containerPort: 20994 + containerPort: 22222 protocol: TCP - volumeMounts: - - name: skywalking-agent - mountPath: /skywalking env: - name: JAVA_TOOL_OPTIONS - value: "-javaagent:/skywalking/agent/skywalking-agent.jar" - - name: SW_AGENT_NAME - value: shop::shop-user - - name: SW_AGENT_COLLECTOR_BACKEND_SERVICES - value: "skywalking-oap-server.dubbo-system.svc:11800" + value: + -Ddubbo.registry.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.config-center.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.metadata-report.address=nacos://nacos.dubbo-system.svc:8848?username=nacos&password=nacos + -Ddubbo.application.metadata-type=remote + -Ddubbo.application.qos-port=22222 + -Ddubbo.application.qos-anonymous-allow-commands=metrics + -Ddubbo.metrics.histogram.enabled=true + -Ddubbo.metrics.histogram.enabled-percentiles=true + -Ddubbo.metrics.enable-threadpool=true + -Ddubbo.metrics.enable-registry=true + -Ddubbo.metrics.enable-metadata=true + -Ddubbo.metrics.aggregation.enabled=true + -Ddubbo.tracing.enabled=true + -Ddubbo.tracing.tracing-exporter.otlp-config.endpoint=http://jaeger.dubbo-system.svc:4317 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-api/pom.xml index 305364f76b..c26580e608 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-api/pom.xml @@ -34,8 +34,8 @@ Dubbo Task - Shop - Comment's API - 1.8 - 1.8 + 17 + 17 UTF-8 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/pom.xml index 044b99c034..21d4a5339c 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-gray/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Comment Gray - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -63,6 +63,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -86,6 +98,12 @@ + + + alibaba-maven + https://maven.aliyun.com/repository/public + + @@ -102,7 +120,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-comment_gray_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-comment_gray_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/pom.xml index 5583c5e12c..6a3671ebc1 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v1/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Comment Version1 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -63,6 +63,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -102,7 +114,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-comment_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-comment_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/pom.xml index 49239f35b4..ed538ecb76 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-comment-v2/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Comment Version2 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -63,6 +63,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -102,7 +114,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-comment_v2_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-comment_v2_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-api/pom.xml index c147eeca8a..dfb403847f 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-api/pom.xml @@ -34,8 +34,8 @@ Dubbo Task - Shop - Detail's API - 1.8 - 1.8 + 17 + 17 UTF-8 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/pom.xml index 1e478add3a..2633466caf 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-gray/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Detail Gray - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -67,6 +67,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -106,7 +118,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-detail_gray_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-detail_gray_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/pom.xml index e32c0757ba..3f189c2b1f 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v1/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Detail Version1 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -60,6 +60,18 @@ ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -106,7 +118,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-detail_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-detail_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/pom.xml index f5bbd33ddd..002217146b 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-detail-v2/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Detail Version2 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -60,6 +60,18 @@ ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -106,7 +118,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-detail_v2_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-detail_v2_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend-api/pom.xml index 6b8325f79e..0b7154ab40 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend-api/pom.xml @@ -31,8 +31,8 @@ 0.0.1-SNAPSHOT - 1.8 - 1.8 + 17 + 17 UTF-8 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/pom.xml index efb4654477..d78ee97ea0 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - FrontEnd - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -79,6 +79,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -99,6 +111,12 @@ org.springframework.boot spring-boot-starter-web + + + org.springframework.boot + spring-boot-starter-actuator + + org.springframework.boot spring-boot-starter-freemarker @@ -127,7 +145,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-frontend_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-frontend_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/src/main/resources/application.properties b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/src/main/resources/application.properties index 9ab948ddfd..4fd9910991 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/src/main/resources/application.properties +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-frontend/src/main/resources/application.properties @@ -14,6 +14,7 @@ # limitations under the License. # Specify the application name of Dubbo +spring.application.name=shop-frontend dubbo.application.name=shop-frontend # Specify the QoS port diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-api/pom.xml index 4080b49159..cb31f81515 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-api/pom.xml @@ -34,8 +34,8 @@ Dubbo Task - Shop - Order's API - 1.8 - 1.8 + 17 + 17 UTF-8 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/pom.xml index d9b3c7bccd..1ebf62fe5b 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-gray/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Order - Gray - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -56,6 +56,18 @@ ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -102,7 +114,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-order_gray_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-order_gray_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/pom.xml index 9aed9964d4..723db897d1 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v1/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Order - Version 1 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -63,6 +63,18 @@ ${dubbo.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.springframework.boot spring-boot-starter @@ -102,7 +114,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-order_v1_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-order_v1_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/pom.xml index 40870b1d9f..30e1a9c0c8 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-order-v2/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - Order - Version 2 - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -61,6 +61,18 @@ ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -107,7 +119,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-order_v2_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-order_v2_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml index bf51abc30d..0339f986f8 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml @@ -34,8 +34,8 @@ Dubbo Task - Shop - User's API - 1.8 - 1.8 + 17 + 1==7 UTF-8 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/Dockerfile new file mode 100644 index 0000000000..0c6c894e97 --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/Dockerfile @@ -0,0 +1,9 @@ +#FROM maven:3.9.6-amazoncorretto-17 AS builder +#COPY . /appbuild +#WORKDIR /appbuild +# +#RUN mvn clean package -DskipTests -f pom.xml +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/pom.xml index d9a6e3facb..7b834491dd 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-gray/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - User Gray - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -56,6 +56,18 @@ ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -102,7 +114,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-user_gray_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-user_gray_0.0.2 diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user/Dockerfile b/10-task/dubbo-samples-shop/dubbo-samples-shop-user/Dockerfile new file mode 100644 index 0000000000..e0c5ba721a --- /dev/null +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user/Dockerfile @@ -0,0 +1,4 @@ +FROM openjdk:17-jdk-alpine +COPY ./target/*.jar /appruntime/app.jar +WORKDIR /appruntime +ENTRYPOINT ["java","-jar","/appruntime/app.jar"] \ No newline at end of file diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-user/pom.xml index 4edad6485a..f30ac92598 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-user/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user/pom.xml @@ -33,11 +33,11 @@ Dubbo Task - Shop - User - 1.8 - 1.8 + 17 + 17 UTF-8 - 3.3.1 + 3.2.16 2.2.0 @@ -49,13 +49,25 @@ ${project.version} - + com.alibaba.nacos nacos-client ${nacos.version} + + org.apache.dubbo + dubbo-spring-boot-tracing-otel-otlp-starter + ${dubbo.version} + + + + org.apache.dubbo + dubbo-spring-boot-observability-starter + ${dubbo.version} + + org.apache.dubbo @@ -74,6 +86,7 @@ + org.springframework.boot spring-boot-starter-log4j2 @@ -102,7 +115,7 @@ 3.2.1 - apache/dubbo-demo:dubbo-samples-shop-user_0.0.1 + apache/dubbo-demo:dubbo-samples-shop-user_0.0.2 From 9be8cb17ce9aaae38c46bffd869cfdca2e977413 Mon Sep 17 00:00:00 2001 From: Ken Liu Date: Tue, 1 Apr 2025 16:28:52 +0800 Subject: [PATCH 2/2] Update pom.xml --- 10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml index 0339f986f8..b018aad143 100644 --- a/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml +++ b/10-task/dubbo-samples-shop/dubbo-samples-shop-user-api/pom.xml @@ -35,7 +35,7 @@ 17 - 1==7 + 17 UTF-8