-
Notifications
You must be signed in to change notification settings - Fork 8
/
start-ksql
executable file
·41 lines (30 loc) · 1.11 KB
/
start-ksql
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
#!/usr/bin/env bash
KSQL_PROPERTIES_FILE="ksql-server.properties"
KSQL_URL="https://github.com/confluentinc/ksql/releases/download/v0.4/ksql-0.4.tgz"
./setup_certs HEROKU_KAFKA_JCHAO
cat > $KSQL_PROPERTIES_FILE <<PROPERTIES
# AdminClient
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
confluent.support.metrics.enable=false
bootstrap.servers=${HEROKU_KAFKA_JCHAO_URL//kafka+ssl:\/\//}
# KSQL
application.id=ksql-cluster
listeners=http://0.0.0.0:$PORT
ksql.cluster.id=ksq-heroku
listeners=http://0.0.0.0:$PORT
PROPERTIES
wget -qO - $KSQL_URL | tar -zxf -
if ! [ $? ]; then
echo "could not download ksql package"
fi
cp ksql/bin/* .apt/usr/bin
mkdir .apt/usr/share/java/ksql
cp ksql/share/java/ksql/*.jar .apt/usr/share/java/ksql
mkdir .apt/etc/ksql
cp ksql/config/* .apt/etc/ksql
KSQL_LOG4J_OPTS="-Dlog4j.configuration=file:.apt/etc/ksql/log4j.properties" KAFKA_HEAP_OPTS="-Xms1g -Xmx1g" .apt/usr/bin/ksql-server-start $KSQL_PROPERTIES_FILE