blob: 62a3f257093cacdb343a8a7ab570030d9c0020c3 [file] [log] [blame]
# 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:
# The following services are inherited by three protocols for testing
oap:
image: ghcr.io/apache/skywalking/oap:${SW_OAP_COMMIT}
# Python agent supports gRPC/ HTTP/ Kafka reporting
expose:
- 11800 # gRPC
- 12800 # HTTP
networks:
- e2e
healthcheck: # python base image has no nc command
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/11800" ]
interval: 5s
timeout: 60s
retries: 120
fastapi-provider:
# Previously built in CI
image: apache/skywalking-python-agent:latest-e2e
expose:
- 9090
networks:
- e2e
environment:
SW_AGENT_NAME: e2e-service-provider
SW_AGENT_INSTANCE_NAME: provider
SW_AGENT_LOGGING_LEVEL: DEBUG
SW_AGENT_LOG_REPORTER_ACTIVE: "True"
SW_AGENT_LOG_REPORTER_LEVEL: WARNING
SW_AGENT_LOG_REPORTER_SAFE_MODE: "True"
SW_AGENT_METER_REPORTER_ACTIVE: "True"
SW_AGENT_PVM_METER_REPORTER_ACTIVE: "True"
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
SW_AGENT_INSTANCE_PROPERTIES_JSON: '{"custom_property":"The answer to all is 42"}'
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090" ]
interval: 5s
timeout: 60s
retries: 120
command: [ "run", "python3", "fastapi_provider.py" ]
flask-provider:
image: apache/skywalking-python-agent:latest-e2e
expose:
- 9090
networks:
- e2e
environment:
SW_AGENT_NAME: e2e-service-provider
SW_AGENT_INSTANCE_NAME: provider
SW_AGENT_LOGGING_LEVEL: DEBUG
SW_AGENT_LOG_REPORTER_ACTIVE: "True"
SW_AGENT_LOG_REPORTER_LEVEL: WARNING
SW_AGENT_LOG_REPORTER_SAFE_MODE: "True"
SW_AGENT_METER_REPORTER_ACTIVE: "True"
SW_AGENT_PVM_METER_REPORTER_ACTIVE: "True"
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
SW_AGENT_INSTANCE_PROPERTIES_JSON: '{"custom_property":"The answer to all is 42"}'
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090" ]
interval: 5s
timeout: 60s
retries: 120
command: [ "run", "python3", "flask_provider.py" ]
fastapi-consumer:
image: apache/skywalking-python-agent:latest-e2e
expose:
- 9090
networks:
- e2e
environment:
SW_AGENT_NAME: "e2e-service-consumer"
SW_AGENT_INSTANCE_NAME: consumer
SW_AGENT_LOGGING_LEVEL: DEBUG
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
SW_AGENT_NAMESPACE: "namespace"
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090" ]
interval: 5s
timeout: 60s
retries: 120
command: [ "run", "python3", "fastapi_consumer.py" ]
flask-consumer:
image: apache/skywalking-python-agent:latest-e2e
expose:
- 9090
networks:
- e2e
environment:
SW_AGENT_NAME: "e2e-service-consumer"
SW_AGENT_INSTANCE_NAME: consumer
SW_AGENT_LOGGING_LEVEL: DEBUG
SW_AGENT_COLLECTOR_BACKEND_SERVICES: oap:11800
SW_AGENT_NAMESPACE: "namespace"
healthcheck:
test: [ "CMD", "bash", "-c", "cat < /dev/null > /dev/tcp/127.0.0.1/9090" ]
interval: 5s
timeout: 60s
retries: 120
command: [ "run", "python3", "flask_consumer.py" ]
broker-a:
image: docker.io/bitnami/kafka:3.4
hostname: broker-a
expose:
- 9092
networks:
- e2e
environment:
- BITNAMI_DEBUG=yes
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_NODE_ID=0
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@broker-a:9093,1@broker-b:9093
- KAFKA_KRAFT_CLUSTER_ID=abcdefghijklmnopqrstuv
healthcheck:
test: [ "CMD", "kafka-topics.sh", "--list", "--bootstrap-server", "broker-a:9092" ]
interval: 5s
timeout: 60s
retries: 120
broker-b:
image: docker.io/bitnami/kafka:3.4
hostname: broker-b
expose:
- 9092
networks:
- e2e
environment:
- BITNAMI_DEBUG=yes
- ALLOW_PLAINTEXT_LISTENER=yes
- KAFKA_CFG_NODE_ID=1
- KAFKA_CFG_CONTROLLER_QUORUM_VOTERS=0@broker-a:9093,1@broker-b:9093
- KAFKA_KRAFT_CLUSTER_ID=abcdefghijklmnopqrstuv
healthcheck:
test: [ "CMD", "kafka-topics.sh", "--list", "--bootstrap-server", "broker-b:9092" ]
interval: 5s
timeout: 60s
retries: 120
networks:
e2e: