mirror of
https://github.com/vimagick/dockerfiles.git
synced 2025-05-13 22:06:55 +02:00
update presto
This commit is contained in:
parent
7758b2240f
commit
708ff76516
@ -2,10 +2,10 @@
|
|||||||
# Dockerfile for presto
|
# Dockerfile for presto
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM openjdk:8-jre-slim
|
FROM openjdk:8-jre-slim-buster
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
MAINTAINER kev <noreply@easypi.pro>
|
||||||
|
|
||||||
ENV PRESTO_VERSION=0.221
|
ENV PRESTO_VERSION=0.226
|
||||||
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
|
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
|
||||||
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
|
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
|
||||||
ENV PRESTO_HOME=/opt/presto
|
ENV PRESTO_HOME=/opt/presto
|
||||||
|
@ -2,10 +2,10 @@
|
|||||||
# Dockerfile for presto
|
# Dockerfile for presto
|
||||||
#
|
#
|
||||||
|
|
||||||
FROM openjdk:13-alpine
|
FROM openjdk:8-jre-alpine
|
||||||
MAINTAINER kev <noreply@easypi.pro>
|
MAINTAINER kev <noreply@easypi.pro>
|
||||||
|
|
||||||
ENV PRESTO_VERSION=0.221
|
ENV PRESTO_VERSION=0.226
|
||||||
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
|
ENV PRESTO_SERVER_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-server/${PRESTO_VERSION}/presto-server-${PRESTO_VERSION}.tar.gz
|
||||||
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
|
ENV PRESTO_CLI_URL=https://repo1.maven.org/maven2/com/facebook/presto/presto-cli/${PRESTO_VERSION}/presto-cli-${PRESTO_VERSION}-executable.jar
|
||||||
ENV PRESTO_HOME=/opt/presto
|
ENV PRESTO_HOME=/opt/presto
|
||||||
|
@ -4,31 +4,31 @@ presto
|
|||||||
[Presto][1] is a distributed SQL query engine designed to query large data sets
|
[Presto][1] is a distributed SQL query engine designed to query large data sets
|
||||||
distributed over one or more heterogeneous data sources.
|
distributed over one or more heterogeneous data sources.
|
||||||
|
|
||||||
## docker-compose.yaml
|
|
||||||
|
|
||||||
```yaml
|
|
||||||
presto:
|
|
||||||
image: vimagick/presto
|
|
||||||
ports:
|
|
||||||
- "8080:8080"
|
|
||||||
volumes:
|
|
||||||
- ./conf/standalone:/opt/presto/etc
|
|
||||||
- ./data/standalone:/data
|
|
||||||
restart: unless-stopped
|
|
||||||
```
|
|
||||||
|
|
||||||
## up and running
|
## up and running
|
||||||
|
|
||||||
```bash
|
```bash
|
||||||
$ docker-comopse up -d
|
$ ansible all -a 'mkdir -p /data'
|
||||||
|
|
||||||
$ docker-compose exec presto presto --server localhost:8080 --catalog tpch
|
$ docker stack deploy -c docker-stack.yml presto
|
||||||
|
|
||||||
|
$ docker service update --replicas-max-per-node=1 presto_worker
|
||||||
|
|
||||||
|
$ docker service update --replicas 10 presto_worker
|
||||||
|
|
||||||
|
$ docker ps | grep presto_coordinator | awk '{print $1}'
|
||||||
|
4cc5c6c420d7
|
||||||
|
|
||||||
|
$ docker exec -it 4cc5c6c420d7 presto --server localhost:8080 --catalog tpch
|
||||||
>>> show schemas;
|
>>> show schemas;
|
||||||
>>> show tables from tiny;
|
>>> show tables from tiny;
|
||||||
>>> select * from tiny.customer limit 10;
|
>>> select * from tiny.customer limit 10;
|
||||||
>>> quit
|
>>> quit
|
||||||
|
|
||||||
|
$ curl http://localhost:8080/ui/
|
||||||
|
|
||||||
$ curl http://localhost:8080/v1/service/presto/general
|
$ curl http://localhost:8080/v1/service/presto/general
|
||||||
```
|
```
|
||||||
|
|
||||||
|
> :warning: If volume settings are changed, you need to remove them manually on all nodes.
|
||||||
|
|
||||||
[1]: https://prestodb.io/
|
[1]: https://prestodb.io/
|
||||||
|
@ -4,4 +4,4 @@ query.max-memory=50GB
|
|||||||
query.max-memory-per-node=1GB
|
query.max-memory-per-node=1GB
|
||||||
query.max-total-memory-per-node=2GB
|
query.max-total-memory-per-node=2GB
|
||||||
discovery.uri=http://coordinator:8080
|
discovery.uri=http://coordinator:8080
|
||||||
node.internal-address=worker1
|
#node.internal-address=worker1
|
@ -1,3 +1,3 @@
|
|||||||
node.environment=production
|
node.environment=production
|
||||||
node.id=worker1
|
|
||||||
node.data-dir=/data
|
node.data-dir=/data
|
||||||
|
#node.id=worker1
|
@ -1,19 +1,20 @@
|
|||||||
coordinator:
|
nfs:
|
||||||
image: vimagick/presto
|
image: erichough/nfs-server
|
||||||
ports:
|
ports:
|
||||||
- "8080:8080"
|
- "111:111/tcp"
|
||||||
|
- "111:111/udp"
|
||||||
|
- "2049:2049/tcp"
|
||||||
|
- "2049:2049/udp"
|
||||||
|
- "32765:32765/tcp"
|
||||||
|
- "32765:32765/udp"
|
||||||
|
- "32767:32767/tcp"
|
||||||
|
- "32767:32767/udp"
|
||||||
volumes:
|
volumes:
|
||||||
- ./conf/coordinator:/opt/presto/etc
|
- ./conf:/export/presto:ro
|
||||||
- ./data/coordinator:/data
|
- /lib/modules:/lib/modules:ro
|
||||||
restart: always
|
environment:
|
||||||
|
- NFS_LOG_LEVEL=DEBUG
|
||||||
worker1:
|
- NFS_EXPORT_0=/export/presto/coordinator *(ro,no_subtree_check)
|
||||||
image: vimagick/presto
|
- NFS_EXPORT_1=/export/presto/worker1 *(ro,no_subtree_check)
|
||||||
ports:
|
privileged: true
|
||||||
- "8081:8080"
|
restart: unless-stopped
|
||||||
volumes:
|
|
||||||
- ./conf/worker1:/opt/presto/etc
|
|
||||||
- ./data/worker1:/data
|
|
||||||
links:
|
|
||||||
- coordinator
|
|
||||||
restart: always
|
|
||||||
|
50
presto/docker-stack.yml
Normal file
50
presto/docker-stack.yml
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
version: "3.7"
|
||||||
|
|
||||||
|
services:
|
||||||
|
|
||||||
|
coordinator:
|
||||||
|
image: vimagick/presto
|
||||||
|
ports:
|
||||||
|
- "8080:8080"
|
||||||
|
volumes:
|
||||||
|
- /data:/data
|
||||||
|
- presto_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/presto
|
||||||
|
volumes:
|
||||||
|
- /data:/data
|
||||||
|
- presto_worker_conf:/opt/presto/etc
|
||||||
|
deploy:
|
||||||
|
replicas: 0
|
||||||
|
placement:
|
||||||
|
constraints:
|
||||||
|
- node.role == worker
|
||||||
|
restart_policy:
|
||||||
|
condition: on-failure
|
||||||
|
depends_on:
|
||||||
|
- coordinator
|
||||||
|
|
||||||
|
volumes:
|
||||||
|
|
||||||
|
presto_coordinator_conf:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: "addr=10.0.0.1,nolock,soft,ro"
|
||||||
|
device: ":/export/presto/coordinator"
|
||||||
|
|
||||||
|
presto_worker_conf:
|
||||||
|
driver: local
|
||||||
|
driver_opts:
|
||||||
|
type: nfs
|
||||||
|
o: "addr=10.0.0.1,nolock,soft,ro"
|
||||||
|
device: ":/export/presto/worker"
|
Loading…
x
Reference in New Issue
Block a user