Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/dlesl/cp-mini
https://github.com/dlesl/cp-mini
Last synced: 19 days ago
JSON representation
- Host: GitHub
- URL: https://github.com/dlesl/cp-mini
- Owner: dlesl
- Created: 2022-08-19T22:23:47.000Z (over 2 years ago)
- Default Branch: master
- Last Pushed: 2023-09-01T15:59:10.000Z (over 1 year ago)
- Last Synced: 2024-10-19T00:57:31.316Z (2 months ago)
- Language: Java
- Size: 76.2 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# cp-mini
Run Zookeeper, Kafka and Schema Registry together in a single process, as a docker image or jar.
* Fast starting (~ 6 seconds until all three services are ready)
* Almost small (75 mb jar)
* Configurable via env vars## Usage
As a docker image (amd64 or arm64)
``` sh
docker run --rm -p 2181:2181 -p 29092:29092 -p 8081:8081 \
-e CREATE_TOPICS=test_topic \
ghcr.io/dlesl/cp-mini
```Or in a docker-compose stack (here we make the kafka broker accessible from the host at `localhost:29092`)
``` yaml
services:
cp-mini:
image: ghcr.io/dlesl/cp-mini
ports:
- 8081:8081
- 29092:29092
environment:
CREATE_TOPICS: test_topic
ROOT_LOG_LEVEL: info
KAFKA_LISTENER_SECURITY_PROTOCOL_MAP: CLIENT:PLAINTEXT,EXTERNAL:PLAINTEXT
KAFKA_LISTENERS: CLIENT://:9092,EXTERNAL://:29092
KAFKA_ADVERTISED_LISTENERS: CLIENT://cp-mini:9092,EXTERNAL://127.0.0.1:29092
KAFKA_INTER_BROKER_LISTENER_NAME: CLIENT```
As a jar (grab it from the releases page)
``` sh
java -jar cp-mini.jar
# arguments will be interpreted as a command to execute once the stack is up, useful for running tests
java -jar cp-mini.jar bash ./my-test-suite.sh
```