This is an automated email from the ASF dual-hosted git repository. wusheng pushed a commit to branch feature/add-remaining-e2e-tests in repository https://gitbox.apache.org/repos/asf/skywalking-graalvm-distro.git
commit 7480766365c5ef10b8536060a7dc8171b5421e95 Author: Wu Sheng <[email protected]> AuthorDate: Thu Mar 19 23:09:47 2026 +0800 Add 13 e2e test cases for infrastructure monitoring and TLS Add mTLS, RabbitMQ, RocketMQ, ActiveMQ, Pulsar, Kafka monitoring, Redis, MongoDB, Flink, AWS DynamoDB/S3/EKS/API Gateway e2e tests. All reuse upstream configs, case files, and expected data from the skywalking submodule. --- .github/workflows/ci.yml | 30 ++- changes/changes.md | 3 + test/e2e/cases/activemq/docker-compose.yml | 118 ++++++++++++ test/e2e/cases/activemq/e2e.yaml | 35 ++++ test/e2e/cases/aws-api-gateway/docker-compose.yml | 70 +++++++ test/e2e/cases/aws-api-gateway/e2e.yaml | 42 +++++ test/e2e/cases/aws-dynamodb/docker-compose.yml | 70 +++++++ test/e2e/cases/aws-dynamodb/e2e.yaml | 42 +++++ test/e2e/cases/aws-eks/docker-compose.yml | 70 +++++++ test/e2e/cases/aws-eks/e2e.yaml | 42 +++++ test/e2e/cases/aws-s3/docker-compose.yml | 70 +++++++ test/e2e/cases/aws-s3/e2e.yaml | 42 +++++ test/e2e/cases/flink/docker-compose.yml | 113 +++++++++++ test/e2e/cases/flink/e2e.yaml | 42 +++++ test/e2e/cases/kafka-monitoring/docker-compose.yml | 141 ++++++++++++++ test/e2e/cases/kafka-monitoring/e2e.yaml | 35 ++++ test/e2e/cases/mongodb/docker-compose.yml | 119 ++++++++++++ test/e2e/cases/mongodb/e2e.yaml | 35 ++++ test/e2e/cases/mtls/docker-compose.yml | 144 ++++++++++++++ test/e2e/cases/mtls/e2e.yaml | 45 +++++ test/e2e/cases/pulsar/docker-compose.yml | 156 +++++++++++++++ test/e2e/cases/pulsar/e2e.yaml | 35 ++++ test/e2e/cases/rabbitmq/docker-compose.yml | 210 +++++++++++++++++++++ test/e2e/cases/rabbitmq/e2e.yaml | 35 ++++ test/e2e/cases/redis/docker-compose.yml | 137 ++++++++++++++ test/e2e/cases/redis/e2e.yaml | 35 ++++ test/e2e/cases/rocketmq/docker-compose.yml | 135 +++++++++++++ test/e2e/cases/rocketmq/e2e.yaml | 35 ++++ 28 files changed, 2084 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d93dc6..137618c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -339,6 +339,32 @@ jobs: case: exporter - name: SSL case: ssl + - name: mTLS + case: mtls + - name: RabbitMQ + case: rabbitmq + - name: RocketMQ + case: rocketmq + - name: ActiveMQ + case: activemq + - name: Pulsar + case: pulsar + - name: Kafka Monitoring + case: kafka-monitoring + - name: Redis + case: redis + - name: MongoDB + case: mongodb + - name: Flink + case: flink + - name: AWS DynamoDB + case: aws-dynamodb + - name: AWS S3 + case: aws-s3 + - name: AWS EKS + case: aws-eks + - name: AWS API Gateway + case: aws-api-gateway - name: Self Observability case: so11y - name: MQE @@ -373,8 +399,8 @@ jobs: key: ${{ needs.init-skywalking.outputs.cache-key }} restore-keys: m2-skywalking- - - name: Build mock sender jar (baseline only) - if: matrix.test.case == 'baseline' + - name: Build mock sender jar + if: contains(fromJSON('["baseline","aws-dynamodb","aws-s3","aws-eks","aws-api-gateway"]'), matrix.test.case) run: | cd skywalking && ./mvnw -B -q \ -f test/e2e-v2/java-test-service/pom.xml \ diff --git a/changes/changes.md b/changes/changes.md index c2d7a5e..564aa6e 100644 --- a/changes/changes.md +++ b/changes/changes.md @@ -17,6 +17,9 @@ ### E2E Tests - Add SSL e2e test case (gRPC TLS with JDK SSL provider in native image). +- Add mTLS e2e test case (mutual TLS with client certificates). +- Add RabbitMQ, RocketMQ, ActiveMQ, Pulsar, Kafka, Redis, MongoDB, Flink monitoring e2e test cases (OTEL metrics collection). +- Add AWS DynamoDB, S3, EKS, API Gateway e2e test cases (mock sender metrics). - Add Auth e2e test case (token-based agent-to-OAP authentication). - Add OTLP Traces e2e test case (OpenTelemetry trace ingestion via Zipkin API). - Add Virtual MQ e2e test case (Kafka-instrumented virtual MQ layer metrics). diff --git a/test/e2e/cases/activemq/docker-compose.yml b/test/e2e/cases/activemq/docker-compose.yml new file mode 100644 index 0000000..6b395bc --- /dev/null +++ b/test/e2e/cases/activemq/docker-compose.yml @@ -0,0 +1,118 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + amq: + image: apache/activemq-classic:6.0.1 + hostname: amq + ports: + - "61616:61616" + - "8161:8161" + expose: + - 1616 + volumes: + - ../../../../skywalking/test/e2e-v2/cases/activemq/config/amq/activemq.xml:/opt/apache-activemq/conf/activemq.xml + environment: + ACTIVEMQ_SUNJMX_START: "-Dcom.sun.management.jmxremote.port=1616 -Dcom.sun.management.jmxremote.rmi.port=1616 -Dcom.sun.management.jmxremote.ssl=false -Dcom.sun.management.jmxremote.authenticate=false" + ACTIVEMQ_BROKER_NAME: activemq-broker + healthcheck: + test: [ "CMD-SHELL", "curl --silent --fail localhost:8161 || exit 1" ] + interval: 15s + timeout: 10s + retries: 120 + networks: + - e2e + + amqexporter: + image: bitnamilegacy/jmx-exporter:0.20.0 + hostname: amqexporter + volumes: + - ../../../../skywalking/test/e2e-v2/cases/activemq/config/amq/config.yaml:/opt/bitnami/jmx-exporter/example_configs/httpserver_sample_config.yml + expose: + - 5556 + depends_on: + - amq + networks: + - e2e + + amq-consumer-mock: + image: apache/activemq-classic:6.0.1 + hostname: amq-consumer-mock + entrypoint: bash + command: + - -c + - "/opt/apache-activemq/bin/activemq consumer --brokerUrl tcp://amq:61616 --destination queue://testQueue --messageCount 10 --parallelThreads 2 && /opt/apache-activemq/bin/activemq consumer --brokerUrl tcp://amq:61616 --destination topic://testTopic --messageCount 10 --parallelThreads 2" + depends_on: + amq: + condition: service_healthy + networks: + - e2e + + amq-producer-mock: + image: apache/activemq-classic:6.0.1 + hostname: amq-producer-mock + entrypoint: bash + command: + - -c + - "/opt/apache-activemq/bin/activemq producer --brokerUrl tcp://amq:61616 --destination queue://testQueue --messageCount 50 --persistent true --message hello && /opt/apache-activemq/bin/activemq producer --brokerUrl tcp://amq:61616 --destination topic://testTopic --messageCount 50 --persistent true --message world" + depends_on: + - amq-consumer-mock + networks: + - e2e + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/activemq/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/activemq/e2e.yaml b/test/e2e/cases/activemq/e2e.yaml new file mode 100644 index 0000000..4902c44 --- /dev/null +++ b/test/e2e/cases/activemq/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/activemq/activemq-cases.yaml diff --git a/test/e2e/cases/aws-api-gateway/docker-compose.yml b/test/e2e/cases/aws-api-gateway/docker-compose.yml new file mode 100644 index 0000000..23b2d78 --- /dev/null +++ b/test/e2e/cases/aws-api-gateway/docker-compose.yml @@ -0,0 +1,70 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + sender: + image: "eclipse-temurin:8-jre" + volumes: + - ../../../../skywalking/test/e2e-v2/java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar + - ../../../../skywalking/test/e2e-v2/cases/aws/api-gateway/mock-data:/data/otel-metrics + command: ["java", "-jar", "/e2e-mock-sender-2.0.0.jar"] + environment: + OAP_HOST: oap + OAP_GRPC_PORT: 11800 + OTEL_METRICS_DATA_PATH: /data/otel-metrics + networks: + - e2e + ports: + - 9093 + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 9093"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/aws-api-gateway/e2e.yaml b/test/e2e/cases/aws-api-gateway/e2e.yaml new file mode 100644 index 0000000..abf0a5a --- /dev/null +++ b/test/e2e/cases/aws-api-gateway/e2e.yaml @@ -0,0 +1,42 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://localhost:9093/otel-metrics/send + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/aws/api-gateway/gateway-cases.yaml diff --git a/test/e2e/cases/aws-dynamodb/docker-compose.yml b/test/e2e/cases/aws-dynamodb/docker-compose.yml new file mode 100644 index 0000000..80d3f3d --- /dev/null +++ b/test/e2e/cases/aws-dynamodb/docker-compose.yml @@ -0,0 +1,70 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + sender: + image: "eclipse-temurin:8-jre" + volumes: + - ../../../../skywalking/test/e2e-v2/java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar + - ../../../../skywalking/test/e2e-v2/cases/aws/dynamodb/mock-data:/data/otel-metrics + command: ["java", "-jar", "/e2e-mock-sender-2.0.0.jar"] + environment: + OAP_HOST: oap + OAP_GRPC_PORT: 11800 + OTEL_METRICS_DATA_PATH: /data/otel-metrics + networks: + - e2e + ports: + - 9093 + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 9093"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/aws-dynamodb/e2e.yaml b/test/e2e/cases/aws-dynamodb/e2e.yaml new file mode 100644 index 0000000..001be1a --- /dev/null +++ b/test/e2e/cases/aws-dynamodb/e2e.yaml @@ -0,0 +1,42 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://localhost:9093/otel-metrics/send + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/aws/dynamodb/dynamodb-cases.yaml diff --git a/test/e2e/cases/aws-eks/docker-compose.yml b/test/e2e/cases/aws-eks/docker-compose.yml new file mode 100644 index 0000000..63882ba --- /dev/null +++ b/test/e2e/cases/aws-eks/docker-compose.yml @@ -0,0 +1,70 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + sender: + image: "eclipse-temurin:8-jre" + volumes: + - ../../../../skywalking/test/e2e-v2/java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar + - ../../../../skywalking/test/e2e-v2/cases/aws/eks/mock-data:/data/otel-metrics + command: ["java", "-jar", "/e2e-mock-sender-2.0.0.jar"] + environment: + OAP_HOST: oap + OAP_GRPC_PORT: 11800 + OTEL_METRICS_DATA_PATH: /data/otel-metrics + networks: + - e2e + ports: + - 9093 + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 9093"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/aws-eks/e2e.yaml b/test/e2e/cases/aws-eks/e2e.yaml new file mode 100644 index 0000000..f260a87 --- /dev/null +++ b/test/e2e/cases/aws-eks/e2e.yaml @@ -0,0 +1,42 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://localhost:9093/otel-metrics/send + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/aws/eks/eks-cases.yaml diff --git a/test/e2e/cases/aws-s3/docker-compose.yml b/test/e2e/cases/aws-s3/docker-compose.yml new file mode 100644 index 0000000..4c72fe5 --- /dev/null +++ b/test/e2e/cases/aws-s3/docker-compose.yml @@ -0,0 +1,70 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + sender: + image: "eclipse-temurin:8-jre" + volumes: + - ../../../../skywalking/test/e2e-v2/java-test-service/e2e-mock-sender/target/e2e-mock-sender-2.0.0.jar:/e2e-mock-sender-2.0.0.jar + - ../../../../skywalking/test/e2e-v2/cases/aws/s3/mock-data:/data/otel-metrics + command: ["java", "-jar", "/e2e-mock-sender-2.0.0.jar"] + environment: + OAP_HOST: oap + OAP_GRPC_PORT: 11800 + OTEL_METRICS_DATA_PATH: /data/otel-metrics + networks: + - e2e + ports: + - 9093 + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 9093"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/aws-s3/e2e.yaml b/test/e2e/cases/aws-s3/e2e.yaml new file mode 100644 index 0000000..b2310d3 --- /dev/null +++ b/test/e2e/cases/aws-s3/e2e.yaml @@ -0,0 +1,42 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://localhost:9093/otel-metrics/send + method: GET + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/aws/s3/s3-cases.yaml diff --git a/test/e2e/cases/flink/docker-compose.yml b/test/e2e/cases/flink/docker-compose.yml new file mode 100644 index 0000000..92f976f --- /dev/null +++ b/test/e2e/cases/flink/docker-compose.yml @@ -0,0 +1,113 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + jobmanager: + image: flink:2.0-preview1 + environment: + - | + FLINK_PROPERTIES= + jobmanager.rpc.address: jobmanager + metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory + metrics.reporter.prom.port: 9260 + ports: + - "8081:8081" + - "9260:9260" + command: jobmanager + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:8081"] + interval: 30s + timeout: 10s + retries: 3 + networks: + - e2e + + taskmanager: + image: flink:2.0-preview1 + environment: + - | + FLINK_PROPERTIES= + jobmanager.rpc.address: jobmanager + metrics.reporter.prom.factory.class: org.apache.flink.metrics.prometheus.PrometheusReporterFactory + metrics.reporter.prom.port: 9261 + depends_on: + jobmanager: + condition: service_healthy + ports: + - "9261:9261" + command: taskmanager + healthcheck: + test: ["CMD", "curl", "-f", "http://localhost:9261/metrics"] + interval: 30s + timeout: 10s + retries: 3 + networks: + - e2e + + executeJob: + image: flink:2.0-preview1 + depends_on: + taskmanager: + condition: service_healthy + command: > + bash -c " + ./bin/flink run -m jobmanager:8081 examples/streaming/WindowJoin.jar" + networks: + - e2e + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/flink/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/flink/e2e.yaml b/test/e2e/cases/flink/e2e.yaml new file mode 100644 index 0000000..91b06db --- /dev/null +++ b/test/e2e/cases/flink/e2e.yaml @@ -0,0 +1,42 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${jobmanager_host}:${jobmanager_9260}/metrics + method: GET + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/flink/flink-cases.yaml diff --git a/test/e2e/cases/kafka-monitoring/docker-compose.yml b/test/e2e/cases/kafka-monitoring/docker-compose.yml new file mode 100644 index 0000000..d77fb26 --- /dev/null +++ b/test/e2e/cases/kafka-monitoring/docker-compose.yml @@ -0,0 +1,141 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + zookeeper: + image: zookeeper:3.4 + expose: + - 2181 + networks: + - e2e + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + healthcheck: + test: ["CMD", "sh", "-c", "nc -nz 127.0.0.1 2181"] + interval: 5s + timeout: 60s + retries: 120 + + broker1: + build: + context: ../../../../skywalking/test/e2e-v2/cases/kafka/kafka-monitoring + expose: + - 9092 + - 7071 + networks: + - e2e + environment: + - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 + - ALLOW_PLAINTEXT_LISTENER=yes + - KAFKA_OPTS=-javaagent:/etc/jmx_prometheus_javaagent-0.18.0.jar=7071:/etc/kafka-2_0_0.yml + depends_on: + zookeeper: + condition: service_healthy + healthcheck: + test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"] + interval: 5s + timeout: 60s + retries: 120 + + broker2: + build: + context: ../../../../skywalking/test/e2e-v2/cases/kafka/kafka-monitoring + expose: + - 9093 + - 7072 + networks: + - e2e + environment: + - KAFKA_CFG_ZOOKEEPER_CONNECT=zookeeper:2181 + - ALLOW_PLAINTEXT_LISTENER=yes + - KAFKA_OPTS=-javaagent:/etc/jmx_prometheus_javaagent-0.18.0.jar=7072:/etc/kafka-2_0_0.yml + depends_on: + zookeeper: + condition: service_healthy + healthcheck: + test: ["CMD", "kafka-topics.sh", "--list", "--zookeeper", "zookeeper:2181"] + interval: 5s + timeout: 60s + retries: 120 + + kafka-producer-perf-test: + image: bitnamilegacy/kafka:2.4.1 + networks: + - e2e + depends_on: + - broker1 + - broker2 + command: + - bash + - -c + - > + kafka-producer-perf-test.sh --topic perftest --num-records 100000 --record-size 100 --throughput 500 --producer-props bootstrap.servers=broker1:9092,broker2:9093 + + kafka-consumer-perf-test: + image: bitnamilegacy/kafka:2.4.1 + networks: + - e2e + depends_on: + - kafka-producer-perf-test + command: + - bash + - -c + - > + kafka-consumer-perf-test.sh --broker-list broker1:9092,broker2:9093 --topic perftest --messages 100000 + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: ["--config=/etc/otel-collector-config.yaml"] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/kafka/kafka-monitoring/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + - broker1 + - broker2 + +networks: + e2e: diff --git a/test/e2e/cases/kafka-monitoring/e2e.yaml b/test/e2e/cases/kafka-monitoring/e2e.yaml new file mode 100644 index 0000000..e832f7e --- /dev/null +++ b/test/e2e/cases/kafka-monitoring/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 20 + interval: 10s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/kafka/kafka-monitoring/kafka-cases.yaml diff --git a/test/e2e/cases/mongodb/docker-compose.yml b/test/e2e/cases/mongodb/docker-compose.yml new file mode 100644 index 0000000..09baa52 --- /dev/null +++ b/test/e2e/cases/mongodb/docker-compose.yml @@ -0,0 +1,119 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + mongodb-1: &mongodb + image: mongo:6.0.8 + networks: + - e2e + command: mongod --replSet rs1 --shardsvr --port 27017 + healthcheck: + test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/27017" ] + interval: 10s + timeout: 10s + retries: 120 + mongodb-2: *mongodb + mongodb-repl-setup: + image: mongo:6.0.8 + networks: + - e2e + depends_on: + mongodb-1: + condition: service_healthy + mongodb-2: + condition: service_healthy + volumes: + - ../../../../skywalking/test/e2e-v2/cases/mongodb/setup.sh:/setup.sh + entrypoint: [ "bash", "/setup.sh" ] + mongodb-exporter-1: + image: percona/mongodb_exporter:0.39 + expose: + - 9216 + networks: + - e2e + depends_on: + mongodb-1: + condition: service_healthy + command: + - '--mongodb.uri=mongodb://mongodb-1:27017' + - '--discovering-mode' + - '--compatible-mode' + - '--collector.dbstats' + - '--collector.diagnosticdata' + - '--collector.replicasetstatus' + mongodb-exporter-2: + image: percona/mongodb_exporter:0.39 + expose: + - 9216 + networks: + - e2e + depends_on: + mongodb-2: + condition: service_healthy + command: + - '--mongodb.uri=mongodb://mongodb-2:27017' + - '--discovering-mode' + - '--compatible-mode' + - '--collector.dbstats' + - '--collector.diagnosticdata' + - '--collector.replicasetstatus' + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/mongodb/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + mongodb-exporter-1: + condition: service_started + mongodb-exporter-2: + condition: service_started + +networks: + e2e: diff --git a/test/e2e/cases/mongodb/e2e.yaml b/test/e2e/cases/mongodb/e2e.yaml new file mode 100644 index 0000000..a0c9dca --- /dev/null +++ b/test/e2e/cases/mongodb/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/mongodb/mongodb-cases.yaml diff --git a/test/e2e/cases/mtls/docker-compose.yml b/test/e2e/cases/mtls/docker-compose.yml new file mode 100644 index 0000000..d34509f --- /dev/null +++ b/test/e2e/cases/mtls/docker-compose.yml @@ -0,0 +1,144 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + volumes: + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/server:/skywalking/certs + expose: + - 11800 + - 12800 + - 11811 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + SW_RECEIVER_GRPC_PORT: 11811 + SW_RECEIVER_GRPC_SSL_ENABLED: "true" + SW_RECEIVER_GRPC_SSL_KEY_PATH: /skywalking/certs/server.pem + SW_RECEIVER_GRPC_SSL_CERT_CHAIN_PATH: /skywalking/certs/server.crt + SW_RECEIVER_GRPC_SSL_TRUSTED_CAS_PATH: /skywalking/certs/ca.crt + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + # Init containers: copy pre-built service JARs into a shared volume + provider-jar: + image: "ghcr.io/apache/skywalking/e2e-service-provider:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + consumer-jar: + image: "ghcr.io/apache/skywalking/e2e-service-consumer:${SW_E2E_SERVICE_COMMIT}" + entrypoint: ["cp", "/app.jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + networks: + - e2e + + provider: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_provider.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/client:/skywalking/agent/certs + networks: + - e2e + expose: + - 9090 + ports: + - 9090 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + SW_AGENT_SSL_KEY_PATH: /certs/client.pem + SW_AGENT_SSL_CERT_CHAIN_PATH: /certs/client.crt + SW_AGENT_SSL_TRUSTED_CA_PATH: /certs/ca.crt + SW_LOGGING_OUTPUT: CONSOLE + SW_AGENT_NAME: e2e-service-provider + SW_AGENT_INSTANCE_NAME: provider1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + oap: + condition: service_healthy + provider-jar: + condition: service_completed_successfully + + consumer: + image: "ghcr.io/apache/skywalking-java/skywalking-java:${SW_AGENT_JAVA_COMMIT}-java${SW_AGENT_JDK_VERSION}" + command: ["java", "-jar", "/jars/services_consumer.jar"] + volumes: + - service-jars:/jars + - ../../../../skywalking/test/e2e-v2/cases/simple/mtls/client:/skywalking/agent/certs + networks: + - e2e + expose: + - 9092 + ports: + - 9092 + environment: + SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11811 + SW_AGENT_SSL_KEY_PATH: /certs/client.pem + SW_AGENT_SSL_CERT_CHAIN_PATH: /certs/client.crt + SW_AGENT_SSL_TRUSTED_CA_PATH: /certs/ca.crt + SW_LOGGING_OUTPUT: CONSOLE + PROVIDER_URL: http://provider:9090 + SW_AGENT_NAME: e2e-service-consumer + SW_AGENT_INSTANCE_NAME: consumer1 + SW_AGENT_COLLECTOR_GET_PROFILE_TASK_INTERVAL: 1 + SW_AGENT_COLLECTOR_GET_AGENT_DYNAMIC_CONFIG_INTERVAL: 1 + SW_METER_ACTIVE: 'false' + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9092"] + interval: 5s + timeout: 60s + retries: 120 + depends_on: + provider: + condition: service_healthy + consumer-jar: + condition: service_completed_successfully + +volumes: + service-jars: + +networks: + e2e: diff --git a/test/e2e/cases/mtls/e2e.yaml b/test/e2e/cases/mtls/e2e.yaml new file mode 100644 index 0000000..3d881d8 --- /dev/null +++ b/test/e2e/cases/mtls/e2e.yaml @@ -0,0 +1,45 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +trigger: + action: http + interval: 3s + times: -1 + url: http://${consumer_host}:${consumer_9092}/users + method: POST + body: '{"id":"123","name":"skywalking"}' + headers: + "Content-Type": "application/json" + +verify: + retry: + count: 20 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/simple/simple-cases.yaml diff --git a/test/e2e/cases/pulsar/docker-compose.yml b/test/e2e/cases/pulsar/docker-compose.yml new file mode 100644 index 0000000..8097a3d --- /dev/null +++ b/test/e2e/cases/pulsar/docker-compose.yml @@ -0,0 +1,156 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + # Start zookeeper + zookeeper: + image: zookeeper:3.9.1 + expose: + - 2181 + networks: + - e2e + environment: + - ALLOW_ANONYMOUS_LOGIN=yes + healthcheck: + test: ["CMD", "nc", "-nz", "127.0.0.1", "2181"] + interval: 15s + timeout: 10s + retries: 120 + + # Start bookie + bookie: + image: apachepulsar/pulsar:3.1.1 + restart: on-failure + hostname: bookie + networks: + - e2e + environment: + - clusterName=pulsar-cluster + - zkServers=zookeeper:2181 + - metadataServiceUri=metadata-store:zk:zookeeper:2181 + - advertisedAddress=bookie + - BOOKIE_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=256m + - allowLoopback=true + depends_on: + zookeeper: + condition: service_healthy + expose: + - 8000 + ports: + - "8000:8000" + command: bash -c "bin/apply-config-from-env.py conf/bookkeeper.conf && exec bin/pulsar bookie" + healthcheck: + test: ["CMD", "nc", "-nz", "127.0.0.1", "8000"] + interval: 15s + timeout: 10s + retries: 120 + + # Start broker + broker: + image: apachepulsar/pulsar:3.1.1 + restart: on-failure + hostname: broker + networks: + - e2e + environment: + - metadataStoreUrl=zk:zookeeper:2181 + - zookeeperServers=zookeeper:2181 + - clusterName=pulsar-cluster + - managedLedgerDefaultEnsembleSize=1 + - managedLedgerDefaultWriteQuorum=1 + - managedLedgerDefaultAckQuorum=1 + - advertisedAddress=broker + - advertisedListeners=external:pulsar://127.0.0.1:6650 + - PULSAR_MEM=-Xms512m -Xmx512m -XX:MaxDirectMemorySize=256m + depends_on: + zookeeper: + condition: service_healthy + expose: + - 8080 + - 6650 + ports: + - "6650:6650" + - "8080:8080" + command: bash -c "bin/pulsar initialize-cluster-metadata --cluster pulsar-cluster --zookeeper zookeeper:2181 --configuration-store zookeeper:2181 --web-service-url http://broker:8080 --broker-service-url pulsar://broker:6650 && bin/apply-config-from-env.py conf/broker.conf && exec bin/pulsar broker" + healthcheck: + test: ["CMD", "nc", "-nz", "127.0.0.1", "8080"] + interval: 15s + timeout: 10s + retries: 120 + + consume-perf: + image: apachepulsar/pulsar:3.1.1 + networks: + - e2e + depends_on: + broker: + condition: service_healthy + command: bash -c "bin/pulsar-perf consume -m 100000 my-topic" + + produce-perf: + image: apachepulsar/pulsar:3.1.1 + networks: + - e2e + depends_on: + broker: + condition: service_healthy + consume-perf: + condition: service_started + command: bash -c "bin/pulsar-perf produce -m 100000 my-topic" + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/pulsar/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/pulsar/e2e.yaml b/test/e2e/cases/pulsar/e2e.yaml new file mode 100644 index 0000000..eada6ba --- /dev/null +++ b/test/e2e/cases/pulsar/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/pulsar/pulsar-cases.yaml diff --git a/test/e2e/cases/rabbitmq/docker-compose.yml b/test/e2e/cases/rabbitmq/docker-compose.yml new file mode 100644 index 0000000..2e9c49d --- /dev/null +++ b/test/e2e/cases/rabbitmq/docker-compose.yml @@ -0,0 +1,210 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + rmq0: &rabbitmq + image: rabbitmq:3.11.14-management + networks: + - "e2e" + ports: + - "15673:15672" + - "15693:15692" + cap_add: + - ALL + hostname: rmq0 + environment: + RABBITMQ_ERLANG_COOKIE: rabbitmq-prometheus + volumes: + - ../../../../skywalking/test/e2e-v2/cases/rabbitmq/rabbitmq-overview.conf:/etc/rabbitmq/rabbitmq.conf:ro + - ../../../../skywalking/test/e2e-v2/cases/rabbitmq/rabbitmq-overview-definitions.json:/etc/rabbitmq/rabbitmq-definitions.json:ro + ulimits: + nofile: + soft: 2000 + hard: 2000 + rmq1: + <<: *rabbitmq + hostname: rmq1 + ports: + - "15674:15672" + - "15694:15692" + rmq2: + <<: *rabbitmq + hostname: rmq2 + ports: + - "15675:15672" + - "15695:15692" + + # The following services are used for mocking test data + basic-get: + image: &perf-test-image pivotalrabbitmq/perf-test:2.15.0-ubuntu + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq0:5672/%2f" + QUEUE: basic-get + ROUTING_KEY: basic-get + VARIABLE_RATE: "1:1,0:30" + POLLING: "true" + POLLING_INTERVAL: 5000 + AUTOACK: "false" + SERVERS_STARTUP_TIMEOUT: &startup_timeout 60 + METRICS_PROMETHEUS: "true" + basic-get-auto: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq0:5672/%2f" + QUEUE: basic-get + ROUTING_KEY: basic-get + PRODUCERS: 0 + POLLING: "true" + POLLING_INTERVAL: 5000 + AUTOACK: "true" + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + greedy-consumer: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq0:5672/%2f" + QUEUE: greedy-consumer + ROUTING_KEY: greedy-consumer + VARIABLE_RATE: "100:20,0:20" + CONSUMER_RATE: 50 + QOS: 2000 + AUTOACK: "false" + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + publisher-confirms: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq1:5672/%2f" + QUEUE: publisher-confirms + ROUTING_KEY: publisher-confirms + AUTOACK: "true" + VARIABLE_RATE: "12:30,25:30,50:30,100:30" + CONFIRM: 1 + CONFIRM_TIMEOUT: 1 + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + slow-consumer-persistent: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq1:5672/%2f" + QUEUE: ha3-slow-consumer-persistent + ROUTING_KEY: slow-consumer-persistent + QUEUE_ARGS: x-max-length=10000 + FLAG: persistent + AUTO_DELETE: "false" + SIZE: 51200 + VARIABLE_RATE: "100:20,0:20" + CONSUMER_RATE: 50 + QOS: 50 + AUTOACK: "false" + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + nack: + image: *perf-test-image + networks: + - "e2e" + entrypoint: [] + command: /bin/bash -c "while true; do bin/runjava com.rabbitmq.perf.PerfTest; sleep 10; done" + environment: + TIME: 60 + URI: "amqp://guest:guest@rmq2:5672/%2f" + VARIABLE_RATE: "1:10,0:20" + QUEUE: nack + QUEUE_ARGS: x-max-length=100 + ROUTING_KEY: nack + AUTOACK: "false" + NACK: "true" + QOS: 5 + CONSUMER_LATENCY: 3000000 + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + unroutable-return: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq2:5672/%2f" + VARIABLE_RATE: "2:30,4:30,10:30" + VARIABLE_SIZE: "100:30,200:30" + CONSUMERS: 0 + FLAG: mandatory + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + unroutable-drop: + image: *perf-test-image + networks: + - "e2e" + environment: + URI: "amqp://guest:guest@rmq2:5672/%2f" + VARIABLE_RATE: "5:30,10:30,20:30" + VARIABLE_SIZE: "100:30,200:30" + CONSUMERS: 0 + SERVERS_STARTUP_TIMEOUT: *startup_timeout + METRICS_PROMETHEUS: "true" + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/rabbitmq/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/rabbitmq/e2e.yaml b/test/e2e/cases/rabbitmq/e2e.yaml new file mode 100644 index 0000000..748989f --- /dev/null +++ b/test/e2e/cases/rabbitmq/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/rabbitmq/rabbitmq-cases.yaml diff --git a/test/e2e/cases/redis/docker-compose.yml b/test/e2e/cases/redis/docker-compose.yml new file mode 100644 index 0000000..71b6172 --- /dev/null +++ b/test/e2e/cases/redis/docker-compose.yml @@ -0,0 +1,137 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + TZ: Asia/Shanghai + SW_CORE_TOPN_REPORT_PERIOD: 2 + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + redis_1: &redis + image: redis:6.0 + networks: + - e2e + volumes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/redis.conf:/etc/redis/redis.conf + ports: + - 6379 + command: + redis-server /etc/redis/redis.conf + healthcheck: + test: ["CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/6379"] + interval: 5s + timeout: 60s + retries: 120 + redis_2: + <<: *redis + redis_3: + <<: *redis + + redis_mock: + <<: *redis + volumes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/redis.conf:/etc/redis/redis.conf + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/mock.txt:/etc/redis/mock.txt + depends_on: + - otel-collector + - redis_1 + - redis_exporter_1 + entrypoint: bash + command: + - -c + - "cat /etc/redis/mock.txt | redis-cli -h redis_1 -p 6379 && redis-server /etc/redis/redis.conf " + + redis_exporter_1: &redis_exporter + image: oliver006/redis_exporter:v1.48.0-alpine + networks: + - e2e + ports: + - 9121 + environment: + - REDIS_ADDR=redis_1:6379 + redis_exporter_2: + <<: *redis_exporter + ports: + - 9121 + environment: + - REDIS_ADDR=redis_2:6379 + redis_exporter_3: + <<: *redis_exporter + environment: + - REDIS_ADDR=redis_3:6379 + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: ["--config=/etc/otel-collector-config.yaml"] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + + fluentbit: + image: fluent/fluent-bit:1.9 + environment: + - TZ=Asia/Shanghai + volumes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/scripts:/scripts + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/fluent-bit.conf:/fluent-bit/etc/fluent-bit.conf + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/fluent-bit-parser.conf:/fluent-bit/etc/fluent-bit-parser.conf + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/fluent-bit-script.lua:/fluent-bit/etc/fluent-bit-script.lua + networks: + - e2e + depends_on: + - slowlog + + slowlog: + image: redis:6.0 + volumes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-exporter/scripts:/scripts + networks: + - e2e + command: sh -c "chmod 777 /scripts/start.sh /scripts/slowlog.sh /scripts/slowlog.log && /scripts/start.sh" + +networks: + e2e: diff --git a/test/e2e/cases/redis/e2e.yaml b/test/e2e/cases/redis/e2e.yaml new file mode 100644 index 0000000..b4e7f94 --- /dev/null +++ b/test/e2e/cases/redis/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/redis/redis-cases.yaml diff --git a/test/e2e/cases/rocketmq/docker-compose.yml b/test/e2e/cases/rocketmq/docker-compose.yml new file mode 100644 index 0000000..5a8d28b --- /dev/null +++ b/test/e2e/cases/rocketmq/docker-compose.yml @@ -0,0 +1,135 @@ +# 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. + +services: + banyandb: + extends: + file: ../../../../skywalking/test/e2e-v2/script/docker-compose/base-compose.yml + service: banyandb + ports: + - 17912 + + oap: + image: skywalking-oap-native:latest + expose: + - 11800 + - 12800 + networks: + - e2e + ports: + - 12800 + environment: + SW_HEALTH_CHECKER: default + SW_STORAGE_BANYANDB_TARGETS: banyandb:17912 + SW_CONFIGURATION: none + depends_on: + banyandb: + condition: service_healthy + healthcheck: + test: ["CMD-SHELL", "nc -nz 127.0.0.1 11800 || exit 1"] + interval: 5s + timeout: 60s + retries: 120 + + rocketmq-namesrv-1: + image: apache/rocketmq:4.9.4 + hostname: rocketmq-namesrv-1 + ports: + - "9876:9876" + environment: + TZ: Asia/Shanghai + command: sh mqnamesrv + healthcheck: + test: [ "CMD", "nc", "-nz", "127.0.0.1", "9876" ] + interval: 15s + timeout: 10s + retries: 120 + networks: + - e2e + + rocketmq-broker-1: + image: apache/rocketmq:4.9.4 + hostname: rocketmq-broker-1 + ports: + - "10911:10911" + - "10909:10909" + environment: + TZ: Asia/Shanghai + NAMESRV_ADDR: "rocketmq-namesrv-1:9876" + command: sh mqbroker + healthcheck: + test: [ "CMD", "nc", "-nz", "127.0.0.1", "10911" ] + interval: 15s + timeout: 10s + retries: 120 + depends_on: + rocketmq-namesrv-1: + condition: service_healthy + networks: + - e2e + + rocketmq-producer-perf-test: + image: apache/rocketmq:4.9.4 + hostname: rocketmq-producer-perf-test + environment: + TZ: Asia/Shanghai + NAMESRV_ADDR: "rocketmq-namesrv-1:9876" + command: sh tools.sh org.apache.rocketmq.example.quickstart.Producer + depends_on: + rocketmq-broker-1: + condition: service_healthy + networks: + - e2e + + rocketmq-consumer-perf-test: + image: apache/rocketmq:4.9.4 + hostname: rocketmq-consumer-perf-test + environment: + TZ: Asia/Shanghai + NAMESRV_ADDR: "rocketmq-namesrv-1:9876" + command: sh tools.sh org.apache.rocketmq.example.quickstart.Consumer + depends_on: + - rocketmq-producer-perf-test + networks: + - e2e + + rocketmq-exporter: + image: apache/rocketmq-exporter:0.0.2 + hostname: rocketmq-exporter + ports: + - "5557:5557" + environment: + TZ: Asia/Shanghai + rocketmq.config.namesrvAddr: "rocketmq-namesrv-1:9876" + depends_on: + - rocketmq-consumer-perf-test + networks: + - e2e + + otel-collector: + image: otel/opentelemetry-collector:${OTEL_COLLECTOR_VERSION} + networks: + - e2e + command: [ "--config=/etc/otel-collector-config.yaml" ] + volumes: + - ../../../../skywalking/test/e2e-v2/cases/rocketmq/otel-collector-config.yaml:/etc/otel-collector-config.yaml + expose: + - 55678 + depends_on: + oap: + condition: service_healthy + +networks: + e2e: diff --git a/test/e2e/cases/rocketmq/e2e.yaml b/test/e2e/cases/rocketmq/e2e.yaml new file mode 100644 index 0000000..049e8b7 --- /dev/null +++ b/test/e2e/cases/rocketmq/e2e.yaml @@ -0,0 +1,35 @@ +# 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. + +setup: + env: compose + file: docker-compose.yml + timeout: 20m + init-system-environment: ../../script/env + steps: + - name: set PATH + command: export PATH=/tmp/skywalking-infra-e2e/bin:$PATH + - name: install yq + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh yq + - name: install swctl + command: bash skywalking/test/e2e-v2/script/prepare/setup-e2e-shell/install.sh swctl + +verify: + retry: + count: 60 + interval: 3s + cases: + - includes: + - ../../../../skywalking/test/e2e-v2/cases/rocketmq/rocketmq-cases.yaml
