-
Notifications
You must be signed in to change notification settings - Fork 96
Add dockerfile and update README #429
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
19 commits
Select commit
Hold shift + click to select a range
039b437
Added dockerfile and updated README
mpardesh 530e784
Added dockerfile and updated README
mpardesh 277f8d0
changed BRANCH
mpardesh c36a249
moved Dockerfile and removed Docker instruction from README
mpardesh 23dc171
Added Docker instructions
mpardesh 4b608fd
updated commands and links
mpardesh aff7b9b
kept git in Dockerfile
mpardesh 1e35510
kept git
mpardesh f883950
fixed formatting
mpardesh c6c4a1f
more formatting changes
mpardesh 17e5000
updated docker run and stop commands
mpardesh b8412f8
edited entrypoint in Dockerfile and moved those commands to entrypoin…
mpardesh 8162849
updated path in entrypoint
mpardesh c99fe36
added & after starting Druid
mpardesh 14add72
changed branch to master
mpardesh aec1c1c
added command to install curl
mpardesh ec2b1ba
made sure that Docker doesn't run forever if Druid fails to start
mpardesh d42f55d
fixed formatting
mpardesh b352a5b
changed style
mpardesh File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or 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
This file contains hidden or 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
This file contains hidden or 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,29 @@ | ||
| FROM druidio/example-cluster:latest | ||
| LABEL maintainer="https://groups.google.com/forum/#!forum/fili-developers" | ||
|
|
||
| # fili github information | ||
| ENV GITHUB_OWNER yahoo | ||
| ENV BRANCH master | ||
|
|
||
| RUN apt-get update && apt-get install -y --no-install-recommends git curl | ||
|
|
||
| RUN wget -q -O - http://archive.apache.org/dist/maven/maven-3/3.2.5/binaries/apache-maven-3.2.5-bin.tar.gz | tar -xzf - -C /usr/local \ | ||
| && ln -s /usr/local/apache-maven-3.2.5 /usr/local/apache-maven \ | ||
| && ln -s -f /usr/local/apache-maven/bin/mvn /usr/local/bin/mvn | ||
|
|
||
| # fili code goes here | ||
| RUN mkdir -p /usr/local/fili | ||
|
|
||
| # update in case of new commits | ||
| ADD https://api.github.com/repos/$GITHUB_OWNER/fili/git/refs/heads/$BRANCH fili-branch.json | ||
| RUN git clone -q --branch ${BRANCH} --depth 1 https://github.com/$GITHUB_OWNER/fili.git /usr/local/fili | ||
|
|
||
| WORKDIR /usr/local/fili | ||
|
|
||
| # install Fili in the container | ||
| RUN mvn -U -B install -DskipTests=true -Dmaven.javadoc.skip=true -Dcheckstyle.skip | ||
|
|
||
| EXPOSE 9998 | ||
|
|
||
| RUN chmod +x /usr/local/fili/fili-wikipedia-example/entrypoint.sh | ||
| ENTRYPOINT ["/usr/local/fili/fili-wikipedia-example/entrypoint.sh"] |
This file contains hidden or 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
This file contains hidden or 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,23 @@ | ||
| #!/bin/sh | ||
|
|
||
| export HOSTIP="$(resolveip -s $HOSTNAME)" | ||
| /usr/bin/supervisord -c /etc/supervisor/conf.d/supervisord.conf & | ||
| echo "Waiting for Druid to finish setting up" | ||
|
|
||
| time_left=300 | ||
|
|
||
| while ! curl http://localhost:8081/druid/coordinator/v1/datasources | grep -q "wikipedia"; do | ||
| if [ "$time_left" -le 0 ] | ||
| then | ||
| echo "Druid is having trouble setting up" | ||
| exit | ||
| fi | ||
| sleep 5 | ||
| time_left=$(( time_left - 5 )) | ||
| done | ||
|
|
||
| echo "Druid finished setting up. Starting Fili" | ||
| mvn -pl fili-generic-example exec:java -Dbard__fili_port=9998 | ||
| -Dbard__druid_coord=http://localhost:8081/druid/coordinator/v1 | ||
| -Dbard__non_ui_druid_broker=http://localhost:8082/druid/v2 | ||
| -Dbard__ui_druid_broker=http://localhost:8082/druid/v2 | ||
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not going to block on this, but we may want to add a timeout here, so that docker doesn't just hang if Druid is having a problem loading up.