Skip to content

Commit ab0713f

Browse files
committed
Update examples (#99)
Upgrade examples to use the recent versions of various components - kafka-2.8.0 - strimzi-0.24.0 - debezium-1.7.0.Final - apicurio-2.0.0.Final
1 parent 2a5d598 commit ab0713f

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+204
-456
lines changed

examples/README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
* [persons1ds](persons1ds/README.md) : distributed version of persons1 using Docker with Strimzi Kafka image
99
* [persons1db](persons1db/README.md) : distributed version of persons1 using Docker with Debezium Kafka image
1010
* [persons4ds](persons4ds/README.md) : distributed version of persons4 using Docker with Strimzi Kafka image
11+
* [persons4db](persons4db/README.md) : distributed version of persons4 using Docker with Debezium Kafka image
1112
* [persons1ks](persons1ks/README.md) : distributed version of persons1 in Kubernetes with Strimzi Kafka image
1213
* [persons4ks](persons4ks/README.md) : distributed version of persons4 in Kubernetes with Strimzi Kafka image
1314
* [persons8ds](persons8ds/README.md) : File source and HANA sink connectors to read records from a file and insert them into HANA with Strimzi Kafka image

examples/inventory7db/README.md

Lines changed: 4 additions & 30 deletions
Original file line numberDiff line numberDiff line change
@@ -40,21 +40,9 @@ After starting the Docker containers using docker-compose, we can verify whether
4040

4141
```
4242
$ curl -i http://localhost:8083/
43-
HTTP/1.1 200 OK
44-
Date: Wed, 09 Sep 2020 22:44:49 GMT
45-
Content-Type: application/json
46-
Content-Length: 91
47-
Server: Jetty(9.4.24.v20191120)
48-
49-
{"version":"2.5.0","commit":"66563e712b0b9f84","kafka_cluster_id":"1NEvm9a4TW2t-f5Jkk4peg"}
43+
{"version":"2.8.0","commit":"ebb1d6e21cc92130","kafka_cluster_id":"LYeU_8zHQp2304Kds4w1VA"}
5044
$
5145
$ curl -i http://localhost:8083/connectors
52-
HTTP/1.1 200 OK
53-
Date: Wed, 09 Sep 2020 22:45:35 GMT
54-
Content-Type: application/json
55-
Content-Length: 2
56-
Server: Jetty(9.4.24.v20191120)
57-
5846
[]
5947
$
6048
```
@@ -178,25 +166,11 @@ The above configuration uses Debezium's Event Flattening SMT https://debezium.io
178166
We deploy the connectors by posting the connector configuration json files to the Kafka Connect's API.
179167

180168
```
181-
$ curl -i -X POST -H "Content-Type:application/json" -d @connect-mysql-source-7.json http://localhost:8083/connectors/
182-
HTTP/1.1 201 Created
183-
Date: Tue, 12 Jan 2021 22:29:00 GMT
184-
Location: http://localhost:8083/connectors/inventory-mysql-source
185-
Content-Type: application/json
186-
Content-Length: 630
187-
Server: Jetty(9.4.24.v20191120)
188-
189-
{"name":"inventory-mysql-source","config":{"connector.class":"io.debezium.connector.mysql.MySqlConnector","tasks.max":"1","database.hostname":"mysql","database.port":"3306","database.user":"${file:/kafka/custom-config/tmp-secrets.properties:connection2-user}","database.password":"${file:/kafka/custom-config/tmp-secrets.properties:connection2-password}","database.server.id":"184054","d
169+
$ curl -X POST -H "Content-Type:application/json" -d @connect-mysql-source-7.json http://localhost:8083/connectors/
170+
{"name":"inventory-mysql-source","config":{"connector.class":"io.debezium.connector.mysql.MySqlConnector","tasks.max":"1","database.hostname":"mysql","database.port":"3306","database.user":"${file:/kafka/custom-config/secrets.properties:connection2-user}","database.password":"${file:/kafka/custom-config/secrets.properties:connection2-password}","database.server.id":"184054","d
190171
...
191172
$
192-
$ curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" -d @tmp-connect-hana-sink-7.json http://localhost:8083/connectors/
193-
HTTP/1.1 201 Created
194-
Date: Tue, 12 Jan 2021 22:30:10 GMT
195-
Location: http://localhost:8083/connectors/inventory-hana-sink
196-
Content-Type: application/json
197-
Content-Length: 764
198-
Server: Jetty(9.4.24.v20191120)
199-
173+
$ curl -X POST -H "Accept:application/json" -H "Content-Type:application/json" -d @connect-hana-sink-7.json http://localhost:8083/connectors/
200174
{"name":"inventory-hana-sink","config":{"connector.class":"com.sap.kafka.connect.sink.hana.HANASinkConnector","tasks.max":"1","topics":"dbserver1.inventory.customers","connection.url":"jdbc:sap://...
201175
$
202176
$ curl http://localhost:8083/connectors/

examples/inventory7db/docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ version: '2'
33
services:
44

55
zookeeper:
6-
image: debezium/zookeeper:1.4.2.Final
6+
image: debezium/zookeeper:1.7.0.Final
77
ports:
88
- 2181:2181
99

1010
kafka:
11-
image: debezium/kafka:1.4.2.Final
11+
image: debezium/kafka:1.7.0.Final
1212
depends_on:
1313
- zookeeper
1414
ports:
@@ -19,7 +19,7 @@ services:
1919
ZOOKEEPER_CONNECT: zookeeper:2181
2020

2121
mysql:
22-
image: debezium/example-mysql:1.3
22+
image: debezium/example-mysql:1.7.0.Final
2323
ports:
2424
- 3306:3306
2525
environment:

examples/inventory8db/docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ version: '2'
33
services:
44

55
zookeeper:
6-
image: debezium/zookeeper:1.4.2.Final
6+
image: debezium/zookeeper:1.7.0.Final
77
ports:
88
- 2181:2181
99

1010
kafka:
11-
image: debezium/kafka:1.4.2.Final
11+
image: debezium/kafka:1.7.0.Final
1212
depends_on:
1313
- zookeeper
1414
ports:
@@ -19,7 +19,7 @@ services:
1919
ZOOKEEPER_CONNECT: zookeeper:2181
2020

2121
postgres:
22-
image: debezium/example-postgres:1.3
22+
image: debezium/example-postgres:1.7.0.Final
2323
ports:
2424
- 5432:5432
2525
environment:

examples/inventory9db/docker-compose.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ version: '2'
33
services:
44

55
zookeeper:
6-
image: debezium/zookeeper:1.4.2.Final
6+
image: debezium/zookeeper:1.7.0.Final
77
ports:
88
- 2181:2181
99

1010
kafka:
11-
image: debezium/kafka:1.4.2.Final
11+
image: debezium/kafka:1.7.0.Final
1212
depends_on:
1313
- zookeeper
1414
ports:
@@ -19,7 +19,7 @@ services:
1919
ZOOKEEPER_CONNECT: zookeeper:2181
2020

2121
cassandra:
22-
image: debezium/example-cassandra:1.4
22+
image: debezium/example-cassandra:1.7.0.Final
2323
ports:
2424
- 9042:9042
2525
links:

examples/persons1/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ $ make get_libs
4444
Getting jar files into target ...
4545
...
4646
$ ls target
47-
ngdbc-2.5.49.jar
47+
ngdbc-2.10.14.jar
4848
$
4949
```
5050

examples/persons1/libs.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
com/sap/cloud/db/jdbc/ngdbc/2.5.49/ngdbc-2.5.49.jar
1+
com/sap/cloud/db/jdbc/ngdbc/2.10.14/ngdbc-2.10.14.jar

examples/persons1db/Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
FROM debezium/connect:1.4.2.Final
1+
FROM debezium/connect:1.7.0.Final
22
USER root:root
33

44
RUN mkdir -p /kafka/connect/kafka-connector-hana

examples/persons1db/README.md

Lines changed: 9 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ $ make get_libs
2121
Getting jar files into target ...
2222
$
2323
$ ls target
24-
guava-20.0.jar ngdbc-2.5.49.jar
24+
guava-31.0.1-jre.jar ngdbc-2.10.14.jar
2525
$
2626
```
2727

@@ -36,7 +36,7 @@ $ make docker_build
3636
Building docker image ...
3737
docker build . -t debezium-connector-hana-min
3838
Sending build context to Docker daemon 3.868MB
39-
Step 1/5 : FROM debezium/connect:1.4.2.Final
39+
Step 1/5 : FROM debezium/connect:1.7.0.Final
4040
---> 66f074fce2f0
4141
Step 2/5 : USER root:root
4242
---> Using cache
@@ -76,27 +76,15 @@ Attaching to persons1db_zookeeper_1, persons1db_kafka_1, persons1db_connect_1
7676
After starting the Docker containers using docker-compose, we can verify whether Kafka-Connect is running using curl.
7777

7878
```
79-
$ curl -i http://localhost:8083/
80-
HTTP/1.1 200 OK
81-
Date: Wed, 09 Sep 2020 22:44:49 GMT
82-
Content-Type: application/json
83-
Content-Length: 91
84-
Server: Jetty(9.4.24.v20191120)
85-
86-
{"version":"2.5.0","commit":"66563e712b0b9f84","kafka_cluster_id":"1NEvm9a4TW2t-f5Jkk4peg"}
79+
$ curl http://localhost:8083/
80+
{"version":"2.8.0","commit":"ebb1d6e21cc92130","kafka_cluster_id":"tijMHQdgQiOI-WKQFd2wYw"}
8781
$
88-
$ curl -i http://localhost:8083/connectors
89-
HTTP/1.1 200 OK
90-
Date: Wed, 09 Sep 2020 22:45:35 GMT
91-
Content-Type: application/json
92-
Content-Length: 2
93-
Server: Jetty(9.4.24.v20191120)
94-
82+
$ curl http://localhost:8083/connectors
9583
[]
9684
$
9785
```
9886

99-
The above result shows that Kafka Connect using Kafka 2.5.0 is running and there is no connector deployed.
87+
The above result shows that Kafka Connect using Kafka 2.8.0 is running and there is no connector deployed.
10088

10189
##### Step 4: Installing HANA connectors
10290

@@ -136,33 +124,13 @@ We prepare for the connector json files using the json files `connect-hana-sourc
136124
Finally, we deploy the connectors by posting the connector configuration json files to the Kafka Connect's API.
137125

138126
```
139-
$ curl -i -X POST -H 'content-type:application/json' -d @connect-hana-source-1.json http://localhost:8083/connectors
140-
HTTP/1.1 201 Created
141-
Date: Wed, 09 Sep 2020 22:46:30 GMT
142-
Location: http://localhost:8083/connectors/test-topic-1-source
143-
Content-Type: application/json
144-
Content-Length: 530
145-
Server: Jetty(9.4.24.v20191120)
146-
127+
$ curl -X POST -H 'content-type:application/json' -d @connect-hana-source-1.json http://localhost:8083/connectors
147128
{"name":"test-topic-1-source","config":{"connector.class":"com.sap.kafka.connect.source.hana.HANASourceConnector","tasks.max":"1","topics":"test_topic_1","connection.url":"jdbc:sap://...
148129
$
149-
$ curl -i -X POST -H 'content-type:application/json' -d @connect-hana-sink-1.json http://localhost:8083/connectors
150-
HTTP/1.1 201 Created
151-
Date: Wed, 09 Sep 2020 22:46:39 GMT
152-
Location: http://localhost:8083/connectors/test-topic-1-sink
153-
Content-Type: application/json
154-
Content-Length: 545
155-
Server: Jetty(9.4.24.v20191120)
156-
130+
$ curl -X POST -H 'content-type:application/json' -d @connect-hana-sink-1.json http://localhost:8083/connectors
157131
{"name":"test-topic-1-sink","config":{"connector.class":"com.sap.kafka.connect.sink.hana.HANASinkConnector","tasks.max":"1","topics":"test_topic_1","connection.url":"jdbc:sap://...
158132
$
159-
$ curl -i http://localhost:8083/connectors
160-
HTTP/1.1 200 OK
161-
Date: Wed, 09 Sep 2020 22:47:35 GMT
162-
Content-Type: application/json
163-
Content-Length: 43
164-
Server: Jetty(9.4.24.v20191120)
165-
133+
$ curl http://localhost:8083/connectors
166134
["test-topic-1-source","test-topic-1-sink"]
167135
$
168136
```

examples/persons1db/docker-compose.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,12 @@ version: '2'
33
services:
44

55
zookeeper:
6-
image: debezium/zookeeper:1.4.2.Final
6+
image: debezium/zookeeper:1.7.0.Final
77
ports:
88
- 2181:2181
99

1010
kafka:
11-
image: debezium/kafka:1.4.2.Final
11+
image: debezium/kafka:1.7.0.Final
1212
depends_on:
1313
- zookeeper
1414
ports:

0 commit comments

Comments
 (0)