-
Notifications
You must be signed in to change notification settings - Fork 404
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
doc(plc4j): Integrating Kafka and PLC4x using Docker. #892
Open
DanubiaM
wants to merge
5
commits into
apache:develop
Choose a base branch
from
DanubiaM:develop
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
9aa5e74
Added docker compose and changed readme
DanubiaM 194f1f9
removed Confluent references
DanubiaM 3cf21c3
fix references
DanubiaM 0794ceb
additional suggestion on how to get the jar file
DanubiaM 962b548
rewritten how to use PLC4X with Docker
DanubiaM File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,89 @@ | ||
services: | ||
zookeeper: | ||
image: # Please added your zookeeper image here | ||
container_name: zookeeper | ||
networks: | ||
- kafka_network | ||
ports: | ||
- 22181:2181 | ||
environment: | ||
ZOOKEEPER_CLIENT_PORT: 2181 | ||
ZOOKEEPER_TICK_TIME: 2000 | ||
|
||
kafka: | ||
image: # Please added your kafka image here | ||
container_name: kafka | ||
networks: | ||
- kafka_network | ||
depends_on: | ||
- zookeeper | ||
ports: | ||
- 29093:29093 | ||
environment: | ||
KAFKA_BROKER_ID: 1 | ||
KAFKA_ZOOKEEPER_CONNECT: zookeeper:2181 | ||
KAFKA_LISTENERS: EXTERNAL_DIFFERENT_HOST://:29093,INTERNAL://:9092 | ||
KAFKA_ADVERTISED_LISTENERS: INTERNAL://kafka:9092,EXTERNAL_DIFFERENT_HOST://YOUR_IP:29093 #YOUR_IP = It is necessary to enable external access. Please insert your machine's IP. | ||
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: INTERNAL:PLAINTEXT,EXTERNAL_DIFFERENT_HOST:PLAINTEXT | ||
KAFKA_INTER_BROKER_LISTENER_NAME: INTERNAL | ||
KAFKA_OFFSETS_TOPIC_REPLICATION_FACTOR: 1 | ||
kafka-connect: | ||
image: # Please added your kafka connect image here | ||
container_name: kafka-connect | ||
depends_on: | ||
- zookeeper | ||
- kafka | ||
ports: | ||
- 8083:8083 | ||
environment: | ||
CONNECT_BOOTSTRAP_SERVERS: "kafka:9092" | ||
CONNECT_REST_PORT: 8083 | ||
CONNECT_GROUP_ID: kafka-connect | ||
CONNECT_CONFIG_STORAGE_TOPIC: _connect-configs | ||
CONNECT_OFFSET_STORAGE_TOPIC: _connect-offsets | ||
CONNECT_STATUS_STORAGE_TOPIC: _connect-status | ||
CONNECT_KEY_CONVERTER: org.apache.kafka.connect.storage.StringConverter | ||
CONNECT_VALUE_CONVERTER: org.apache.kafka.connect.json.JsonConverter | ||
CONNECT_INTERNAL_KEY_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | ||
CONNECT_INTERNAL_VALUE_CONVERTER: "org.apache.kafka.connect.json.JsonConverter" | ||
CONNECT_REST_ADVERTISED_HOST_NAME: "kafka-connect" | ||
CONNECT_LOG4J_ROOT_LOGLEVEL: "INFO" | ||
CONNECT_LOG4J_LOGGERS: "org.apache.kafka.connect.runtime.rest=WARN,org.reflections=ERROR" | ||
CONNECT_LOG4J_APPENDER_STDOUT_LAYOUT_CONVERSIONPATTERN: "[%d] %p %X{connector.context}%m (%c:%L)%n" | ||
CONNECT_CONFIG_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_OFFSET_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_STATUS_STORAGE_REPLICATION_FACTOR: "1" | ||
CONNECT_PLUGIN_PATH: /usr/share/java,/usr/share/confluent-hub-components,/data/connect-jars | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update this to not reference Confluent |
||
# To add a PLC4X connector to this image, it is necessary to create a volume with the plc4j-apache-kafka-0.10.0-uber-jar.jar file | ||
volumes: | ||
- ./folder-with-PLC4X-connector:/data/connect-jars | ||
command: | ||
- bash | ||
- -c | ||
- | | ||
echo "Launching Kafka Connect worker" | ||
/etc/confluent/docker/run & | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Please update this to not reference Confluent |
||
# | ||
sleep infinity | ||
networks: | ||
- kafka_network | ||
control-center: | ||
image: # Please added your control center image here | ||
hostname: control-center | ||
depends_on: | ||
- zookeeper | ||
- kafka | ||
- kafka-connect | ||
ports: | ||
- "9021:9021" | ||
environment: | ||
CONTROL_CENTER_BOOTSTRAP_SERVERS: 'kafka:9092' | ||
CONTROL_CENTER_REPLICATION_FACTOR: 1 | ||
CONTROL_CENTER_CONNECT_CLUSTER: http://kafka-connect:8083 | ||
PORT: 9021 | ||
networks: | ||
- kafka_network | ||
|
||
networks: | ||
kafka_network: | ||
name: kafka_docker_net |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't have any major objections to including a docker-compose file based off the Confluent images.