-
Notifications
You must be signed in to change notification settings - Fork 2
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
add sample Docker file #21
Merged
Merged
Changes from all commits
Commits
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 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,32 @@ | ||
# From https://prestodb.io/docs/current/installation/deployment.html#an-example-deployment-with-docker | ||
|
||
FROM openjdk:8-jre | ||
|
||
# Presto version will be passed in at build time | ||
ARG PRESTO_VERSION | ||
|
||
# Set the URL to download | ||
ARG PRESTO_BIN=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz | ||
|
||
# Update the base image OS and install wget and python | ||
RUN apt-get update | ||
RUN apt-get install -y wget python less | ||
|
||
# Download Presto and unpack it to /opt/presto | ||
RUN wget --quiet ${PRESTO_BIN} | ||
RUN mkdir -p /opt | ||
RUN tar -xf presto-server-${PRESTO_VERSION}.tar.gz -C /opt | ||
RUN rm presto-server-${PRESTO_VERSION}.tar.gz | ||
RUN ln -s /opt/presto-server-${PRESTO_VERSION} /opt/presto | ||
|
||
# Download the Presto CLI and put it in the image | ||
RUN wget --quiet https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar | ||
RUN mv presto-cli-${PRESTO_VERSION}-executable.jar /usr/local/bin/presto | ||
RUN chmod +x /usr/local/bin/presto | ||
|
||
# Copy configuration files on the host into the image | ||
COPY plugin /opt/presto/plugin | ||
COPY etc /opt/presto/etc | ||
|
||
# Specify the entrypoint to start | ||
ENTRYPOINT ./opt/presto/bin/launcher run |
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,30 @@ | ||
# Sample Docker File | ||
|
||
It can be difficult to test h3-presto if you don't have a Presto server running already. These instructions help you get a Presto node with h3-presto running for development. (These instructions are based on the [Presto Docker deployment](https://prestodb.io/docs/current/installation/deployment.html#an-example-deployment-with-docker) instructions.) | ||
|
||
To build, starting from the root of the repository: | ||
|
||
```sh | ||
mvn clean package -DskipTests | ||
cd contrib/docker | ||
cp ../../target/h3-presto-4.0.0.jar plugin/h3/h3-presto-4.0.0.jar | ||
docker build -f Dockerfile -t presto --build-arg PRESTO_VERSION=0.286 . | ||
``` | ||
|
||
To run: | ||
|
||
```sh | ||
docker run -p 8080:8080 --rm -it presto | ||
``` | ||
|
||
And then in another terminal, run the [Presto command line interface](https://prestodb.io/docs/current/installation/cli.html): | ||
|
||
```sh | ||
./presto | ||
``` | ||
|
||
And try a sample query: | ||
|
||
```sql | ||
select h3_latlng_to_cell(0,0,0); | ||
``` |
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,8 @@ | ||
coordinator=true | ||
node-scheduler.include-coordinator=true | ||
http-server.http.port=8080 | ||
query.max-memory=2GB | ||
query.max-memory-per-node=1GB | ||
discovery-server.enabled=false | ||
#discovery.uri=http://example.net:8080 | ||
|
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,8 @@ | ||
-server | ||
-Xmx8G | ||
-XX:+UseG1GC | ||
-XX:G1HeapRegionSize=32M | ||
-XX:+UseGCOverheadLimit | ||
-XX:+ExplicitGCInvokesConcurrent | ||
-XX:+HeapDumpOnOutOfMemoryError | ||
-XX:+ExitOnOutOfMemoryError |
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,3 @@ | ||
node.environment=production | ||
node.id=ffffffff-ffff-ffff-ffff-ffffffffffff | ||
node.data-dir=/data |
Empty file.
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
Oops, something went wrong.
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.
Had to look this up: https://prestodb.io/docs/0.285/installation/deployment.html#node-properties