Use one image for all the Druid services
This commit is contained in:
parent
2d6b3bb090
commit
aea1c7faf6
|
@ -100,7 +100,7 @@ services:
|
||||||
container_name: superset_cache
|
container_name: superset_cache
|
||||||
restart: unless-stopped
|
restart: unless-stopped
|
||||||
volumes:
|
volumes:
|
||||||
- redis:/data
|
- redis_superset:/data
|
||||||
db:
|
db:
|
||||||
env_file: docker/.env-non-dev
|
env_file: docker/.env-non-dev
|
||||||
image: postgres:10
|
image: postgres:10
|
||||||
|
@ -195,89 +195,117 @@ services:
|
||||||
timeout: 30s
|
timeout: 30s
|
||||||
retries: 45
|
retries: 45
|
||||||
|
|
||||||
coordinator:
|
druid:
|
||||||
image: apache/druid:0.23.0
|
image: pathogen/druid:0.23.0
|
||||||
container_name: coordinator
|
build: ./docker/druid/
|
||||||
|
container_name: druid
|
||||||
volumes:
|
volumes:
|
||||||
- druid_shared:/opt/shared
|
- druid_shared:/opt/shared
|
||||||
- coordinator_var:/opt/druid/var
|
- druid_var:/opt/druid/var
|
||||||
depends_on:
|
depends_on:
|
||||||
- zookeeper
|
- zookeeper
|
||||||
- postgres
|
- postgres
|
||||||
ports:
|
ports:
|
||||||
- "8081:8081"
|
- "8081:8081"
|
||||||
command:
|
|
||||||
- coordinator
|
|
||||||
env_file:
|
|
||||||
- environment
|
|
||||||
|
|
||||||
broker:
|
|
||||||
image: apache/druid:0.23.0
|
|
||||||
container_name: broker
|
|
||||||
volumes:
|
|
||||||
- broker_var:/opt/druid/var
|
|
||||||
depends_on:
|
|
||||||
- zookeeper
|
|
||||||
- postgres
|
|
||||||
- coordinator
|
|
||||||
ports:
|
|
||||||
- "8082:8082"
|
- "8082:8082"
|
||||||
command:
|
|
||||||
- broker
|
|
||||||
env_file:
|
|
||||||
- environment
|
|
||||||
|
|
||||||
historical:
|
|
||||||
image: apache/druid:0.23.0
|
|
||||||
container_name: historical
|
|
||||||
volumes:
|
|
||||||
- druid_shared:/opt/shared
|
|
||||||
- historical_var:/opt/druid/var
|
|
||||||
depends_on:
|
|
||||||
- zookeeper
|
|
||||||
- postgres
|
|
||||||
- coordinator
|
|
||||||
ports:
|
|
||||||
- "8083:8083"
|
- "8083:8083"
|
||||||
command:
|
|
||||||
- historical
|
|
||||||
env_file:
|
|
||||||
- environment
|
|
||||||
|
|
||||||
middlemanager:
|
|
||||||
image: apache/druid:0.23.0
|
|
||||||
container_name: middlemanager
|
|
||||||
volumes:
|
|
||||||
- druid_shared:/opt/shared
|
|
||||||
- middle_var:/opt/druid/var
|
|
||||||
depends_on:
|
|
||||||
- zookeeper
|
|
||||||
- postgres
|
|
||||||
- coordinator
|
|
||||||
ports:
|
|
||||||
- "8091:8091"
|
|
||||||
- "8100-8105:8100-8105"
|
|
||||||
command:
|
|
||||||
- middleManager
|
|
||||||
env_file:
|
|
||||||
- environment
|
|
||||||
|
|
||||||
router:
|
|
||||||
image: apache/druid:0.23.0
|
|
||||||
container_name: router
|
|
||||||
volumes:
|
|
||||||
- router_var:/opt/druid/var
|
|
||||||
depends_on:
|
|
||||||
- zookeeper
|
|
||||||
- postgres
|
|
||||||
- coordinator
|
|
||||||
ports:
|
|
||||||
- "8888:8888"
|
- "8888:8888"
|
||||||
command:
|
|
||||||
- router
|
|
||||||
env_file:
|
env_file:
|
||||||
- environment
|
- environment
|
||||||
|
|
||||||
|
# coordinator:
|
||||||
|
# #image: apache/druid:0.23.0
|
||||||
|
# image: pathogen/druid:0.23.0
|
||||||
|
# build: ./docker/druid/
|
||||||
|
# container_name: coordinator
|
||||||
|
# volumes:
|
||||||
|
# - druid_shared:/opt/shared
|
||||||
|
# - coordinator_var:/opt/druid/var
|
||||||
|
# depends_on:
|
||||||
|
# - zookeeper
|
||||||
|
# - postgres
|
||||||
|
# ports:
|
||||||
|
# - "8081:8081"
|
||||||
|
# command:
|
||||||
|
# - coordinator
|
||||||
|
# env_file:
|
||||||
|
# - environment
|
||||||
|
|
||||||
|
# broker:
|
||||||
|
# #image: apache/druid:0.23.0
|
||||||
|
# image: pathogen/druid:0.23.0
|
||||||
|
# build: ./docker/druid/
|
||||||
|
# container_name: broker
|
||||||
|
# volumes:
|
||||||
|
# - broker_var:/opt/druid/var
|
||||||
|
# depends_on:
|
||||||
|
# - zookeeper
|
||||||
|
# - postgres
|
||||||
|
# - coordinator
|
||||||
|
# ports:
|
||||||
|
# - "8082:8082"
|
||||||
|
# command:
|
||||||
|
# - broker
|
||||||
|
# env_file:
|
||||||
|
# - environment
|
||||||
|
|
||||||
|
# historical:
|
||||||
|
# #image: apache/druid:0.23.0
|
||||||
|
# image: pathogen/druid:0.23.0
|
||||||
|
# build: ./docker/druid/
|
||||||
|
# container_name: historical
|
||||||
|
# volumes:
|
||||||
|
# - druid_shared:/opt/shared
|
||||||
|
# - historical_var:/opt/druid/var
|
||||||
|
# depends_on:
|
||||||
|
# - zookeeper
|
||||||
|
# - postgres
|
||||||
|
# - coordinator
|
||||||
|
# ports:
|
||||||
|
# - "8083:8083"
|
||||||
|
# command:
|
||||||
|
# - historical
|
||||||
|
# env_file:
|
||||||
|
# - environment
|
||||||
|
|
||||||
|
# middlemanager:
|
||||||
|
# #image: apache/druid:0.23.0
|
||||||
|
# image: pathogen/druid:0.23.0
|
||||||
|
# build: ./docker/druid/
|
||||||
|
# container_name: middlemanager
|
||||||
|
# volumes:
|
||||||
|
# - druid_shared:/opt/shared
|
||||||
|
# - middle_var:/opt/druid/var
|
||||||
|
# depends_on:
|
||||||
|
# - zookeeper
|
||||||
|
# - postgres
|
||||||
|
# - coordinator
|
||||||
|
# ports:
|
||||||
|
# - "8091:8091"
|
||||||
|
# - "8100-8105:8100-8105"
|
||||||
|
# command:
|
||||||
|
# - middleManager
|
||||||
|
# env_file:
|
||||||
|
# - environment
|
||||||
|
|
||||||
|
# router:
|
||||||
|
# #image: apache/druid:0.23.0
|
||||||
|
# image: pathogen/druid:0.23.0
|
||||||
|
# build: ./docker/druid/
|
||||||
|
# container_name: router
|
||||||
|
# volumes:
|
||||||
|
# - router_var:/opt/druid/var
|
||||||
|
# depends_on:
|
||||||
|
# - zookeeper
|
||||||
|
# - postgres
|
||||||
|
# - coordinator
|
||||||
|
# ports:
|
||||||
|
# - "8888:8888"
|
||||||
|
# command:
|
||||||
|
# - router
|
||||||
|
# env_file:
|
||||||
|
# - environment
|
||||||
|
|
||||||
# db:
|
# db:
|
||||||
# #image: pathogen/manticore:kibana
|
# #image: pathogen/manticore:kibana
|
||||||
# image: manticoresearch/manticore:dev
|
# image: manticoresearch/manticore:dev
|
||||||
|
@ -343,9 +371,9 @@ volumes:
|
||||||
external: false
|
external: false
|
||||||
redis_data: {}
|
redis_data: {}
|
||||||
metadata_data: {}
|
metadata_data: {}
|
||||||
middle_var: {}
|
# middle_var: {}
|
||||||
historical_var: {}
|
# historical_var: {}
|
||||||
broker_var: {}
|
# broker_var: {}
|
||||||
coordinator_var: {}
|
# coordinator_var: {}
|
||||||
router_var: {}
|
druid_var: {}
|
||||||
druid_shared: {}
|
druid_shared: {}
|
|
@ -200,7 +200,9 @@ services:
|
||||||
retries: 45
|
retries: 45
|
||||||
|
|
||||||
coordinator:
|
coordinator:
|
||||||
image: apache/druid:0.23.0
|
#image: apache/druid:0.23.0
|
||||||
|
image: pathogen/druid:0.23.0
|
||||||
|
build: ./druid
|
||||||
container_name: coordinator
|
container_name: coordinator
|
||||||
volumes:
|
volumes:
|
||||||
- /block/store/druid_shared:/opt/shared
|
- /block/store/druid_shared:/opt/shared
|
||||||
|
@ -216,7 +218,9 @@ services:
|
||||||
- environment
|
- environment
|
||||||
|
|
||||||
broker:
|
broker:
|
||||||
image: apache/druid:0.23.0
|
#image: apache/druid:0.23.0
|
||||||
|
image: pathogen/druid:0.23.0
|
||||||
|
build: ./druid
|
||||||
container_name: broker
|
container_name: broker
|
||||||
volumes:
|
volumes:
|
||||||
- /block/store/broker_var:/opt/druid/var
|
- /block/store/broker_var:/opt/druid/var
|
||||||
|
@ -232,7 +236,9 @@ services:
|
||||||
- environment
|
- environment
|
||||||
|
|
||||||
historical:
|
historical:
|
||||||
image: apache/druid:0.23.0
|
#image: apache/druid:0.23.0
|
||||||
|
image: pathogen/druid:0.23.0
|
||||||
|
build: ./druid
|
||||||
container_name: historical
|
container_name: historical
|
||||||
volumes:
|
volumes:
|
||||||
- /block/store/druid_shared:/opt/shared
|
- /block/store/druid_shared:/opt/shared
|
||||||
|
@ -249,7 +255,9 @@ services:
|
||||||
- environment
|
- environment
|
||||||
|
|
||||||
middlemanager:
|
middlemanager:
|
||||||
image: apache/druid:0.23.0
|
#image: apache/druid:0.23.0
|
||||||
|
image: pathogen/druid:0.23.0
|
||||||
|
build: ./druid
|
||||||
container_name: middlemanager
|
container_name: middlemanager
|
||||||
volumes:
|
volumes:
|
||||||
- /block/store/druid_shared:/opt/shared
|
- /block/store/druid_shared:/opt/shared
|
||||||
|
@ -267,7 +275,9 @@ services:
|
||||||
- environment
|
- environment
|
||||||
|
|
||||||
router:
|
router:
|
||||||
image: apache/druid:0.23.0
|
#image: apache/druid:0.23.0
|
||||||
|
image: pathogen/druid:0.23.0
|
||||||
|
build: ./druid
|
||||||
container_name: router
|
container_name: router
|
||||||
volumes:
|
volumes:
|
||||||
- /block/store/router_var:/opt/druid/var
|
- /block/store/router_var:/opt/druid/var
|
||||||
|
|
|
@ -0,0 +1,22 @@
|
||||||
|
ARG DRUID_VER=0.23.0
|
||||||
|
|
||||||
|
FROM apache/druid:${DRUID_VER} AS druid
|
||||||
|
|
||||||
|
FROM ubuntu:bionic
|
||||||
|
RUN apt-get update && \
|
||||||
|
apt-get install --yes openjdk-8-jre-headless perl-modules && \
|
||||||
|
apt-get clean
|
||||||
|
|
||||||
|
RUN addgroup --system -gid 1000 druid \
|
||||||
|
&& adduser --system --uid 1000 --disabled-password --home /opt/druid --shell /bin/bash --group druid
|
||||||
|
|
||||||
|
COPY --from=druid --chown=druid:druid /opt/druid /opt/druid
|
||||||
|
|
||||||
|
WORKDIR /opt/druid
|
||||||
|
|
||||||
|
USER druid
|
||||||
|
|
||||||
|
EXPOSE 8888/tcp
|
||||||
|
EXPOSE 8081/tcp
|
||||||
|
|
||||||
|
CMD /opt/druid/bin/start-nano-quickstart
|
|
@ -84,4 +84,4 @@ druid_indexer_logs_directory=/opt/shared/indexing-logs
|
||||||
druid_processing_numThreads=2
|
druid_processing_numThreads=2
|
||||||
druid_processing_numMergeBuffers=2
|
druid_processing_numMergeBuffers=2
|
||||||
|
|
||||||
DRUID_LOG4J=<?xml version="1.0" encoding="UTF-8" ?><Configuration status="WARN"><Appenders><Console name="Console" target="SYSTEM_OUT"><PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/></Console></Appenders><Loggers><Root level="info"><AppenderRef ref="Console"/></Root><Logger name="org.apache.druid.jetty.RequestLog" additivity="false" level="DEBUG"><AppenderRef ref="Console"/></Logger></Loggers></Configuration>
|
DRUID_LOG4J=<?xml version="1.0" encoding="UTF-8" ?><Configuration status="WARN"><Appenders><Console name="Console" target="SYSTEM_OUT"><PatternLayout pattern="%d{ISO8601} %p [%t] %c - %m%n"/></Console></Appenders><Loggers><Root level="info"><AppenderRef ref="Console"/></Root><Logger name="org.apache.druid.jetty.RequestLog" additivity="false" level="DEBUG"><AppenderRef ref="Console"/></Logger></Loggers></Configuration>
|
||||||
|
|
Loading…
Reference in New Issue