-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #23 from SciCatProject/kafka-ci
Add Kafka connection test. (Part of integration test)
- Loading branch information
Showing
7 changed files
with
95 additions
and
18 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
version: "3.5" | ||
|
||
services: | ||
# Kafka and file-writer services are copied from | ||
# https://gitlab.esss.lu.se/ecdc/ess-dmsc/kafka-to-nexus/-/blob/main/integration-tests/docker-compose.yml | ||
# Currently github-ci fails to run the original docker-compose.yml file in the ecdc repository | ||
# so we copied and modified the file here. | ||
kafka: | ||
container_name: file-writer-kafka | ||
hostname: file-writer-kafka | ||
image: confluentinc/cp-kafka:7.4.3 | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 600M | ||
restart: always | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- "9093:9093" | ||
networks: | ||
- frontend | ||
environment: | ||
KAFKA_ZOOKEEPER_CONNECT: file-writer-zookeeper:2181 | ||
KAFKA_BROKER_ID: 0 | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_MIN_ISR: 1 | ||
KAFKA_TRANSACTION_STATE_LOG_REPLICATION_FACTOR: 1 | ||
KAFKA_MESSAGE_MAX_BYTES: 300000000 | ||
KAFKA_SOCKET_REQUEST_MAX_BYTES: 300000000 | ||
KAFKA_REPLICA_FETCH_MAX_BYTES: 300000000 | ||
KAFKA_LOG_RETENTION_MS: -1 # keep data forever, required for tests involving fake "historical" data | ||
## listeners | ||
KAFKA_LISTENERS: INSIDE://:9092,OUTSIDE://:9093 | ||
KAFKA_ADVERTISED_LISTENERS: INSIDE://file-writer-kafka:9092,OUTSIDE://localhost:9093 | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INSIDE:PLAINTEXT,OUTSIDE:PLAINTEXT | ||
KAFKA_INTER_BROKER_LISTENER_NAME: INSIDE | ||
healthcheck: | ||
test: ["CMD", "kafka-topics", "--bootstrap-server", "localhost:9092", "--list"] | ||
interval: 5s | ||
timeout: 5s | ||
retries: 5 | ||
start_period: 10s | ||
|
||
zookeeper: | ||
container_name: file-writer-zookeeper | ||
hostname: file-writer-zookeeper | ||
image: confluentinc/cp-zookeeper:7.4.3 | ||
deploy: | ||
resources: | ||
limits: | ||
memory: 200M | ||
restart: always | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
networks: | ||
- frontend | ||
|
||
filewriter: | ||
container_name: file-writer-file-writer | ||
image: registry.esss.lu.se/ecdc/ess-dmsc/docker-centos7-build-node:latest | ||
depends_on: | ||
kafka: | ||
condition: service_healthy | ||
tty: true | ||
networks: | ||
- frontend | ||
|
||
networks: | ||
frontend: |