Skip to content
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

Add kafka profile #159

Merged
merged 1 commit into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions profiles/kafka/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# kafka

## Usage

* Runs a kafka service at port 9092

You can connect external tools (e.g. PyCharm kafka plugin) to this kafka instance without authentication.

There are scripts included with kafka you can invoke via `exec` for testing, e.g.

```shell
oci-env exec -s kafka \
/opt/kafka/bin/kafka-console-consumer.sh \
--bootstrap-server=localhost:9092 \
--offset earliest \
--partition 0 \
--topic pulpcore.tasking.status \
--max-messages=1
```

## Extra Variables

None.
22 changes: 22 additions & 0 deletions profiles/kafka/compose.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
version: "3.7"

services:
kafka:
hostname: kafka
image: docker.io/apache/kafka:3.7.0
ports:
- "9092:29092"
environment:
- "KAFKA_NODE_ID=1"
- "KAFKA_LISTENER_SECURITY_PROTOCOL_MAP=CONTROLLER:PLAINTEXT,PLAINTEXT:PLAINTEXT,PLAINTEXT_HOST:PLAINTEXT"
- "KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://kafka:9092,PLAINTEXT_HOST://localhost:9092"
- "KAFKA_LISTENERS=CONTROLLER://:29093,PLAINTEXT://:9092,PLAINTEXT_HOST://:29092"
- "KAFKA_PROCESS_ROLES=broker,controller"
- "KAFKA_CONTROLLER_LISTENER_NAMES=CONTROLLER"
- "KAFKA_CONTROLLER_QUORUM_VOTERS=1@localhost:29093"
volumes:
- "oci_kafka_data:/var/lib/kafka/data"

volumes:
oci_kafka_data:
name: "{COMPOSE_PROJECT_NAME}_kafka"
1 change: 1 addition & 0 deletions profiles/kafka/pulp_config.env
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
PULP_KAFKA_BOOTSTRAP_SERVERS=kafka:9092
Loading