-
Notifications
You must be signed in to change notification settings - Fork 10
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
95f7753
commit 6fff209
Showing
5 changed files
with
67 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
FROM java:8-jdk | ||
MAINTAINER Jan Schulte <[email protected]> | ||
|
||
ENV TRIFECTA_VERSION=0.21.0 TRIFECTA_URL=https://github.com/ldaniels528/trifecta/releases/download | ||
|
||
WORKDIR /home | ||
RUN wget $TRIFECTA_URL/v$TRIFECTA_VERSION/trifecta_ui-$TRIFECTA_VERSION.zip && \ | ||
unzip trifecta_ui-$TRIFECTA_VERSION.zip && \ | ||
rm trifecta_ui-$TRIFECTA_VERSION.zip && \ | ||
mv trifecta_ui-$TRIFECTA_VERSION trifecta | ||
|
||
COPY config.properties setup.sh entrypoint.sh ./trifecta/ | ||
RUN groupadd -r trifecta && useradd -r -g trifecta trifecta && chown -R trifecta /home && chgrp -R trifecta /home && chmod a+x trifecta/entrypoint.sh | ||
USER trifecta | ||
|
||
WORKDIR /home/trifecta | ||
|
||
VOLUME /home/trifecta/conf | ||
EXPOSE 9000 | ||
|
||
ENTRYPOINT /home/trifecta/entrypoint.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,8 @@ | ||
# docker-trifecta | ||
Trifecta docker image | ||
|
||
Start the container with the following command: | ||
|
||
```sh | ||
docker run -d --rm --name trifecta -p 9000:9000 -e ZK_HOST=localhost:2181 janschultecom/trifecta | ||
``` | ||
where ZK_HOST is the url to your Zookeeper instance (e.g. localhost:2181). |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
# the embedded web server host/IP and port for client connections | ||
trifecta.web.host = localhost | ||
trifecta.web.port = 9000 | ||
|
||
trifecta.zookeeper.host = {{ZK_HOST}} | ||
|
||
# the interval (in seconds) that changes to consumer offsets will be pushed to web-socket clients | ||
trifecta.web.push.interval.consumer = 15 | ||
|
||
# the interval (in seconds) that sampling messages will be pushed to web-socket clients | ||
trifecta.web.push.interval.sampling = 2 | ||
|
||
# the interval (in seconds) that changes to topics (new messages) will be pushed to web-socket clients | ||
trifecta.web.push.interval.topic = 15 | ||
|
||
# the number of actors to create for servicing requests | ||
trifecta.web.actor.concurrency = 10 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
#!/bin/bash | ||
# Setup trifecta configuration | ||
mkdir .trifecta | ||
chmod a+x setup.sh | ||
mv setup.sh .trifecta/ | ||
mv config.properties .trifecta/ | ||
cd .trifecta | ||
sh setup.sh | ||
|
||
# Start ui | ||
cd .. | ||
bin/trifecta_ui | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
if [ -z ${ZK_HOST+x} ]; | ||
then | ||
echo "Zookeeper host not set, using localhost"; | ||
sed -i -e s/{{ZK_HOST}}/localhost/ config.properties | ||
else | ||
echo "Using Zookeeper host: '$ZK_HOST'"; | ||
sed -i -e s/{{ZK_HOST}}/${ZK_HOST}/ config.properties | ||
fi |