diff --git a/.travis.yml b/.travis.yml index 669382e..0184912 100644 --- a/.travis.yml +++ b/.travis.yml @@ -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 diff --git a/README.md b/README.md index 688f449..16cc021 100644 --- a/README.md +++ b/README.md @@ -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 @@ -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 @@ -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 diff --git a/scala-stream-collector/0.15.0/google-pubsub/Dockerfile b/scala-stream-collector/0.15.0/google-pubsub/Dockerfile new file mode 100644 index 0000000..cb21199 --- /dev/null +++ b/scala-stream-collector/0.15.0/google-pubsub/Dockerfile @@ -0,0 +1,29 @@ +FROM snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0 +LABEL maintainer="Snowplow Analytics Ltd. " + +# 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" ] diff --git a/scala-stream-collector/0.15.0/google-pubsub/docker-entrypoint.sh b/scala-stream-collector/0.15.0/google-pubsub/docker-entrypoint.sh new file mode 100755 index 0000000..a3be863 --- /dev/null +++ b/scala-stream-collector/0.15.0/google-pubsub/docker-entrypoint.sh @@ -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 "$@" diff --git a/scala-stream-collector/0.15.0/kafka/Dockerfile b/scala-stream-collector/0.15.0/kafka/Dockerfile new file mode 100644 index 0000000..0938f11 --- /dev/null +++ b/scala-stream-collector/0.15.0/kafka/Dockerfile @@ -0,0 +1,29 @@ +FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0 +LABEL maintainer="Snowplow Analytics Ltd. " + +# 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" ] diff --git a/scala-stream-collector/0.15.0/kafka/docker-entrypoint.sh b/scala-stream-collector/0.15.0/kafka/docker-entrypoint.sh new file mode 100755 index 0000000..106c173 --- /dev/null +++ b/scala-stream-collector/0.15.0/kafka/docker-entrypoint.sh @@ -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 "$@" diff --git a/scala-stream-collector/0.15.0/kinesis/Dockerfile b/scala-stream-collector/0.15.0/kinesis/Dockerfile new file mode 100644 index 0000000..7e61fd9 --- /dev/null +++ b/scala-stream-collector/0.15.0/kinesis/Dockerfile @@ -0,0 +1,29 @@ +FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0 +LABEL maintainer="Snowplow Analytics Ltd. " + +# 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" ] diff --git a/scala-stream-collector/0.15.0/kinesis/docker-entrypoint.sh b/scala-stream-collector/0.15.0/kinesis/docker-entrypoint.sh new file mode 100755 index 0000000..106c173 --- /dev/null +++ b/scala-stream-collector/0.15.0/kinesis/docker-entrypoint.sh @@ -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 "$@" diff --git a/scala-stream-collector/0.15.0/nsq/Dockerfile b/scala-stream-collector/0.15.0/nsq/Dockerfile new file mode 100644 index 0000000..28ad678 --- /dev/null +++ b/scala-stream-collector/0.15.0/nsq/Dockerfile @@ -0,0 +1,29 @@ +FROM snowplow-docker-registry.bintray.io/snowplow/base-alpine:0.2.0 +LABEL maintainer="Snowplow Analytics Ltd. " + +# 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" ] diff --git a/scala-stream-collector/0.15.0/nsq/docker-entrypoint.sh b/scala-stream-collector/0.15.0/nsq/docker-entrypoint.sh new file mode 100755 index 0000000..106c173 --- /dev/null +++ b/scala-stream-collector/0.15.0/nsq/docker-entrypoint.sh @@ -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 "$@" diff --git a/scala-stream-collector/README.md b/scala-stream-collector/README.md index 7dd1128..c7958e7 100644 --- a/scala-stream-collector/README.md +++ b/scala-stream-collector/README.md @@ -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