Skip to content
This repository has been archived by the owner on Aug 13, 2024. It is now read-only.

Commit

Permalink
Add Elasticsearch Loader 0.10.2 image (closes #78)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Aug 6, 2018
1 parent 8f3db5f commit b632788
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ env:
- IMG=stream-enrich/0.18.0/kinesis
- IMG=stream-enrich/0.18.0/nsq
- IMG=s3-loader/0.6.0
- IMG=elasticsearch-loader/0.10.1
- IMG=elasticsearch-loader/0.10.2
- IMG=iglu-server/0.3.0
global:
# BINTRAY_SNOWPLOW_DOCKER_USER
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ docker pull snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-
docker pull snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:0.18.0

# Elasticsearch Loader image
docker pull snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.1
docker pull snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.2

# S3 Loader image
docker pull snowplow-docker-registry.bintray.io/snowplow/s3-loader:0.6.0
Expand All @@ -52,7 +52,7 @@ docker build -t snowplow/scala-stream-collector-nsq:0.13.0 scala-stream-collecto
docker build -t snowplow/stream-enrich-nsq:0.18.0 stream-enrich/0.18.0/nsq

# Elasticsearch Loader image
docker build -t snowplow/elasticsearch-loader:0.10.1 elasticsearch-loader/0.10.1
docker build -t snowplow/elasticsearch-loader:0.10.2 elasticsearch-loader/0.10.2

# S3 Loader image
docker build -t snowplow/s3-loader:0.6.0 s3-loader/0.6.0
Expand Down Expand Up @@ -95,8 +95,8 @@ docker run \
# Elasticsearch Loader
docker run \
-v $PWD/elasticsearch-loader-config:/snowplow/config \
snowplow/elasticsearch-loader:0.10.1 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.1 if you have pulled the image
snowplow/elasticsearch-loader:0.10.2 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.2 if you have pulled the image
--config /snowplow/config/config.hocon

# S3 Loader
Expand Down
23 changes: 23 additions & 0 deletions elasticsearch-loader/0.10.2/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the loader to download.
ENV ELASTICSEARCH_LOADER_VERSION="0.10.2"

# The name of the archive to download.
ENV ARCHIVE="snowplow_elasticsearch_loader_http_${ELASTICSEARCH_LOADER_VERSION}.zip"

# Install the ElasticSearch Loader.
RUN mkdir -p /tmp/build && \
cd /tmp/build && \
wget -q http://dl.bintray.com/snowplow/snowplow-generic/${ARCHIVE} && \
unzip -d ${SNOWPLOW_BIN_PATH} ${ARCHIVE} && \
cd /tmp && \
rm -rf /tmp/build

# Defines an entrypoint script delegating the lauching of the loader to the snowplow user.
# The script uses dumb-init as the top-level process.
COPY docker-entrypoint.sh /usr/local/bin/docker-entrypoint.sh
ENTRYPOINT [ "docker-entrypoint.sh" ]

CMD [ "--help" ]
12 changes: 12 additions & 0 deletions elasticsearch-loader/0.10.2/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/usr/bin/dumb-init /bin/sh
set -e

# If the config directory has been mounted through -v, we chown it.
if [ "$(stat -c %u ${SNOWPLOW_CONFIG_PATH})" != "$(id -u snowplow)" ]; then
chown snowplow:snowplow ${SNOWPLOW_CONFIG_PATH}
fi

# Make sure we run the loader as the snowplow user
exec su-exec snowplow:snowplow /usr/bin/java \
$SP_JAVA_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \
-jar ${SNOWPLOW_BIN_PATH}/snowplow-elasticsearch-loader-http-${ELASTICSEARCH_LOADER_VERSION}.jar "$@"
2 changes: 1 addition & 1 deletion elasticsearch-loader/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Additional JVM options can be set through the `SP_JAVA_OPTS` environment variabl
Running the container without arguments will print out its usage:

```bash
$ VERSION=0.10.1
$ VERSION=0.10.2
$ docker run snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:${VERSION}

snowplow-elasticsearch-loader $VERSION
Expand Down

0 comments on commit b632788

Please sign in to comment.