2
0
mirror of https://github.com/vimagick/dockerfiles.git synced 2025-12-24 06:28:23 +01:00

split presto to prestodb+prestosql

This commit is contained in:
kev
2019-10-21 11:36:26 +08:00
parent 46eb7659a1
commit b48eefc547
32 changed files with 121 additions and 63 deletions

View File

@@ -0,0 +1,28 @@
#
# Dockerfile for prestosql
#
FROM openjdk:8-jre-alpine
MAINTAINER kev <noreply@easypi.pro>
ENV PRESTO_VERSION=322
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/io/prestosql/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/io/prestosql/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
ENV PRESTO_HOME=/opt/presto
ENV PATH=${PRESTO_HOME}/bin:${PATH}
WORKDIR $PRESTO_HOME
RUN set -xe \
&& apk add --no-cache curl python tar \
&& curl -sSL $PRESTO_SERVER_URL | tar xz --strip 1 \
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
&& chmod +x ./bin/presto \
&& apk del curl tar
VOLUME /data
EXPOSE 8080
ENTRYPOINT ["launcher"]
CMD ["run"]

View File

@@ -0,0 +1,30 @@
#
# Dockerfile for presto-ce
#
FROM openjdk:8-jre-slim-buster
MAINTAINER kev <noreply@easypi.pro>
ENV PRESTO_VERSION=322
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/io/prestosql/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/io/prestosql/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
ENV PRESTO_HOME=/opt/presto
ENV PATH=${PRESTO_HOME}/bin:${PATH}
WORKDIR $PRESTO_HOME
RUN set -xe \
&& apt-get update \
&& apt-get install -y curl less python \
&& curl -sSL $PRESTO_SERVER_URL | tar xz --strip 1 \
&& curl -sSL $PRESTO_CLI_URL > ./bin/presto \
&& chmod +x ./bin/presto \
&& apt-get remove -y curl \
&& rm -rf /var/lib/apt/lists/*
VOLUME /data
EXPOSE 8080
ENTRYPOINT ["launcher"]
CMD ["run"]

6
prestosql/README.md Normal file
View File

@@ -0,0 +1,6 @@
prestosql
=========
[Presto][1] is a high performance, distributed SQL query engine for big data.
[1]: https://prestosql.io

View File

@@ -0,0 +1,50 @@
version: "3.7"
services:
coordinator:
image: vimagick/prestosql
ports:
- "8080:8080"
volumes:
- /data:/data
- prestosql_coordinator_conf:/opt/presto/etc
deploy:
replicas: 1
placement:
constraints:
- node.role == manager
- node.hostname == presto-coordinator
restart_policy:
condition: on-failure
worker:
image: vimagick/prestosql
volumes:
- /data:/data
- prestosql_worker_conf:/opt/presto/etc
deploy:
replicas: 0
placement:
constraints:
- node.role == worker
restart_policy:
condition: on-failure
depends_on:
- coordinator
volumes:
prestosql_coordinator_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/prestosql/coordinator"
prestosql_worker_conf:
driver: local
driver_opts:
type: nfs
o: "addr=10.0.0.1,nolock,soft,ro"
device: ":/export/prestosql/worker"