From 912186bd54e8031bf1f706177b31b0df6340871c Mon Sep 17 00:00:00 2001 From: Tudor Golubenco Date: Wed, 5 Oct 2016 13:41:44 +0200 Subject: [PATCH] Use 5.0.0-rc1 build in testing (#2683) This is mostly a backport of #2676, but using the 5.0 URLs. * Bootstrap checks can no longer be disabled Simply set `http.host` instead. This no longer enabled production mode. --- .../docker/elasticsearch/Dockerfile-snapshot | 39 +++++++++++++------ .../docker/elasticsearch/docker-entrypoint.sh | 2 +- testing/environments/snapshot.yml | 2 +- 3 files changed, 30 insertions(+), 13 deletions(-) diff --git a/testing/environments/docker/elasticsearch/Dockerfile-snapshot b/testing/environments/docker/elasticsearch/Dockerfile-snapshot index 26e915386982..c48c562b853b 100644 --- a/testing/environments/docker/elasticsearch/Dockerfile-snapshot +++ b/testing/environments/docker/elasticsearch/Dockerfile-snapshot @@ -1,17 +1,34 @@ FROM java:8-jre ENV ELASTICSEARCH_MAJOR 5.0 -ENV ELASTICSEARCH_VERSION master - - -COPY setup.sh / -RUN bash setup.sh https://download.elastic.co/elasticsearch/release/org/elasticsearch/distribution/deb/elasticsearch/5.0.0-alpha5/elasticsearch-5.0.0-alpha5.deb - -ENV PATH /usr/share/elasticsearch/bin:$PATH - -COPY config /usr/share/elasticsearch/config - -VOLUME /usr/share/elasticsearch/data +ENV ELASTICSEARCH_VERSION 5.0 +ENV VERSION 5.0.0-rc1 +ENV FILENAME_VERSION 5.0.0-rc1 +ENV URL http://staging.elastic.co/5.0.0-rc1-ace3a21c/downloads/elasticsearch/elasticsearch-5.0.0-rc1.tar.gz + +ENV ESHOME /opt/elasticsearch-${FILENAME_VERSION} + +# grab gosu for easy step-down from root +RUN gpg --keyserver ha.pool.sks-keyservers.net --recv-keys B42F6819007F00F88E364FD4036A9C25BF357DD4 +RUN arch="$(dpkg --print-architecture)" \ + && set -x \ + && curl -o /usr/local/bin/gosu -fSL "https://github.com/tianon/gosu/releases/download/1.3/gosu-$arch" \ + && curl -o /usr/local/bin/gosu.asc -fSL "https://github.com/tianon/gosu/releases/download/1.3/gosu-$arch.asc" \ + && gpg --verify /usr/local/bin/gosu.asc \ + && rm /usr/local/bin/gosu.asc \ + && chmod +x /usr/local/bin/gosu + +RUN groupadd -r elasticsearch && useradd -r -m -g elasticsearch elasticsearch + +RUN set -x && \ + cd /opt && \ + wget -qO elasticsearch.tar.gz "$URL?t=$(date +%F)" && \ + tar xzvf elasticsearch.tar.gz && \ + chown -R elasticsearch:elasticsearch ${ESHOME} + +ENV PATH ${ESHOME}/bin:$PATH + +VOLUME ${ESHOME}/data ENV ES_JAVA_OPTS="-Xms512m -Xmx512m" diff --git a/testing/environments/docker/elasticsearch/docker-entrypoint.sh b/testing/environments/docker/elasticsearch/docker-entrypoint.sh index a8fca33969ae..92e3a7ef7890 100755 --- a/testing/environments/docker/elasticsearch/docker-entrypoint.sh +++ b/testing/environments/docker/elasticsearch/docker-entrypoint.sh @@ -10,7 +10,7 @@ fi # Drop root privileges if we are running elasticsearch if [ "$1" = 'elasticsearch' ]; then # Change the ownership of /usr/share/elasticsearch/data to elasticsearch - chown -R elasticsearch:elasticsearch /usr/share/elasticsearch/data + chown -R elasticsearch:elasticsearch ${ESHOME-/usr/share/elasticsearch}/data exec gosu elasticsearch "$@" fi diff --git a/testing/environments/snapshot.yml b/testing/environments/snapshot.yml index 8f07011fe70f..68577662e47a 100644 --- a/testing/environments/snapshot.yml +++ b/testing/environments/snapshot.yml @@ -3,7 +3,7 @@ elasticsearch: build: ./docker/elasticsearch dockerfile: Dockerfile-snapshot - command: elasticsearch -Enetwork.host=0.0.0.0 -Ediscovery.zen.minimum_master_nodes=1 -Ebootstrap.ignore_system_bootstrap_checks=true + command: elasticsearch -Ehttp.host=0.0.0.0 logstash: build: ./docker/logstash