blob: f213e4f25a063f97fe84ca4920ea04568fe62862 [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:
# Original single server for backward compatibility
iggy-server:
platform: linux/amd64
build:
context: ..
dockerfile: core/server/Dockerfile
target: runtime-prebuilt
args:
PREBUILT_IGGY_SERVER: ${IGGY_SERVER_PATH:-target/debug/iggy-server}
PREBUILT_IGGY_CLI: ${IGGY_CLI_PATH:-target/debug/iggy}
LIBC: glibc
PROFILE: debug
command: [ "--fresh", "--with-default-root-credentials" ]
cap_add:
- SYS_NICE
security_opt:
- seccomp:unconfined
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: [ "CMD", "/usr/local/bin/iggy", "--tcp-server-address", "127.0.0.1:8090", "ping" ]
interval: 20s
timeout: 3s
retries: 30
start_period: 2s
environment:
- RUST_LOG=info
- IGGY_SYSTEM_PATH=local_data
- IGGY_TCP_ADDRESS=0.0.0.0:8090
- IGGY_HTTP_ADDRESS=0.0.0.0:3000
- IGGY_QUIC_ADDRESS=0.0.0.0:8080
- IGGY_WEBSOCKET_ADDRESS=0.0.0.0:8070
volumes:
- iggy_data:/app/local_data
networks:
- iggy-bdd-network
# Leader server for cluster testing
iggy-leader:
platform: linux/amd64
build:
context: ..
dockerfile: core/server/Dockerfile
target: runtime-prebuilt
args:
PREBUILT_IGGY_SERVER: ${IGGY_SERVER_PATH:-target/debug/iggy-server}
PREBUILT_IGGY_CLI: ${IGGY_CLI_PATH:-target/debug/iggy}
LIBC: glibc
PROFILE: debug
# Leader runs without --follower flag
command: [ "--fresh", "--with-default-root-credentials" ]
cap_add:
- SYS_NICE
security_opt:
- seccomp:unconfined
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: [ "CMD", "/usr/local/bin/iggy", "--tcp-server-address", "127.0.0.1:8091", "ping" ]
interval: 20s
timeout: 3s
retries: 30
start_period: 2s
environment:
- RUST_LOG=info
- IGGY_SYSTEM_PATH=local_data_leader
# Server addresses
- IGGY_TCP_ADDRESS=0.0.0.0:8091
- IGGY_HTTP_ADDRESS=0.0.0.0:3001
- IGGY_QUIC_ADDRESS=0.0.0.0:8081
- IGGY_WEBSOCKET_ADDRESS=0.0.0.0:8071
# Cluster configuration
- IGGY_CLUSTER_ENABLED=true
- IGGY_CLUSTER_NAME=test-cluster
# Current node identity
- IGGY_CLUSTER_NODE_CURRENT_NAME=leader-node
- IGGY_CLUSTER_NODE_CURRENT_IP=iggy-leader
# Other nodes configuration
- IGGY_CLUSTER_NODE_OTHERS_0_NAME=follower-node
- IGGY_CLUSTER_NODE_OTHERS_0_IP=iggy-follower
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_TCP=8092
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_QUIC=8082
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_HTTP=3002
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_WEBSOCKET=8072
volumes:
- iggy_leader_data:/app/local_data_leader
networks:
- iggy-bdd-network
# Follower server for cluster testing
iggy-follower:
platform: linux/amd64
build:
context: ..
dockerfile: core/server/Dockerfile
target: runtime-prebuilt
args:
PREBUILT_IGGY_SERVER: ${IGGY_SERVER_PATH:-target/debug/iggy-server}
PREBUILT_IGGY_CLI: ${IGGY_CLI_PATH:-target/debug/iggy}
LIBC: glibc
PROFILE: debug
# Follower runs with --follower flag
command: [ "--fresh", "--with-default-root-credentials", "--follower" ]
cap_add:
- SYS_NICE
security_opt:
- seccomp:unconfined
ulimits:
memlock:
soft: -1
hard: -1
healthcheck:
test: [ "CMD", "/usr/local/bin/iggy", "--tcp-server-address", "127.0.0.1:8092", "ping" ]
interval: 20s
timeout: 3s
retries: 30
start_period: 2s
environment:
- RUST_LOG=info
- IGGY_SYSTEM_PATH=local_data_follower
# Server addresses (different ports from leader)
- IGGY_TCP_ADDRESS=0.0.0.0:8092
- IGGY_HTTP_ADDRESS=0.0.0.0:3002
- IGGY_QUIC_ADDRESS=0.0.0.0:8082
- IGGY_WEBSOCKET_ADDRESS=0.0.0.0:8072
# Cluster configuration (same as leader)
- IGGY_CLUSTER_ENABLED=true
- IGGY_CLUSTER_NAME=test-cluster
# Current node identity (different from leader)
- IGGY_CLUSTER_NODE_CURRENT_NAME=follower-node
- IGGY_CLUSTER_NODE_CURRENT_IP=iggy-follower
# Other nodes configuration
- IGGY_CLUSTER_NODE_OTHERS_0_NAME=leader-node
- IGGY_CLUSTER_NODE_OTHERS_0_IP=iggy-leader
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_TCP=8091
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_QUIC=8081
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_HTTP=3001
- IGGY_CLUSTER_NODE_OTHERS_0_PORTS_WEBSOCKET=8071
volumes:
- iggy_follower_data:/app/local_data_follower
networks:
- iggy-bdd-network
rust-bdd:
build:
context: ..
dockerfile: bdd/rust/Dockerfile
depends_on:
iggy-server:
condition: service_healthy
iggy-leader:
condition: service_healthy
iggy-follower:
condition: service_healthy
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
# Additional addresses for leader redirection tests
- IGGY_TCP_ADDRESS_LEADER=iggy-leader:8091
- IGGY_TCP_ADDRESS_FOLLOWER=iggy-follower:8092
- RUST_LOG=debug
- RUSTFLAGS=-C linker=gcc
volumes:
- ./scenarios/basic_messaging.feature:/app/features/basic_messaging.feature
- ./scenarios/leader_redirection.feature:/app/features/leader_redirection.feature
command: [ "cargo", "test", "-p", "bdd", "--features", "bdd" ]
networks:
- iggy-bdd-network
python-bdd:
build:
context: ..
dockerfile: bdd/python/Dockerfile
depends_on:
- iggy-server
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
volumes:
- ./scenarios/basic_messaging.feature:/app/features/basic_messaging.feature
working_dir: /app
command: [ "uv", "run", "--project", "/workspace/bdd/python", "pytest", "tests/", "-v" ]
networks:
- iggy-bdd-network
go-bdd:
build:
context: ..
dockerfile: bdd/go/Dockerfile
depends_on:
iggy-server:
condition: service_healthy
iggy-leader:
condition: service_healthy
iggy-follower:
condition: service_healthy
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
volumes:
- ./scenarios/basic_messaging.feature:/app/features/basic_messaging.feature
command: [ "go", "test", "-v", "./..." ]
networks:
- iggy-bdd-network
node-bdd:
build:
context: ..
dockerfile: bdd/node/Dockerfile
depends_on:
iggy-server:
condition: service_healthy
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
command: [ "npm", "run", "test:bdd" ]
networks:
- iggy-bdd-network
csharp-bdd:
build:
context: ..
dockerfile: bdd/csharp/Dockerfile
depends_on:
- iggy-server
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
command: [ "dotnet", "test" ]
networks:
- iggy-bdd-network
java-bdd:
build:
context: ..
dockerfile: bdd/java/Dockerfile
depends_on:
iggy-server:
condition: service_healthy
environment:
- IGGY_ROOT_USERNAME=iggy
- IGGY_ROOT_PASSWORD=iggy
- IGGY_TCP_ADDRESS=iggy-server:8090
volumes:
- ./scenarios/basic_messaging.feature:/app/features/basic_messaging.feature
command: [ "gradle", "--no-daemon", "test" ]
networks:
- iggy-bdd-network
networks:
iggy-bdd-network:
driver: bridge
volumes:
iggy_data:
iggy_leader_data:
iggy_follower_data: