-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Added action to install Bitnami Kafka and Zookeeper
- Loading branch information
BBC
committed
Nov 9, 2020
1 parent
dd95cba
commit a59640c
Showing
4 changed files
with
52 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
FROM docker:stable | ||
|
||
COPY entrypoint.sh /entrypoint.sh | ||
RUN chmod +x /entrypoint.sh | ||
ENTRYPOINT ["/entrypoint.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,16 @@ | ||
# kafka-actions | ||
Action to install kafka | ||
|
||
This [GitHub Action](https://github.com/features/actions) sets up Bitnami Kafka instance. | ||
|
||
Inspired by https://github.com/getong/rabbitmq-action, @getong Thanks! | ||
|
||
--------- | ||
## Usage | ||
|
||
See [action.yml](action.yml) | ||
|
||
|
||
--------- | ||
## License | ||
|
||
The scripts and documentation in this project are released under the [MIT License](LICENSE) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
name: 'Setup Bitnami Kafka' | ||
description: 'Setup Bitnami Kafka' | ||
author: 'bbccorp' | ||
inputs: | ||
kafka version: | ||
description: 'Version of Bitnami Kafka to use' | ||
required: false | ||
default: 'latest' | ||
zookeeper version: | ||
description: 'Version of Bitnami Zookeeper to use' | ||
required: false | ||
default: 'latest' | ||
kafka port: | ||
description: 'The port of Kafka host' | ||
required: false | ||
default: 9092 | ||
zookeeper port: | ||
description: 'The port of Zookeeper host' | ||
required: false | ||
default: 2181 | ||
runs: | ||
using: 'docker' | ||
image: 'Dockerfile' |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/sh | ||
|
||
docker_run="docker run" | ||
|
||
run_zookeeper="$docker_run -d -p $INPUT_ZOOKEEPER_PORT:2181 -e ALLOW_ANONYMOUS_LOGIN=yes bitnami/zookeeper:$INPUT_ZOOKEEPER_VERSION" | ||
sh -c "$run_zookeeper" | ||
|
||
run_kafka="$docker_run -d -p $INPUT_KAFKA_PORT:9092 -e KAFKA_BROKER_ID=1 -e KAFKA_LISTENERS=PLAINTEXT://:9092 -e KAFKA_ADVERTISED_LISTENERS=PLAINTEXT://127.0.0.1:9092 -e ALLOW_PLAINTEXT_LISTENER=yes -e KAFKA_ZOOKEEPER_CONNECT=zookeeper:2181 bitnami/kafka:$INPUT_KAFKA_VERSION" | ||
sh -c "$run_kafka" |