diff --git a/integration-tests/script/docker_run_cluster.sh b/integration-tests/script/docker_run_cluster.sh index b91869fcbe7..23a1e8276ad 100755 --- a/integration-tests/script/docker_run_cluster.sh +++ b/integration-tests/script/docker_run_cluster.sh @@ -44,6 +44,12 @@ fi docker-compose -f ${DOCKERDIR}/docker-compose.druid-hadoop.yml up -d fi - # Start Druid cluster - docker-compose $(getComposeArgs) up -d + if [ -z "$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH" ] + then + # Start Druid cluster + docker-compose $(getComposeArgs) up -d + else + # run druid cluster with override config + OVERRIDE_ENV=$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH docker-compose $(getComposeArgs) up -d + fi } diff --git a/integration-tests/stop_cluster.sh b/integration-tests/stop_cluster.sh index d23d226c2cb..6fdbeb26f8c 100755 --- a/integration-tests/stop_cluster.sh +++ b/integration-tests/stop_cluster.sh @@ -26,7 +26,22 @@ then exit 0 fi -docker-compose $(getComposeArgs) down + +# stop hadoop container if it exists (can't use docker-compose down because it shares network) +HADOOP_CONTAINER="$(docker ps -aq -f name=druid-it-hadoop)" +if [ ! -z "$HADOOP_CONTAINER" ] +then + docker stop druid-it-hadoop + docker rm druid-it-hadoop +fi + +# bring down using the same compose args we started with +if [ -z "$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH" ] +then + docker-compose $(getComposeArgs) down +else + OVERRIDE_ENV=$DRUID_INTEGRATION_TEST_OVERRIDE_CONFIG_PATH docker-compose $(getComposeArgs) down +fi if [ ! -z "$(docker network ls -q -f name=druid-it-net)" ] then