diff --git a/examples/quickstart/tutorial/hadoop/docker/Dockerfile b/examples/quickstart/tutorial/hadoop/docker/Dockerfile index b43454ca699..c9c30ac2043 100644 --- a/examples/quickstart/tutorial/hadoop/docker/Dockerfile +++ b/examples/quickstart/tutorial/hadoop/docker/Dockerfile @@ -15,13 +15,7 @@ # limitations under the License. # Creates pseudo distributed hadoop 2.8.5 with java 8 -# -# Modified from the SequenceIQ Dockerfiles at https://github.com/sequenceiq/hadoop-docker -# -# docker build -t druid-hadoop-demo:2.8.5 . - -FROM sequenceiq/pam:centos-6.5 -MAINTAINER SequenceIQ +FROM centos:7 USER root @@ -109,8 +103,14 @@ RUN sed -i "/^[^#]*UsePAM/ s/.*/#&/" /etc/ssh/sshd_config RUN echo "UsePAM no" >> /etc/ssh/sshd_config RUN echo "Port 2122" >> /etc/ssh/sshd_config -RUN service sshd start && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -mkdir -p /user/root -RUN service sshd start && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -put $HADOOP_PREFIX/etc/hadoop/ input +# script for plain sshd start +RUN echo -e \ + '#!/bin/bash\n/usr/sbin/sshd\ntimeout 10 bash -c "until printf \"\" 2>>/dev/null >>/dev/tcp/127.0.0.1/2122; do sleep 0.5; done"' > \ + /usr/local/bin/start_sshd && \ + chmod a+x /usr/local/bin/start_sshd + +RUN start_sshd && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -mkdir -p /user/root +RUN start_sshd && $HADOOP_PREFIX/etc/hadoop/hadoop-env.sh && $HADOOP_PREFIX/sbin/start-dfs.sh && $HADOOP_PREFIX/bin/hdfs dfs -put $HADOOP_PREFIX/etc/hadoop/ input CMD ["/etc/bootstrap.sh", "-d"] diff --git a/examples/quickstart/tutorial/hadoop/docker/bootstrap.sh b/examples/quickstart/tutorial/hadoop/docker/bootstrap.sh index 1ae0c84c2b9..053662b9524 100755 --- a/examples/quickstart/tutorial/hadoop/docker/bootstrap.sh +++ b/examples/quickstart/tutorial/hadoop/docker/bootstrap.sh @@ -28,7 +28,7 @@ cd $HADOOP_PREFIX/share/hadoop/common ; for cp in ${ACP//,/ }; do echo == $cp; sed s/HOSTNAME/$HOSTNAME/ /usr/local/hadoop/etc/hadoop/core-site.xml.template > /usr/local/hadoop/etc/hadoop/core-site.xml -service sshd start +start_sshd $HADOOP_PREFIX/sbin/start-dfs.sh $HADOOP_PREFIX/sbin/start-yarn.sh $HADOOP_PREFIX/sbin/mr-jobhistory-daemon.sh start historyserver diff --git a/integration-tests/script/docker_build_containers.sh b/integration-tests/script/docker_build_containers.sh index 30aa56a8de8..499d36979ef 100755 --- a/integration-tests/script/docker_build_containers.sh +++ b/integration-tests/script/docker_build_containers.sh @@ -15,6 +15,8 @@ # limitations under the License. # Build Druid Cluster Image +set -e + if [ -z "$DRUID_INTEGRATION_TEST_JVM_RUNTIME" ] then echo "\$DRUID_INTEGRATION_TEST_JVM_RUNTIME is not set. Build druid-cluster with Java 8"