From 685fee8213c895e13655d38386620d924b8370cc Mon Sep 17 00:00:00 2001 From: echevalier Date: Tue, 28 Jul 2020 11:25:46 +0200 Subject: [PATCH] Speed up coordinator service --- Dockerfile | 8 +++++--- Dockerfile.nano | 7 +++++-- README.md | 32 +++++++++++++++++++++++++++++--- 3 files changed, 39 insertions(+), 8 deletions(-) diff --git a/Dockerfile b/Dockerfile index 9aba935..f6b2ad1 100644 --- a/Dockerfile +++ b/Dockerfile @@ -1,14 +1,16 @@ FROM openjdk:8-jre ARG DRUID_VERSION=0.19.0 - +ARG DRUID_COORDINATOR_CONF_FILE=apache-druid-${DRUID_VERSION}/conf/druid/single-server/micro-quickstart/coordinator-overlord/runtime.properties RUN wget http://apache.crihan.fr/dist/druid/${DRUID_VERSION}/apache-druid-${DRUID_VERSION}-bin.tar.gz \ && tar -xzf apache-druid-${DRUID_VERSION}-bin.tar.gz \ && rm apache-druid-${DRUID_VERSION}-bin.tar.gz \ && apt-get update \ && apt-get install -y bash perl \ - && rm -rf /var/lib/apt/lists/* - + && rm -rf /var/lib/apt/lists/* \ + && echo druid.manager.segments.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} \ + && echo druid.manager.config.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} \ + && echo druid.manager.rules.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} ENV DRUID_VERSION=$DRUID_VERSION diff --git a/Dockerfile.nano b/Dockerfile.nano index 4c9933f..bce022b 100644 --- a/Dockerfile.nano +++ b/Dockerfile.nano @@ -1,13 +1,16 @@ FROM openjdk:8-jre ARG DRUID_VERSION=0.19.0 - +ARG DRUID_COORDINATOR_CONF_FILE=apache-druid-${DRUID_VERSION}/conf/druid/single-server/nano-quickstart/coordinator-overlord/runtime.properties RUN wget http://apache.crihan.fr/dist/druid/${DRUID_VERSION}/apache-druid-${DRUID_VERSION}-bin.tar.gz \ && tar -xzf apache-druid-${DRUID_VERSION}-bin.tar.gz \ && rm apache-druid-${DRUID_VERSION}-bin.tar.gz \ && apt-get update \ && apt-get install -y bash perl \ - && rm -rf /var/lib/apt/lists/* + && rm -rf /var/lib/apt/lists/* \ + && echo druid.manager.segments.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} \ + && echo druid.manager.config.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} \ + && echo druid.manager.rules.pollDuration=PT5S >> ${DRUID_COORDINATOR_CONF_FILE} ENV DRUID_VERSION=$DRUID_VERSION diff --git a/README.md b/README.md index 0915994..9b4f68d 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,31 @@ -# micro-druid -Dockerfiles to run [nano/micro](https://github.com/apache/druid/blob/94298f780927923b84f3127ec07c84cb5b115145/docs/operations/single-server.md#nano-quickstart-1-cpu-4gb-ram) setups of [druid](https://github.com/apache/druid) for e2e tests. +Micro & Nano druid, for E2E tests +======================================= + +Dockerfiles to run nano and micro setups of [druid](https://github.com/apache/druid) for e2e tests. Some configurations are applied to maximize the response time of the Druid docker but should in no way refer to a production cluster. + +Arguments +------------- Arguments that can be set while building: -- `DRUID_VERSION` (0.18.0 by default) \ No newline at end of file +- `DRUID_VERSION`: 0.19.0 by default +- `DRUID_COORDINATOR_CONF_FILE`: path to the runtime.properties of the coordinator service. + +Required hardware +------------------ + +Nano +********* + +* 1 CPU +* 4GB RAM +* Launch command: `bin/start-nano-quickstart` +* Configuration directory: `conf/druid/single-server/nano-quickstart` + + +Micro +********* + +* 4 CPU +* 16GB RAM +* Launch command: `bin/start-micro-quickstart` +* Configuration directory: `conf/druid/single-server/micro-quickstart`