-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Metricbeat: Kafka integration tests with 1.1 (#7616)
- Loading branch information
Showing
12 changed files
with
72 additions
and
15 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
FROM debian:stretch | ||
|
||
ENV KAFKA_HOME /kafka | ||
# The advertised host is kafka. This means it will not work if container is started locally and connected from localhost to it | ||
ENV KAFKA_LOGS_DIR="/kafka-logs" | ||
ENV KAFKA_VERSION 1.1.0 | ||
ENV _JAVA_OPTIONS "-Djava.net.preferIPv4Stack=true" | ||
ENV TERM=linux | ||
|
||
RUN apt-get update && apt-get install -y curl openjdk-8-jre-headless netcat dnsutils | ||
|
||
RUN mkdir -p ${KAFKA_LOGS_DIR} && mkdir -p ${KAFKA_HOME} && curl -s -o $INSTALL_DIR/kafka.tgz \ | ||
"http://ftp.wayne.edu/apache/kafka/${KAFKA_VERSION}/kafka_2.11-${KAFKA_VERSION}.tgz" && \ | ||
tar xzf ${INSTALL_DIR}/kafka.tgz -C ${KAFKA_HOME} --strip-components 1 | ||
|
||
ADD run.sh /run.sh | ||
ADD healthcheck.sh /healthcheck.sh | ||
|
||
EXPOSE 9092 | ||
EXPOSE 2181 | ||
|
||
# Healthcheck creates an empty topic foo. As soon as a topic is created, it assumes broke is available | ||
HEALTHCHECK --interval=1s --retries=90 CMD /healthcheck.sh | ||
|
||
ENTRYPOINT ["/run.sh"] |
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 |
---|---|---|
@@ -1,3 +1,5 @@ | ||
This is the Kafka module. | ||
|
||
The default metricsets are `consumergroup` and `partition`. | ||
|
||
This module is tested with Kafka 0.10.2 and 1.1.0. |
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 |
---|---|---|
@@ -1,2 +1,3 @@ | ||
KAFKA_0_10_2_HOST=kafka_0_10_2 | ||
KAFKA_HOST=kafka | ||
KAFKA_PORT=9092 |
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 |
---|---|---|
@@ -1,5 +1,7 @@ | ||
#!/bin/bash | ||
|
||
KAFKA_ADVERTISED_HOST=$(dig +short $HOSTNAME) | ||
|
||
wait_for_port() { | ||
count=20 | ||
port=$1 | ||
|
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 |
---|---|---|
@@ -1,2 +1,2 @@ | ||
kafka-python==1.4.2 | ||
kafka-python==1.4.3 | ||
elasticsearch==6.2.0 |
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