Skip to content

Commit 1433f08

Browse files
Updating kafka version and fixing node-exporter jobs in prometheus configuration file
1 parent c098936 commit 1433f08

20 files changed

+60
-16
lines changed

docker-compose-stream-processing.yml

+2-2
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ services:
4545
jobmanager.rpc.address: flink-jobmanager
4646
taskmanager.numberOfTaskSlots: 2
4747
kafka:
48-
image: wurstmeister/kafka
48+
image: wurstmeister/kafka:latest
4949
hostname: kafka
5050
container_name: kafka
5151
ports:
@@ -81,7 +81,7 @@ services:
8181
- kafka
8282
- zookeeper
8383
volumes:
84-
- ./kafka/streams/streams.examples:/kafka_2.13-2.6.0/streams.examples
84+
- ./kafka/streams/streams.examples:/kafka_2.13-2.7.0/streams.examples
8585
command: tail -f /dev/null
8686
node-exporter-1:
8787
image: prom/node-exporter

kafka/connect/Dockerfile

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
1-
FROM wurstmeister/kafka
1+
FROM wurstmeister/kafka:latest
22

33
# plugins folder
4-
RUN mkdir /opt/kafka_2.13-2.6.0/plugins
4+
RUN mkdir /opt/kafka_2.13-2.7.0/plugins
55

6-
# kafka-connect-http plugin
7-
COPY ./config/plugins /opt/kafka_2.13-2.6.0/plugins/
6+
# kafka-connect-http plugins
7+
COPY ./config/plugins /opt/kafka_2.13-2.7.0/plugins/
88

99
# we replace the default connect-distributed.properties so we can properly resolve to our local kafka docker development
10-
COPY ./config/connect-distributed.properties /opt/kafka_2.13-2.6.0/config/
10+
COPY ./config/connect-distributed.properties /opt/kafka_2.13-2.7.0/config/
1111

1212
# we replace the start command creating a connector instead.
1313
COPY ./config/start-kafka.sh /usr/bin/
1414

1515
# permissions
1616
RUN chmod a+x /usr/bin/start-kafka.sh
1717

18-
WORKDIR /opt/kafka_2.13-2.6.0
18+
WORKDIR /opt/kafka_2.13-2.7.0

kafka/connect/config/connect-distributed.properties

+1-1
Original file line numberDiff line numberDiff line change
@@ -84,4 +84,4 @@ offset.flush.interval.ms=10000
8484
# Examples:
8585
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
8686
#plugin.path=/usr/local/share/kafka/plugins
87-
plugin.path=/opt/kafka_2.13-2.6.0/plugins
87+
plugin.path=/opt/kafka_2.13-2.7.0/plugins

kafka/connect/config/start-kafka.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#!/bin/bash -e
22

33
# connector start command here.
4-
exec "/opt/kafka_2.13-2.6.0/bin/connect-distributed.sh" "/opt/kafka_2.13-2.6.0/config/connect-distributed.properties"
4+
exec "/opt/kafka_2.13-2.7.0/bin/connect-distributed.sh" "/opt/kafka_2.13-2.7.0/config/connect-distributed.properties"

kafka/streams/Dockerfile

+4-4
Original file line numberDiff line numberDiff line change
@@ -6,11 +6,11 @@ RUN apt-get install -y openjdk-8-jdk nano wget curl
66

77
RUN apt-get install -y maven
88

9-
RUN wget http://apache.uvigo.es/kafka/2.6.0/kafka_2.13-2.6.0.tgz && tar -zxvf kafka_2.13-2.6.0.tgz
9+
RUN wget http://apache.uvigo.es/kafka/2.7.0/kafka_2.13-2.7.0.tgz && tar -zxvf kafka_2.13-2.7.0.tgz
1010

1111
# streams apps folder
12-
RUN mkdir kafka_2.13-2.6.0/streams.examples
12+
RUN mkdir kafka_2.13-2.7.0/streams.examples
1313

14-
COPY ./streams.examples kafka_2.13-2.6.0/streams.examples
14+
COPY ./streams.examples kafka_2.13-2.7.0/streams.examples
1515

16-
WORKDIR kafka_2.13-2.6.0
16+
WORKDIR kafka_2.13-2.7.0
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
# Licensed to the Apache Software Foundation (ASF) under one or more
2+
# contributor license agreements. See the NOTICE file distributed with
3+
# this work for additional information regarding copyright ownership.
4+
# The ASF licenses this file to You under the Apache License, Version 2.0
5+
# (the "License"); you may not use this file except in compliance with
6+
# the License. You may obtain a copy of the License at
7+
#
8+
# http://www.apache.org/licenses/LICENSE-2.0
9+
#
10+
# Unless required by applicable law or agreed to in writing, software
11+
# distributed under the License is distributed on an "AS IS" BASIS,
12+
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13+
# See the License for the specific language governing permissions and
14+
# limitations under the License.
15+
log4j.rootLogger=INFO, console
16+
17+
log4j.appender.console=org.apache.log4j.ConsoleAppender
18+
log4j.appender.console.layout=org.apache.log4j.PatternLayout
19+
log4j.appender.console.layout.ConversionPattern=%d{HH:mm:ss,SSS} %-5p %-60c %x - %m%n
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
#Generated by Maven
2+
#Mon Jan 11 14:20:17 GMT 2021
3+
version=0.1
4+
groupId=streams.examples
5+
artifactId=streams.examples
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
myapps/WordCount.class
2+
myapps/CPULoad$1.class
3+
myapps/LineSplit$1.class
4+
myapps/LineSplit.class
5+
myapps/WordCount$1.class
6+
myapps/CPULoad.class
7+
myapps/Pipe$1.class
8+
myapps/Pipe.class
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
/kafka_2.13-2.7.0/streams.examples/src/main/java/myapps/CPULoad.java
2+
/kafka_2.13-2.7.0/streams.examples/src/main/java/myapps/LineSplit.java
3+
/kafka_2.13-2.7.0/streams.examples/src/main/java/myapps/WordCount.java
4+
/kafka_2.13-2.7.0/streams.examples/src/main/java/myapps/Pipe.java
Binary file not shown.

prometheus/config/prometheus.yml

+10-2
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,20 @@ scrape_configs:
2626
static_configs:
2727
- targets: ['localhost:9090']
2828

29-
- job_name: node
29+
- job_name: 'node-1'
3030

3131
scrape_interval: 5s
3232

3333
static_configs:
34-
- targets: ['node-exporter:9100']
34+
- targets: ['node-exporter-1:9100']
35+
36+
- job_name: 'node-2'
37+
38+
scrape_interval: 5s
39+
40+
static_configs:
41+
- targets: ['node-exporter-2:9100']
42+
3543
# REQUIRES configuring docker daemon.json
3644
# - job_name: 'docker'
3745
# # metrics_path defaults to '/metrics'

0 commit comments

Comments
 (0)