-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #663 from ruflin/es-220
Update tests to elasticsearch-220
- Loading branch information
Showing
8 changed files
with
126 additions
and
14 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,70 @@ | ||
FROM java:8-jre | ||
|
||
# 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 apt-key adv --keyserver ha.pool.sks-keyservers.net --recv-keys 46095ACC8548582C1A2699A9D27D666CD88E42B4 | ||
|
||
ENV ELASTICSEARCH_MAJOR 2.2 | ||
ENV ELASTICSEARCH_VERSION 2.2.0 | ||
ENV ELASTICSEARCH_REPO_BASE http://download.elasticsearch.org/elasticsearch/staging/2.2.0-848ea4e/repos/2.x/debian/ | ||
|
||
RUN echo "deb $ELASTICSEARCH_REPO_BASE stable main" > /etc/apt/sources.list.d/elasticsearch.list | ||
|
||
RUN set -x \ | ||
&& apt-get update \ | ||
&& apt-get install -y --no-install-recommends elasticsearch=$ELASTICSEARCH_VERSION \ | ||
&& rm -rf /var/lib/apt/lists/* | ||
|
||
ENV PATH /usr/share/elasticsearch/bin:$PATH | ||
|
||
RUN set -ex \ | ||
&& for path in \ | ||
/usr/share/elasticsearch/data \ | ||
/usr/share/elasticsearch/logs \ | ||
/usr/share/elasticsearch/config \ | ||
/usr/share/elasticsearch/config/scripts \ | ||
; do \ | ||
mkdir -p "$path"; \ | ||
chown -R elasticsearch:elasticsearch "$path"; \ | ||
done | ||
|
||
COPY config /usr/share/elasticsearch/config | ||
|
||
VOLUME /usr/share/elasticsearch/data | ||
|
||
COPY docker-entrypoint.sh / | ||
|
||
ENTRYPOINT ["/docker-entrypoint.sh"] | ||
|
||
EXPOSE 9200 9300 | ||
|
||
CMD ["elasticsearch"] | ||
|
||
|
||
|
||
|
||
|
||
|
||
ENV ES_USER=beats | ||
ENV ES_PASS=testing | ||
|
||
ENV ES_HOME=/usr/share/elasticsearch | ||
ENV PATH=$ES_HOME/bin/shield:$ES_HOME/bin:$PATH | ||
|
||
RUN rm -fR /etc/elasticsearch && \ | ||
ln -s $ES_HOME/config /etc/elasticsearch && \ | ||
plugin -Des.plugins.staging=true install license && \ | ||
plugin -Des.plugins.staging=true install shield | ||
|
||
COPY docker-entrypoint-shield.sh / | ||
|
||
|
||
ENTRYPOINT ["/docker-entrypoint-shield.sh"] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
# you can override this using by setting a system property, for example -Des.logger.level=DEBUG | ||
es.logger.level: INFO | ||
rootLogger: ${es.logger.level}, console | ||
logger: | ||
# log action execution errors for easier debugging | ||
action: DEBUG | ||
# reduce the logging for aws, too much is logged under the default INFO | ||
com.amazonaws: WARN | ||
|
||
appender: | ||
console: | ||
type: console | ||
layout: | ||
type: consolePattern | ||
conversionPattern: "[%d{ISO8601}][%-5p][%-25c] %m%n" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#!/bin/bash | ||
|
||
set -e | ||
|
||
# Add elasticsearch as command if needed | ||
if [ "${1:0:1}" = '-' ]; then | ||
set -- elasticsearch "$@" | ||
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 | ||
exec gosu elasticsearch "$@" | ||
fi | ||
|
||
# As argument is not related to elasticsearch, | ||
# then assume that user wants to run his own process, | ||
# for example a `bash` shell to explore this image | ||
exec "$@" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
ES_HOST=elasticsearch-210 | ||
ES_HOST=elasticsearch | ||
ES_PORT=9200 |