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

Commit

Permalink
Add images for the Scala Stream Collector 0.15.0 (closes #119)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Feb 27, 2019
1 parent 97369c0 commit 2d15076
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 @@ -11,10 +11,10 @@ env:
matrix:
- IMG=base-alpine/0.2.0
- IMG=base-debian/0.1.0
- IMG=scala-stream-collector/0.14.0/google-pubsub
- 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=scala-stream-collector/0.15.0/google-pubsub
- IMG=scala-stream-collector/0.15.0/kafka
- IMG=scala-stream-collector/0.15.0/kinesis
- IMG=scala-stream-collector/0.15.0/nsq
- IMG=stream-enrich/0.20.0/kafka
- IMG=stream-enrich/0.20.0/kinesis
- IMG=stream-enrich/0.20.0/nsq
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ You can pull the images from the registry directly:

```bash
# NSQ Scala Stream Collector image, there are others available for Kinesis, Kafka and Google PubSub
docker pull snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:0.14.0
docker pull snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:0.15.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.20.0
Expand Down Expand Up @@ -58,7 +58,7 @@ docker pull snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
docker pull snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0

# NSQ Scala Stream Collector image, there are others available for Kinesis, Kafka and Google PubSub
docker build -t snowplow/scala-stream-collector-nsq:0.14.0 scala-stream-collector/0.14.0/nsq
docker build -t snowplow/scala-stream-collector-nsq:0.15.0 scala-stream-collector/0.15.0/nsq

# NSQ Stream Enrich image, there are others available for Kinesis, Kafka and Google PubSub
docker build -t snowplow/stream-enrich-nsq:0.20.0 stream-enrich/0.20.0/nsq
Expand Down Expand Up @@ -100,8 +100,8 @@ Next, you can run a container for each component by mounting your configuration
# NSQ Scala Stream Collector container, there are others available for Kinesis, Kafka and Google PubSub
docker run \
-v $PWD/scala-stream-collector-config:/snowplow/config \
snowplow/scala-stream-collector-nsq:0.14.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:0.14.0 if you have pulled the image
snowplow/scala-stream-collector-nsq:0.15.0 \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:0.15.0 if you have pulled the image
--config /snowplow/config/config.hocon

# NSQ Stream Enrich container, there are others available for Kinesis, Kafka and Google PubSub
Expand Down
29 changes: 29 additions & 0 deletions scala-stream-collector/0.15.0/google-pubsub/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the collector to download.
ENV COLLECTOR_VERSION="0.15.0"

# The targeted platform
ENV PLATFORM="google_pubsub"

# The name of the archive to download.
ENV ARCHIVE="snowplow_scala_stream_collector_${PLATFORM}_${COLLECTOR_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

# Port used by the collector.
EXPOSE 80

# Defines an entrypoint script delegating the lauching of the collector 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 scala-stream-collector/0.15.0/google-pubsub/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
#!/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

# 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-collector-${PLATFORM//_/-}-${COLLECTOR_VERSION//_/-}.jar "$@"
29 changes: 29 additions & 0 deletions scala-stream-collector/0.15.0/kafka/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the collector to download.
ENV COLLECTOR_VERSION="0.15.0"

# The targeted platform
ENV PLATFORM="kafka"

# The name of the archive to download.
ENV ARCHIVE="snowplow_scala_stream_collector_${PLATFORM}_${COLLECTOR_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

# Port used by the collector.
EXPOSE 80

# Defines an entrypoint script delegating the lauching of the collector 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 scala-stream-collector/0.15.0/kafka/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 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-collector-${PLATFORM}-${COLLECTOR_VERSION//_/-}.jar "$@"
29 changes: 29 additions & 0 deletions scala-stream-collector/0.15.0/kinesis/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the collector to download.
ENV COLLECTOR_VERSION="0.15.0"

# The targeted platform
ENV PLATFORM="kinesis"

# The name of the archive to download.
ENV ARCHIVE="snowplow_scala_stream_collector_${PLATFORM}_${COLLECTOR_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

# Port used by the collector.
EXPOSE 80

# Defines an entrypoint script delegating the lauching of the collector 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 scala-stream-collector/0.15.0/kinesis/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 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-collector-${PLATFORM}-${COLLECTOR_VERSION//_/-}.jar "$@"
29 changes: 29 additions & 0 deletions scala-stream-collector/0.15.0/nsq/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of the collector to download.
ENV COLLECTOR_VERSION="0.15.0"

# The targeted platform
ENV PLATFORM="nsq"

# The name of the archive to download.
ENV ARCHIVE="snowplow_scala_stream_collector_${PLATFORM}_${COLLECTOR_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

# Port used by the collector.
EXPOSE 80

# Defines an entrypoint script delegating the lauching of the collector 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 scala-stream-collector/0.15.0/nsq/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 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-collector-${PLATFORM}-${COLLECTOR_VERSION//_/-}.jar "$@"
2 changes: 1 addition & 1 deletion scala-stream-collector/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,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.14.0
$ VERSION=0.15.0
$ docker run snowplow-docker-registry.bintray.io/snowplow/scala-stream-collector-nsq:${VERSION}

snowplow-stream-collector $VERSION
Expand Down

0 comments on commit 2d15076

Please sign in to comment.