Skip to content

Commit b00ef42

Browse files
committed
feat(scripts): add arg to specify number of connect workers
1 parent ef8fbc3 commit b00ef42

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

debug.sh

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,15 +15,18 @@ banner() {
1515
usage() {
1616
echo "Usage: $0 [options]" 1>&2 && \
1717
echo -e "\t -b \t: Build project and the Docker image." 1>&2 && \
18+
echo -e "\t -s \t: Number of connect workers (default: 2)." 1>&2 && \
1819
echo -e "\t -h\t: Print this Help." 1>&2; exit 1;
1920
}
2021

2122
banner
2223

2324
BUILD="false"
24-
while getopts "bh" o; do
25+
SCALE=2
26+
while getopts "bhs:" o; do
2527
case "${o}" in
2628
b) BUILD="true";;
29+
s) SCALE="${OPTARG}";;
2730
h|*)
2831
usage
2932
;;
@@ -39,7 +42,7 @@ echo -e "\n🐳 Stopping previous Kafka Docker-Compose stack..."
3942
(cd "$BASEDIR"; docker-compose -f ./docker-compose-debug.yml down)
4043

4144
echo -e "\n🐳 Starting Kafka Docker-Compose stack..."
42-
(cd "$BASEDIR"; docker-compose -f ./docker-compose-debug.yml up -d --scale connect=2)
45+
(cd "$BASEDIR"; docker-compose -f ./docker-compose-debug.yml up -d --scale connect=$SCALE)
4346

4447
echo -e "\n⏳ Waiting for Kafka Connect..."
4548
CONNECT_URL=http://localhost:80/connectors

0 commit comments

Comments
 (0)