-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Here's the Dockerfile and instructions I used to test #20.
- Loading branch information
1 parent
618b5a3
commit 78a0387
Showing
7 changed files
with
82 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,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