Skip to content

Commit

Permalink
Use 5.0.0-rc1 build in testing (#2683)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
tsg authored and ruflin committed Oct 5, 2016
1 parent 58b6d7f commit 912186b
Show file tree
Hide file tree
Showing 3 changed files with 30 additions and 13 deletions.
39 changes: 28 additions & 11 deletions testing/environments/docker/elasticsearch/Dockerfile-snapshot
Original file line number Diff line number Diff line change
@@ -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"

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
2 changes: 1 addition & 1 deletion testing/environments/snapshot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 912186b

Please sign in to comment.