Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit 656c26d
Showing
5 changed files
with
68 additions
and
0 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.tgz |
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,22 @@ | ||
# Create a simple Storm Client | ||
# | ||
# docker build -t matnar/kafka . | ||
|
||
FROM anapsix/alpine-java:8 | ||
LABEL maintainer="matnar" | ||
|
||
USER root | ||
|
||
# COPY kafka_2.11-1.1.0.tgz /kafka_2.11-1.1.0.tgz | ||
# RUN cd / && tar -zxf kafka_2.11-1.1.0.tgz && mv kafka_2.11-1.1.0 kafka && rm kafka_2.11-1.1.0.tgz | ||
RUN cd / && wget http://apache.panu.it/kafka/1.1.0/kafka_2.11-1.1.0.tgz && tar -zxf kafka_2.11-1.1.0.tgz && mv kafka_2.11-1.1.0 kafka && rm kafka_2.11-1.1.0.tgz | ||
|
||
COPY config/server.properties /kafka/config/server.properties | ||
COPY config/update-config.sh /update-config.sh | ||
# RUN sh /update-config.sh | ||
|
||
EXPOSE 9092 | ||
|
||
ENTRYPOINT ["/bin/bash", "-c"] | ||
CMD ["sh /update-config.sh && /kafka/bin/kafka-server-start.sh /kafka/config/ds.properties"] | ||
# CMD ["/bin/bash"] |
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,3 @@ | ||
#!/bin/bash | ||
docker build -t matnar/kafka:latest -t matnar/kafka: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 |
---|---|---|
@@ -0,0 +1,31 @@ | ||
num.network.threads=3 | ||
num.io.threads=8 | ||
socket.send.buffer.bytes=102400 | ||
socket.receive.buffer.bytes=102400 | ||
socket.request.max.bytes=104857600 | ||
|
||
|
||
log.dirs=/tmp/kafka-logs | ||
num.partitions=1 | ||
num.recovery.threads.per.data.dir=1 | ||
offsets.topic.replication.factor=1 | ||
transaction.state.log.replication.factor=1 | ||
transaction.state.log.min.isr=1 | ||
|
||
log.retention.hours=168 | ||
log.segment.bytes=1073741824 | ||
log.retention.check.interval.ms=300000 | ||
|
||
zookeeper.connect=zookeeper:2181 | ||
zookeeper.connection.timeout.ms=6000 | ||
|
||
|
||
############################# Group Coordinator Settings ############################# | ||
|
||
# The following configuration specifies the time, in milliseconds, that the GroupCoordinator will delay the initial consumer rebalance. | ||
# The rebalance will be further delayed by the value of group.initial.rebalance.delay.ms as new members join the group, up to a maximum of max.poll.interval.ms. | ||
# The default value for this is 3 seconds. | ||
# We override this to 0 here as it makes for a better out-of-the-box experience for development and testing. | ||
# However, in production environments the default value of 3 seconds is more suitable as this will help to avoid unnecessary, and potentially expensive, rebalances during application startup. | ||
delete.topic.enable=true | ||
group.initial.rebalance.delay.ms=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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/bin/bash | ||
CONFIG_FILE=/kafka/config/server.properties | ||
DS_FILE=/kafka/config/ds.properties | ||
|
||
HOST_IP=$(awk 'END{print $1}' /etc/hosts) | ||
CONFIG_LINE=listeners="PLAINTEXT://$HOST_IP:9092" | ||
BROKER_ID_LINE="broker.id=$BROKER_ID" | ||
|
||
cp $CONFIG_FILE $DS_FILE | ||
echo $CONFIG_LINE >> $DS_FILE | ||
echo $BROKER_ID_LINE >> $DS_FILE |