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

Commit

Permalink
Add EmrEtlRunner R112 image (closes #116)
Browse files Browse the repository at this point in the history
  • Loading branch information
BenFradet committed Feb 19, 2019
1 parent 556c658 commit f55c012
Show file tree
Hide file tree
Showing 5 changed files with 40 additions and 6 deletions.
2 changes: 1 addition & 1 deletion .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ env:
- IMG=iglu-server/0.4.0
- IMG=igluctl/0.6.0
- IMG=piinguin-server/0.1.1
- IMG=emr-etl-runner/r109_lambaesis
- IMG=emr-etl-runner/r112_baalbek
global:
# BINTRAY_SNOWPLOW_DOCKER_USER
- secure: IcBMTopBAIzGlWNgS7dw0iNmvFhd2dgSn/Y1mt6hXnzLrr7SDryRuxPqemsCBLIlf4xtpgHvuOoo+7jYywtAOqyHQ+EOnR5eU8/28v+Z8zd/Djnw0Sv10RV5oMS6ejh9gGS4WDNPvf9M1sfP5p+0gA0p68dNeObLDT4TwpG2pdpeEuqQ3RMGCQc+tb3Q26K6aUPXeIgAHUyIEgHtzxxfgrGNwSmxdb6npsWTUttKpQkJudGRk17xXW67Dd0PKLWJkDpien/lbkLIBK8MlwaH03NMawGcTChgM2njcqElqz1b46wxl1ATcVV2T7A6YPYZxb012P8j/KUZ6MLhdDFNhmz/jIk6caEZ3x4AH2Q0qN8C9Hn70yMN8gAliBeUN4pjLpKnD8t5HgCE+90EufppcQRCfCJhSk9xmegTaikan3QZCN09vwSctIBu4AeWYqctql6bLhNWguakbRIyk9feogmxqbn2HSoFpRrAEqXXv9jFKJrKm2UNKuLbXCvyoYqjAhxTPn7OMAY30wqsVSUu5gSt1fO0Pd+5H8yq44Ul3jROgYKM5NlLWUY+u8qp6KKm2zXQ2LFlr8rzZ2ar5pI9zZiABDMnRRUdAXDTnpDw2HtBvngGXhyfr/irrzach0z/f5YwHL7WVf9Wu7MqoVpexdDqThNGip4ansIikrC57LE=
Expand Down
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ docker pull snowplow-docker-registry.bintray.io/snowplow/igluctl:0.6.0
docker pull snowplow-docker-registry.bintray.io/snowplow/piinguin-server:0.1.1

# EmrEtlRunner image
docker pull snowplow-docker-registry.bintray.io/snowplow/emr-etl-runner:r109_lambaesis
docker pull snowplow-docker-registry.bintray.io/snowplow/emr-etl-runner:r112_baalbek
```

## Building
Expand Down Expand Up @@ -79,7 +79,7 @@ docker build -t snowplow/igluctl:0.6.0 igluctl/0.6.0
docker build -t snowplow/piinguin-server:0.1.1 piinguin-server/0.1.1

# EmrEtlRunner image
docker build -t snowplow/emr-etl-runner:r109_lambaesis emr-etl-runner/r109_lambaesis
docker build -t snowplow/emr-etl-runner:r112_baalbek emr-etl-runner/r112_baalbek
```

## Running
Expand Down Expand Up @@ -138,8 +138,8 @@ docker run \
# EmrEtlRunner
docker run \
-v ${PWD}/emr-etl-runner-config:/snowplow/config \
snowplow/emr-etl-runner:r109_lambaesis \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/emr-etl-runner:r109_lambaesis if you have pulled the image
snowplow/emr-etl-runner:r112_baalbek \ # if you have built the image
# snowplow-docker-registry.bintray.io/snowplow/emr-etl-runner:r112_baalbek if you have pulled the image
run \
--config /snowplow/config/config.yaml \
--resolver file:/snowplow/config/resolver.json \
Expand Down
2 changes: 1 addition & 1 deletion emr-etl-runner/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ this folder is bind mounted then ownership will be changed to the `snowplow` use
Running the container without arguments will print out its usage:

```bash
$ VERSION=r109_lambaesis
$ VERSION=r112_baalbek
$ docker run snowplow-docker-registry.bintray.io/snowplow/emr-etl-runner:${VERSION}

Usage snowplow-emr-etl-runner [options] [command [options]]
Expand Down
24 changes: 24 additions & 0 deletions emr-etl-runner/r112_baalbek/Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
FROM snowplow-docker-registry.bintray.io/snowplow/base-debian:0.1.0
LABEL maintainer="Snowplow Analytics Ltd. <[email protected]>"

# The version of EmrEtlRunner to download.
ENV EMR_ETL_RUNNER_VERSION="r112_baalbek"

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

# Install EmrEtlRunner.
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 EmrEtlRunner 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" ]
10 changes: 10 additions & 0 deletions emr-etl-runner/r112_baalbek/docker-entrypoint.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/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 EmrEtlRunner as the snowplow user
exec gosu snowplow:snowplow ${SNOWPLOW_BIN_PATH}/snowplow-emr-etl-runner "$@"

0 comments on commit f55c012

Please sign in to comment.