Skip to content

Commit 7770a13

Browse files
asanvaqalesancor1zhijie-yang
authored
docs: migrate to v2 kafka (#958)
* docs: migrate to v2 kafka * docs: update default values based on rockcraft.yaml * docs: apply suggestions from code review Co-authored-by: Alejandro Santisteban <alex.santisteban@canonical.com> * docs: update conifg options * docs: update docs and include docker legacy * chore: apply suggestions from code review Co-authored-by: zhijie-yang <zhijie.yang@canonical.com> * chore: update mount --------- Co-authored-by: Alejandro Santisteban <alex.santisteban@canonical.com> Co-authored-by: zhijie-yang <zhijie.yang@canonical.com>
1 parent 02436c9 commit 7770a13

1 file changed

Lines changed: 46 additions & 49 deletions

File tree

oci/kafka/documentation.yaml

Lines changed: 46 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,12 @@
1-
version: 1
1+
version: 2
22
application: kafka
3-
is_chiselled: False
43
description: |
5-
Current Apache Kafka Docker Image from Canonical, based on Ubuntu.
4+
Apache Kafka is an open-source distributed event streaming platform for
5+
high-performance data pipelines, streaming analytics and integrations.
6+
67
Receives security updates and tracks the newest combination of Apache
78
Kafka and Ubuntu. **This repository is free to use and exempted from
89
per-user rate limits.**
9-
10-
# About Apache Kafka
11-
Apache Kafka is an open-source distributed event streaming platform for
12-
high-performance data pipelines, streaming analytics and integrations.
13-
Read more on the [Apache Kafka website](https://kafka.apache.org/).
14-
15-
Please note that the images tagged up to 3.1 are Dockerfile-base images,
16-
whereas from version 3.6.1 onward the images are now rocks. As such the
17-
entrypoint is now Pebble. Read more on the
18-
[Rockcraft docs](https://canonical-rockcraft.readthedocs-hosted.com/en/latest/explanation/rocks/).
1910
2011
# Apache Kafka 3 Quickstart
2112
To deploy a single-broker containerized Kafka, you need to first
@@ -69,43 +60,49 @@ description: |
6960
7061
docker exec kafka chown -R kafka:kafka /tmp/kraft-combined-logs/
7162
````
63+
64+
Please note that the images tagged up to 3.1 are Dockerfile-base images,
65+
whereas from version 3.6.1 onward the images are now rocks.
66+
website: https://kafka.apache.org
67+
issues: https://github.com/canonical/kafka-rock/issues
68+
source-code: https://github.com/canonical/kafka-rock
7269

73-
# --- USAGE INFORMATION ---
7470
docker:
75-
parameters:
76-
- -p 9092:9092
77-
access: Access your Apache Kafka server at `localhost:9092`.
78-
parameters:
79-
- type: -e
80-
value: 'TZ=UTC'
81-
description: Timezone.
82-
- type: -p
83-
value: '9092:9092'
84-
description: Expose Apache Kafka server on `localhost:9092`.
85-
- type: -v
86-
value: "/path/to/config/file:/etc/kafka/server.properties"
87-
description: Local Kafka configuration file.
88-
- type: -v
89-
value: "kafkaData:/var/lib/kafka"
90-
description: >
91-
"Persist data in a docker volume named `kafkaData`. "
92-
"Make sure that the mount point is consistent with the configuration property `logs.dirs`.
93-
- type: -e
94-
value: 'ZOOKEEPER_HOST=<zookeeper>'
71+
parameters: >-
72+
-p 9092:9092
73+
run_conclusion: |
74+
Access the Apache Kafka server at `localhost:9092`.
75+
legacy:
76+
parameters: >-
77+
-p 9092:9092
78+
run_conclusion: |
79+
Access the Apache Kafka server at `localhost:9092`.
80+
81+
config:
82+
'`TZ`':
83+
type: env
84+
description: Configure the container timezone value.
85+
default: 'UTC'
86+
'`ZOOKEEPER_HOST`':
87+
type: env
9588
description: Hostname for the related Zookeeper instance. Only used in Apache Kafka 3.
96-
- type: -e
97-
value: 'ZOOKEEPER_PORT=2181'
89+
default: 'zookeeper'
90+
'`ZOOKEEPER_PORT`':
91+
type: env
9892
description: Port for the related Zookeeper instance. Only used in Apache Kafka 3.
99-
debug:
100-
text: |
101-
### Debugging
102-
103-
To debug the container:
104-
```bash
105-
docker logs -f <kafka-container>
106-
```
107-
108-
To get an interactive shell:
109-
```bash
110-
docker exec -it <kafka-container> /bin/bash
111-
```
93+
default: '2181'
94+
'`JAVA_HOME`':
95+
type: env
96+
description: Directory in which Java is installed.
97+
default: '/usr/lib/jvm/java-18-openjdk-amd64'
98+
'`-v <path>:/etc/kafka/server.properties`':
99+
type: mount
100+
description: Override Kafka server configuration file.
101+
'`-v <path>:/var/lib/kafka`':
102+
type: mount
103+
description: >-
104+
Persist data mounted inside the container.
105+
The mount point should be consistent with the configuration property `logs.dirs`.
106+
'`-p <port>:9092`':
107+
type: port
108+
description: Expose the container's port `9092` on the host's `<port>`.

0 commit comments

Comments
 (0)