forked from uber/uReplicator
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathentrypoint.sh
36 lines (27 loc) · 1016 Bytes
/
entrypoint.sh
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
#!/bin/bash -ex
if [[ "${LOGICAL_PROCESSORS}" == "" ]]; then
LOGICAL_PROCESSORS=`getconf _NPROCESSORS_ONLN`
fi
export JAVA_OPTS="${JAVA_OPTS} -XX:ParallelGCThreads=${LOGICAL_PROCESSORS}"
confd -onetime -backend env
cd /uReplicator/bin/
if [ "${SERVICE_TYPE}" == "controller" ] ; then
./start-controller.sh \
-port 9000 \
-helixClusterName "${HELIX_CLUSTER_NAME}" \
-refreshTimeInSeconds 10 \
-enableAutoWhitelist "${AUTO_WHITELIST}" \
-srcKafkaZkPath "${SRC_ZK_CONNECT}" \
-destKafkaZkPath "${DST_ZK_CONNECT}" \
-zookeeper "${SRC_ZK_CONNECT}"
until [[ "OK" == "$(curl --silent http://localhost:9000/health)" ]]; do
echo waiting
sleep 1
done
elif [ "${SERVICE_TYPE}" == "worker" ] ; then
./start-worker.sh \
--consumer.config /uReplicator/config/consumer.properties \
--producer.config /uReplicator/config/producer.properties \
--helix.config /uReplicator/config/helix.properties \
--topic.mappings /uReplicator/config/topicmapping.properties
fi