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

Commit

Permalink
Add Stream Enrich 0.19.0 image (closes #81)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Aug 21, 2018
1 parent ed78437 commit 8aaa5b6
Show file tree
Hide file tree
Showing 11 changed files with 173 additions and 9 deletions.
8 changes: 4 additions & 4 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,10 +15,10 @@ env:
- IMG=scala-stream-collector/0.14.0/kafka
- IMG=scala-stream-collector/0.14.0/kinesis
- IMG=scala-stream-collector/0.14.0/nsq
- IMG=stream-enrich/0.18.0/google-pubsub
- IMG=stream-enrich/0.18.0/kafka
- IMG=stream-enrich/0.18.0/kinesis
- IMG=stream-enrich/0.18.0/nsq
- IMG=stream-enrich/0.19.0/google-pubsub
- IMG=stream-enrich/0.19.0/kafka
- IMG=stream-enrich/0.19.0/kinesis
- IMG=stream-enrich/0.19.0/nsq
- IMG=s3-loader/0.6.0
- IMG=elasticsearch-loader/0.10.2
- IMG=iglu-server/0.3.0
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ You can pull the images from the registry directly:
docker pull snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:0.14.0

# NSQ Stream Enrich image, there are others available for Kinesis, Kafka and Google PubSub
docker pull snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:0.18.0
docker pull snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:0.19.0

# Elasticsearch Loader image
docker pull snowplow-docker-registry.bintray.io/snowplow/elasticsearch-loader:0.10.2
Expand Down Expand Up @@ -53,7 +53,7 @@ docker pull snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0
docker build -t snowplow/scala-stream-collector-nsq:0.14.0 scala-stream-collector/0.14.0/nsq

# NSQ Stream Enrich image, there are others available for Kinesis, Kafka and Google PubSub
docker build -t snowplow/stream-enrich-nsq:0.18.0 stream-enrich/0.18.0/nsq
docker build -t snowplow/stream-enrich-nsq:0.19.0 stream-enrich/0.19.0/nsq

# Elasticsearch Loader image
docker build -t snowplow/elasticsearch-loader:0.10.2 elasticsearch-loader/0.10.2
Expand Down Expand Up @@ -92,8 +92,8 @@ docker run \
# NSQ Stream Enrich container, there are others available for Kinesis, Kafka and Google PubSub
docker run \
-v $PWD/stream-enrich-config:/snowplow/config \
snowplow/stream-enrich-nsq:0.18.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:0.18.0 if you have pulled the image
snowplow/stream-enrich-nsq:0.19.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:0.19.0 if you have pulled the image
--config /snowplow/config/config.hocon \
--resolver file:/snowplow/config/resolver.json \
--enrichments file:/snowplow/config/enrichments/ \
Expand Down
26 changes: 26 additions & 0 deletions stream-enrich/0.19.0/google-pubsub/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of stream enrich to download.
ENV ENRICH_VERSION="0.19.0"

# The targeted platform
ENV PLATFORM="google_pubsub"

# The name of the archive to download.
ENV ARCHIVE="snowplow_stream_enrich_${PLATFORM}_${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.19.0/google-pubsub/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
#!/usr/bin/dumb-init /bin/bash
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 gosu snowplow:snowplow /usr/bin/java \
$SP_JAVA_OPTS -XX:+UnlockExperimentalVMOptions -XX:+UseCGroupMemoryLimitForHeap \
-jar ${SNOWPLOW_BIN_PATH}/snowplow-stream-enrich-${PLATFORM//_/-}-${ENRICH_VERSION//_/-}.jar "$@"
26 changes: 26 additions & 0 deletions stream-enrich/0.19.0/kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of stream enrich to download.
ENV ENRICH_VERSION="0.19.0"

# The targeted platform
ENV PLATFORM="kafka"

# The name of the archive to download.
ENV ARCHIVE="snowplow_stream_enrich_${PLATFORM}_${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.19.0/kafka/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-${PLATFORM}-${ENRICH_VERSION//_/-}.jar "$@"
26 changes: 26 additions & 0 deletions stream-enrich/0.19.0/kinesis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of stream enrich to download.
ENV ENRICH_VERSION="0.19.0"

# The targeted platform
ENV PLATFORM="kinesis"

# The name of the archive to download.
ENV ARCHIVE="snowplow_stream_enrich_${PLATFORM}_${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.19.0/kinesis/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-${PLATFORM}-${ENRICH_VERSION//_/-}.jar "$@"
26 changes: 26 additions & 0 deletions stream-enrich/0.19.0/nsq/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of stream enrich to download.
ENV ENRICH_VERSION="0.19.0"

# The targeted platform
ENV PLATFORM="nsq"

# The name of the archive to download.
ENV ARCHIVE="snowplow_stream_enrich_${PLATFORM}_${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.19.0/nsq/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-${PLATFORM}-${ENRICH_VERSION//_/-}.jar "$@"
2 changes: 1 addition & 1 deletion stream-enrich/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,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.18.0
$ VERSION=0.19.0
$ docker run snowplow-docker-registry.bintray.io/snowplow/stream-enrich-nsq:${VERSION}

snowplow-stream-enrich $VERSION
Expand Down

0 comments on commit 8aaa5b6

Please sign in to comment.