Skip to content

Commit

Permalink
[DPE-3233] Apache Kafka <> OCI Factory Integration (#155)
Browse files Browse the repository at this point in the history
  • Loading branch information
deusebio authored Apr 8, 2024
1 parent 7ea506a commit 41d5513
Show file tree
Hide file tree
Showing 4 changed files with 107 additions and 0 deletions.
2 changes: 2 additions & 0 deletions oci/kafka/.trivyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
# CVEs in upstream

6 changes: 6 additions & 0 deletions oci/kafka/contacts.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Who and how to notify about the build progress.
notify:
emails:
- [email protected]
mattermost-channels:
- wxppdtg4obdg9csp9wxnqs1wqw # alerts on DataPlatform OCI channel
88 changes: 88 additions & 0 deletions oci/kafka/documentation.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,88 @@
version: 1
application: kafka
is_chiselled: False
description: |
Current Apache Kafka Docker Image from Canonical, based on Ubuntu.
Receives security updates and tracks the newest combination of Apache
Kafka and Ubuntu. **This repository is free to use and exempted from
per-user rate limits.**
# About Apache Kafka
Apache Kafka is an open-source distributed event streaming platform for
high-performance data pipelines, streaming analytics and integrations.
Read more on the [Apache Kafka website](https://kafka.apache.org/).
This image requires the
[Apache Zookeeper image](https://hub.docker.com/r/ubuntu/zookeeper)
to run properly.
Please note that the images tagged up to 3.1 are Dockerfile-base images,
whereas from version 3.6.1 onward the images are now ROCKs. As such the
entrypoint is now Pebble. Read more on the
[Rockcraft docs](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/explanation/rocks/).
# Quickstart
To deploy a single-broker dockerized version of Kafka, you need to first
deploy the ZooKeeper service and make sure that the ZooKeeper service is
reachable by Kafka.
First, create a network
```bash
docker network create -d bridge kafka-network
```
Deploy the ZooKeeper service
```bash
docker run --detach \
--network kafka-network --name zookeeper \
ubuntu/zookeeper:3.8-22.04_edge
```
Finally, deploy the Kafka service
```
docker run --detach \
--name kafka --network kafka-network -p 9092:9092 \
kafka:3.6-22.04_edge
```
# --- USAGE INFORMATION ---
docker:
parameters:
- -p 9092:9092
access: Access your Apache Kafka server at `http://localhost:9092`.
parameters:
- type: -e
value: 'TZ=UTC'
description: Timezone.
- type: -e
value: 'ZOOKEEPER_HOST=<zookeeper>'
description: Hostname for the related Zookeeper instance.
- type: -e
value: 'ZOOKEEPER_PORT=2181'
description: Port for the related Zookeeper instance.
- type: -p
value: '9092:9092'
description: Expose Apache Kafka server on `localhost:2181`.
- type: -v
value: "/path/to/config/file:/etc/kafka/server.properties"
description: Local Kafka configuration file.
- type: -v
value: "kafkaData:/var/lib/kafka"
description: >
"Persist data in a docker volume named `kafkaData`. "
"Make sure that the mount point is consistent with the configuration property `logs.dirs`.
debug:
text: |
### Debugging
To debug the container:
```bash
docker logs -f <kafka-container>
```
To get an interactive shell:
```bash
docker exec -it <kafka-container> /bin/bash
```
11 changes: 11 additions & 0 deletions oci/kafka/image.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
version: 1

upload:
- source: "canonical/kafka-rock"
commit: edc4505e547f3c6342940276b486936bcf924e9a
directory: .
release:
3.6-22.04:
end-of-life: "2024-05-01T00:00:00Z"
risks:
- edge

0 comments on commit 41d5513

Please sign in to comment.