Skip to content

Commit

Permalink
Dedicated docker-compose for KRaft
Browse files Browse the repository at this point in the history
  • Loading branch information
emasab committed Apr 25, 2024
1 parent c868684 commit 682408b
Show file tree
Hide file tree
Showing 4 changed files with 17 additions and 15 deletions.
6 changes: 3 additions & 3 deletions .semaphore/semaphore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -121,13 +121,13 @@ blocks:
jobs:
- name: 'Build and test with "classic" protocol'
commands:
- cd test/docker && docker-compose up -d kafka && sleep 30 && cd ../..
- cd test/docker && docker-compose up -d && sleep 30 && cd ../..
- export SEMAPHORE_SKIP_FLAKY_TESTS='true'
- dotnet restore
- cd test/Confluent.Kafka.IntegrationTests && dotnet test -l "console;verbosity=normal" && cd ../..
- name: 'Build and test with "consumer" protocol'
commands:
- cd test/docker && docker-compose up -d kafka_4 && sleep 30 && cd ../..
- cd test/docker && docker-compose -f docker-compose-kraft.yaml up -d && sleep 30 && cd ../..
- export SEMAPHORE_SKIP_FLAKY_TESTS='true'
- export TEST_CONSUMER_GROUP_PROTOCOL=consumer
- dotnet restore
Expand All @@ -145,7 +145,7 @@ blocks:
jobs:
- name: 'Build and test'
commands:
- cd test/docker && docker-compose up -d kafka schema-registry_2 && cd ../..
- cd test/docker && docker-compose up -d && cd ../..
- export SEMAPHORE_SKIP_FLAKY_TESTS='true'
- dotnet restore
- cd test/Confluent.SchemaRegistry.Serdes.IntegrationTests && dotnet test -l "console;verbosity=normal" && cd ../..
Expand Down
13 changes: 13 additions & 0 deletions test/docker/docker-compose-kraft.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: '3'
services:
kafka:
build: ./kraft
restart: always
ports:
- 9092:29092
- 9093:29093
volumes:
- ./kraft/server.properties:/etc/kafka/server.properties
- ./kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf
environment:
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf"
11 changes: 0 additions & 11 deletions test/docker/docker-compose.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -76,17 +76,6 @@ services:
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1
KAFKA_AUTHORIZER_CLASS_NAME: kafka.security.authorizer.AclAuthorizer
KAFKA_SUPER_USERS: "User:ANONYMOUS"
kafka_4:
build: ./kraft
restart: always
ports:
- 9092:29092
- 9093:29093
volumes:
- ./kraft/server.properties:/etc/kafka/server.properties
- ./kafka_server_jaas.conf:/etc/kafka/kafka_server_jaas.conf
environment:
KAFKA_OPTS: "-Djava.security.auth.login.config=/etc/kafka/kafka_server_jaas.conf"
schema-registry:
image: confluentinc/cp-schema-registry
restart: always
Expand Down
2 changes: 1 addition & 1 deletion test/docker/kraft/server.properties
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ broker.id=0
port=9092
reserved.broker.max.id=65536
listeners=PLAINTEXT://0.0.0.0:9092,CONTROLLER://0.0.0.0:38705,SASL_PLAINTEXT://0.0.0.0:9093,DOCKER://0.0.0.0:29092,DOCKER_SASL_PLAINTEXT://0.0.0.0:29093
advertised.listeners=PLAINTEXT://kafka_4:9092,SASL_PLAINTEXT://kafka_4:9093,DOCKER://localhost:9092,DOCKER_SASL_PLAINTEXT://localhost:9093
advertised.listeners=PLAINTEXT://kafka:9092,SASL_PLAINTEXT://kafka:9093,DOCKER://localhost:9092,DOCKER_SASL_PLAINTEXT://localhost:9093
log.dir=/logs
log.dirs=/logs
num.partitions=4
Expand Down

0 comments on commit 682408b

Please sign in to comment.