Allow running ETL into a Docker container
Use a GerritForge's simplified Spark setup
to simplify the deployment and execution of the ETL
Change-Id: I673ff55fe2745bd91f8cf60f429cd100362068f8
diff --git a/Dockerfile b/Dockerfile
new file mode 100644
index 0000000..8916af5
--- /dev/null
+++ b/Dockerfile
@@ -0,0 +1,6 @@
+FROM gerritforge/jw2017-spark
+
+RUN apk add --no-cache wget
+RUN mkdir -p /app
+
+COPY ./target/scala-2.11/GerritAnalytics-assembly-1.0.jar /app
diff --git a/README.md b/README.md
index 3a4bca7..ff410db 100644
--- a/README.md
+++ b/README.md
@@ -61,4 +61,15 @@
### Caveats
-If Elastisearch dies with `exit code 137` you might have to give Docker more memory ([check this article for more details](https://github.com/moby/moby/issues/22211))
\ No newline at end of file
+If Elastisearch dies with `exit code 137` you might have to give Docker more memory ([check this article for more details](https://github.com/moby/moby/issues/22211))
+
+## Distribute as Docker Container
+
+To Distribute the `gerritforge/spark-gerrit-analytics-etl` docker container just run:
+
+ ```bash
+ sbt clean assembly
+ docker-compose -f analytics-etl.yaml build
+ docker push
+ docker push gerritforge/spark-gerrit-analytics-etl:1.0
+ ```
diff --git a/analytics-etl.yaml b/analytics-etl.yaml
new file mode 100644
index 0000000..8876d3b
--- /dev/null
+++ b/analytics-etl.yaml
@@ -0,0 +1,9 @@
+version: '3'
+
+services:
+
+ analytics-etl:
+ build: .
+ image: gerritforge/spark-gerrit-analytics-etl:1.0
+
+