-
Notifications
You must be signed in to change notification settings - Fork 8
/
Copy pathstart-distributed
executable file
·85 lines (65 loc) · 3.22 KB
/
start-distributed
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
#!/usr/bin/env bash
DYNO_CONNECT_DISTRIBUTED_PROPERTIES_FILE="dyno-connect-distributed.properties"
DEBEZIUM_CONNECTOR_URL="https://repo1.maven.org/maven2/io/debezium/debezium-connector-postgres/0.7.2/debezium-connector-postgres-0.7.2-plugin.tar.gz"
./setup_certs KAFKA
cat > $DYNO_CONNECT_DISTRIBUTED_PROPERTIES_FILE <<PROPERTIES
producer.security.protocol=SSL
producer.ssl.truststore.location=$HOME/.truststore.jks
producer.ssl.truststore.password=$TRUSTSTORE_PASSWORD
producer.ssl.keystore.location=$HOME/.keystore.jks
producer.ssl.keystore.password=$KEYSTORE_PASSWORD
producer.ssl.key.password=$KEYSTORE_PASSWORD
consumer.security.protocol=SSL
consumer.ssl.truststore.location=$HOME/.truststore.jks
consumer.ssl.truststore.password=$TRUSTSTORE_PASSWORD
consumer.ssl.keystore.location=$HOME/.keystore.jks
consumer.ssl.keystore.password=$KEYSTORE_PASSWORD
consumer.ssl.key.password=$KEYSTORE_PASSWORD
security.protocol=SSL
ssl.truststore.location=$HOME/.truststore.jks
ssl.truststore.password=$TRUSTSTORE_PASSWORD
ssl.keystore.location=$HOME/.keystore.jks
ssl.keystore.password=$KEYSTORE_PASSWORD
ssl.key.password=$KEYSTORE_PASSWORD
bootstrap.servers=${KAFKA_URL//kafka+ssl:\/\//}
group.id=connect-cluster
key.converter=org.apache.kafka.connect.json.JsonConverter
value.converter=org.apache.kafka.connect.json.JsonConverter
key.converter.schemas.enable=true
value.converter.schemas.enable=true
internal.key.converter=org.apache.kafka.connect.json.JsonConverter
internal.value.converter=org.apache.kafka.connect.json.JsonConverter
internal.key.converter.schemas.enable=false
internal.value.converter.schemas.enable=false
offset.storage.topic=connect-offsets
offset.storage.replication.factor=3
config.storage.topic=connect-configs
config.storage.replication.factor=3
status.storage.topic=connect-status
status.storage.replication.factor=3
offset.flush.interval.ms=10000
# These are provided to inform the user about the presence of the REST host and port configs
# Hostname & Port for the REST API to listen on. If this is set, it will bind to the interface used to listen to requests.
#rest.host.name=
rest.port=$PORT
# The Hostname & Port that will be given out to other workers to connect to i.e. URLs that are routable from other servers.
#rest.advertised.host.name=
#rest.advertised.port=
# Set to a list of filesystem paths separated by commas (,) to enable class loading isolation for plugins
# (connectors, converters, transformations). The list should consist of top level directories that include
# any combination of:
# a) directories immediately containing jars with plugins and their dependencies
# b) uber-jars with plugins and their dependencies
# c) directories immediately containing the package directory structure of classes of plugins and their dependencies
# Examples:
# plugin.path=/usr/local/share/java,/usr/local/share/kafka/plugins,/opt/connectors,
plugin.path=.apt/usr/share/java
PROPERTIES
mkdir .apt/usr/config
cp .apt/etc/kafka/connect-log4j.properties .apt/usr/config
wget -qO - $DEBEZIUM_CONNECTOR_URL | tar -zxf -
if ! [ $? ]; then
echo "could not download debezium connector"
fi
cp debezium-connector-postgres/*.jar .apt/usr/share/java/kafka
KAFKA_HEAP_OPTS="-Xms1g -Xmx1g" .apt/usr/bin/connect-distributed dyno-connect-distributed.properties