Skip to content

Commit fe51cdc

Browse files
phvalguimaizmalk
andauthoredJan 15, 2025
[DPE-6254] Update README.md (#2)
Co-authored-by: Vladimir Izmalkov <48120135+izmalk@users.noreply.github.com>
1 parent 030235e commit fe51cdc

File tree

3 files changed

+83
-3
lines changed

3 files changed

+83
-3
lines changed
 

‎CONTRIBUTING.md

+1-2
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,6 @@ tox # runs 'format', 'lint', 'static', and 'unit' environme
2828
Build the charm in this git repository using:
2929

3030
```shell
31-
charmcraftcache pack
31+
charmcraft pack
3232
```
3333

34-
<!-- You may want to include any contribution/style guidelines in this document>

‎LICENSE

+1-1
Original file line numberDiff line numberDiff line change
@@ -187,7 +187,7 @@
187187
same "printed page" as the copyright notice for easier
188188
identification within third-party archives.
189189

190-
Copyright 2024 Canonical Ltd.
190+
Copyright 2025 Canonical Ltd.
191191

192192
Licensed under the Apache License, Version 2.0 (the "License");
193193
you may not use this file except in compliance with the License.

‎README.md

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
# Apache Kafka benchmark operator
2+
3+
The Apache Kafka benchmark charm uses the [OpenMessaging](https://github.com/openmessaging/benchmark) tool to test both producer and consumer performance in the cluster.
4+
5+
The OpenMessaging allows for a distributed deployment, where the charm leader will run the main "manager" process and gather the metrics, whilst other units will act as followers and act as producer/consumers of the cluster.
6+
7+
## Usage
8+
9+
10+
Create a new Juju model:
11+
12+
```
13+
juju add-model kafka-benchmark
14+
```
15+
16+
Deploy Apache Kafka with Juju:
17+
18+
```
19+
juju deploy kafka --channel=3/edge
20+
juju deploy zookeeper --channel=3/edge
21+
juju relate kafka zookeeper
22+
```
23+
24+
Deploy the benchmark tool and relate it to the cluster:
25+
26+
```
27+
juju deploy kafka-benchmark --channel=latest/edge
28+
juju relate kafka kafka-benchmark
29+
```
30+
31+
### Benchmarking
32+
33+
To kick start a benchmark, execute the following actions:
34+
35+
```
36+
juju run kafka-benchmark/leader prepare # to set the environment and the cluster
37+
juju run kafka-benchmark/leader run
38+
```
39+
40+
The units will pick-up the command and start executing the benchmark.
41+
42+
### Stop benchmarking
43+
44+
To stop the benchmark, execute:
45+
46+
```
47+
juju run kafka-benchmark/leader stop
48+
```
49+
50+
Optionally, it is possible to clean the current benchmark data using:
51+
52+
```
53+
juju run kafka-benchmark/leader cleanup
54+
```
55+
56+
That will return both Apache Kafka benchmark charm and Apache Kafka cluster to their original condition.
57+
58+
### COS integration
59+
60+
Relate the Apache Kafka benchmark with a [`grafana-agent` operator](https://charmhub.io/grafana-agent).
61+
62+
For more details on how to deploy and configure COS and its agents, check [the upstream documentation](https://canonical.com/data/docs/kafka/iaas/h-enable-monitoring).
63+
64+
Once the `grafana-agent` is deployed, relate it with:
65+
66+
```
67+
juju relate grafana-agent kafka-benchmark
68+
```
69+
70+
The benchmark data will be collected every 10s and sent to prometheus.
71+
72+
73+
## Contributing
74+
75+
Please see the [Juju SDK docs](https://juju.is/docs/sdk) for guidelines on enhancements to this charm following best practice guidelines, and [CONTRIBUTING.md](https://github.com/canonical/kafka-benchmark-operator/blob/main/CONTRIBUTING.md) for developer guidance.
76+
77+
Also, if you truly enjoy working on open-source projects like this one, check out the [career options](https://canonical.com/careers/all) we have at [Canonical](https://canonical.com/).
78+
79+
## License
80+
81+
Apache Kafka benchmark operator is free software, distributed under the Apache Software License, version 2.0. See [LICENSE](https://github.com/canonical/kafka-benchmark-operator/blob/main/LICENSE) for more information.

0 commit comments

Comments
 (0)
Please sign in to comment.