DBZ-2753: Modified instructions to use Podman to run the core example

Signed-off-by: Ramesh Reddy <rareddy@jboss.org>
This commit is contained in:
Ramesh Reddy 2020-11-11 17:50:40 -06:00 committed by Jiri Pechanec
parent d7d768457f
commit 5d94d831f7
9 changed files with 95 additions and 0 deletions

View File

@ -31,6 +31,13 @@ For more information, see link:https://docs.docker.com/engine/installation/[the
For this tutorial, do not run Docker in a virtual machine (using Docker Machine).
====
ifdef::community[]
[NOTE]
====
This example can also be run using Podman. For more information see link:https://podman.io/[Podman]
====
endif::community[]
include::{partialsdir}/modules/tutorial/con-introduction-debezium.adoc[leveloffset=+1]
include::{partialsdir}/assemblies/tutorial/assembly-starting-services.adoc[leveloffset=+1]

View File

@ -22,6 +22,18 @@ Docker stops each container.
Because you used the `--rm` option when you started them, Docker also removes them.
--
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman pod kill dbz
$ sudo podman pod rm dbz
----
====
endif::community[]
. Verify that all of the processes have stopped and have been removed:
+
--

View File

@ -104,6 +104,17 @@ Otherwise, you might see an error like the following:
endif::[]
--
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ curl -i -X POST -H "Accept:application/json" -H "Content-Type:application/json" localhost:8083/connectors/ -d '{ "name": "inventory-connector", "config": { "connector.class": "io.debezium.connector.mysql.MySqlConnector", "tasks.max": "1", "database.hostname": "0.0.0.0", "database.port": "3306", "database.user": "debezium", "database.password": "dbz", "database.server.id": "184054", "database.server.name": "dbserver1", "database.include.list": "inventory", "database.history.kafka.bootstrap.servers": "0.0.0.0:9092", "database.history.kafka.topic": "dbhistory.inventory" } }'
----
====
endif::community[]
. Verify that `inventory-connector` is included in the list of connectors:
+
--

View File

@ -32,6 +32,17 @@ This enables applications outside of the container to use Kafka Connect's REST A
`--link zookeeper:zookeeper --link kafka:kafka --link mysql:mysql`:: Links the container to the containers that are running ZooKeeper, Kafka, and the MySQL server.
--
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman run -it --rm --name connect --pod dbz -e GROUP_ID=1 -e CONFIG_STORAGE_TOPIC=my_connect_configs -e OFFSET_STORAGE_TOPIC=my_connect_offsets -e STATUS_STORAGE_TOPIC=my_connect_statuses debezium/connect:{debezium-docker-label}
----
====
endif::community[]
. Verify that Kafka Connect started and is ready to accept connections.
+
--

View File

@ -45,6 +45,17 @@ which means the terminal's standard input and output are attached to the contain
`--link zookeeper:zookeeper`:: Tells the container that it can find ZooKeeper in the `zookeeper` container,
which is running on the same Docker host.
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman run -it --rm --name kafka --pod dbz debezium/kafka:{debezium-docker-label}
----
====
endif::community[]
[NOTE]
====
In this tutorial, you will always connect to Kafka from within a Docker container.

View File

@ -28,6 +28,17 @@ which means the terminal's standard input and output are attached to the contain
`--link mysql`:: Links the container to the `mysql` container.
--
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman run -it --rm --name mysqlterm --pod dbz --rm mysql:5.7 sh -c 'exec mysql -h 0.0.0.0 -uroot -pdebezium'
----
====
endif::community[]
. Verify that the MySQL command line client started.
+
--

View File

@ -31,6 +31,17 @@ which means the terminal's standard input and output are attached to the contain
`-e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw`:: Creates a user and password that has the minimum privileges required by the {prodname} MySQL connector.
--
ifdef::community[]
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman run -it --rm --name mysql --pod dbz -e MYSQL_ROOT_PASSWORD=debezium -e MYSQL_USER=mysqluser -e MYSQL_PASSWORD=mysqlpw debezium/example-mysql:{debezium-docker-label}
----
====
endif::community[]
. Verify that the MySQL server starts.
+
--

View File

@ -28,6 +28,18 @@ which means the terminal's standard input and output are attached to the contain
This enables other containers (and applications outside of the container) to communicate with ZooKeeper.
--
ifdef::community[]
[NOTE]
====
For Podman use the below commands
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman pod create --name=dbz --publish "9092,3306,8083"
$ sudo podman run -it --rm --name zookeeper --pod dbz debezium/zookeeper:{debezium-docker-label}
----
====
endif::community[]
. Verify that ZooKeeper started and is listening on port `2181`.
+
--

View File

@ -29,6 +29,15 @@ Without this option, `watch-topic` would only show the events recorded after you
Specifies that the output should include the event's key.
In this case, this contains the row's primary key.
[NOTE]
====
For Podman use the below command
[source,shell,options="nowrap",subs="+attributes"]
----
$ sudo podman run -it --rm --name watcher --pod dbz debezium/kafka:{debezium-docker-label} watch-topic -a -k dbserver1.inventory.customers
----
====
The `watch-topic` utility returns the event records from the `customers` table.
There are four events, one for each row in the table.
Each event is formatted in JSON, because that is how you configured the Kafka Connect service.