-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathrun.sh
21 lines (21 loc) · 1.16 KB
/
run.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/env bash
export CLASSPATH="$(find target/ -type f -name '*.jar'| grep '\-package' | tr '\n' ':')"
if hash docker 2>/dev/null; then
# for docker lovers
docker build . -t quangtn/kafka-connect-source-github:1.0
docker run --net=host --rm -t \
-v $(pwd)/offsets:/kafka-connect-source-github/offsets \
quangtn/kafka-connect-source-github:1.0
elif hash connect-standalone 2>/dev/null; then
# for mac users who used homebrew
connect-standalone config/worker.propoerties config/GitHubSourceConnectorExample.properties
elif [[ -z $KAFKA_HOME ]]; then
# for people who installed kafka vanilla
$KAFKA_HOME/bin/connect-standalone.sh $KAFKA_HOME/etc/schema-registry/connect-avro-standalone.properties config/GitHubSourceConnectorExample.properties
elif [[ -z $CONFLUENT_HOME ]]; then
# for people who installed kafka confluent flavour
$CONFLUENT_HOME/bin/connect-standalone $CONFLUENT_HOME/ect/schema-registry/connect-avro-standalone.properties config/GitHubSourceConenctorExample.properties
else
printf "Couldn't find a suitable way to run kafka conncet for you.\n \
Please install Docker, or download the kafka binaries and set the variable KAFKA_HOME."
fi;