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

Commit

Permalink
Stream Enrich 0.13.0 image (closes #31)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Jan 2, 2018
1 parent 02ee5b2 commit c13a5bf
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ env:
matrix:
- IMG=base
- IMG=scala-stream-collector/0.12.0
- IMG=stream-enrich/0.12.0
- IMG=stream-enrich/0.13.0
- IMG=s3-loader/0.6.0
- IMG=elasticsearch-loader/0.10.1
global:
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ You can pull the images from the registry directly:
docker pull snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector:0.12.0

# Stream Enrich image
docker pull snowplow-docker-registry.bintray.io/snowplow/stream-enrich:0.12.0
docker pull snowplow-docker-registry.bintray.io/snowplow/stream-enrich:0.13.0

# Elasticsearch Loader image
docker pull snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.1
Expand All @@ -44,7 +44,7 @@ docker pull snowplow-docker-registry.bintray.io/snowplow/base:0.1.0
docker build -t snowplow/scala-stream-collector:0.12.0 scala-stream-collector/0.12.0

# Stream Enrich image
docker build -t snowplow/stream-enrich:0.12.0 stream-enrich/0.12.0
docker build -t snowplow/stream-enrich:0.13.0 stream-enrich/0.13.0

# Elasticsearch Loader image
docker build -t snowplow/elasticsearch-loader:0.10.1 elasticsearch-loader/0.10.1
Expand Down Expand Up @@ -76,8 +76,8 @@ docker run \
# Stream Enrich
docker run \
-v $PWD/stream-enrich-config:/snowplow/config \
snowplow/stream-enrich:0.12.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/stream-enrich:0.12.0 if you have pulled the image
snowplow/stream-enrich:0.13.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/stream-enrich:0.13.0 if you have pulled the image

This comment has been minimized.

Copy link
@knservis

knservis Feb 26, 2018

Contributor

I found this comment a bit confusing. Should it be "if you want to pull the image"?

This comment has been minimized.

Copy link
@BenFradet

BenFradet Feb 26, 2018

Author Contributor

the readme explains how to pull above

--config /snowplow/config/config.hocon \
--resolver file:/snowplow/config/resolver.json \
--enrichments file:/snowplow/config/enrichments/ \
Expand Down
23 changes: 23 additions & 0 deletions stream-enrich/0.13.0/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base:0.1.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the collector to download.
ENV ENRICH_VERSION="0.13.0"

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

# Install the Scala Stream Collector.
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 stream enrich 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" ]
15 changes: 15 additions & 0 deletions stream-enrich/0.13.0/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/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

# Needed because of SCE's ./ip_geo file
cd $(eval echo ~snowplow)

# Make sure we run the collector as the snowplow user
exec su-exec snowplow:snowplow /usr/bin/java \
$SP_JAVA_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \
-jar ${SNOWPLOW_BIN_PATH}/snowplow-stream-enrich-${ENRICH_VERSION}.jar "$@"

0 comments on commit c13a5bf

Please sign in to comment.