aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorCody Hiar <cody@hiar.ca>2021-10-10 22:03:44 -0600
committerCody Hiar <cody@hiar.ca>2021-10-10 22:03:44 -0600
commit08cf73a70e3ce2dbc85e8b389f15090c148ec003 (patch)
treed1b126efa2498e0d37a4df8846b1b400bf322a29
parent5367edb8b37a6dac76ac7cd608ac3c005b7b225e (diff)
Update to storm 2.3.0, get local run working
-rw-r--r--README.md22
-rw-r--r--docker-compose.yml31
-rw-r--r--docker/Dockerfile15
-rw-r--r--wordcount/project.clj4
4 files changed, 25 insertions, 47 deletions
diff --git a/README.md b/README.md
index b84e6e4..903e0db 100644
--- a/README.md
+++ b/README.md
@@ -1,20 +1,29 @@
# Dockerized Apache Storm
-Setting up a sample project with Apache Storm using stream parse. The
+To run the `wordcount` project:
+
+```
+make up && make enter
+cd wordcount
+sparse run
+```
+
+## How did I get here?
+
+Setting up a sample project with Apache Storm using streamparse. The
`wordcount` project was created with `sparse quickstart wordcount` but it
required some modifications to get running.
## https://github.com/Parsely/streamparse/issues/479
-I don't know if this is the same error that was messing with me but I couldn't
-get the sample `wordcount` project to run when I installed storm `2.3.0` or
-`2.2.0`. Things started to work once I downgraded to `2.1.0`.
+I just forked the repo and make a quick update so that I could just permanently
+run the local mode for now.
## Upating dependancies
```
- :dependencies [[org.apache.storm/storm-core "2.1.0"]
- [org.apache.storm/flux-core "2.1.0"]]
+ :dependencies [[org.apache.storm/storm-core "2.3.0"]
+ [org.apache.storm/flux-core "2.3.0"]]
```
Updated these versions to match my local storm version
@@ -27,4 +36,3 @@ Updated these versions to match my local storm version
```
Adding the snippet above to my project.clj seemed to fix this issue
-
diff --git a/docker-compose.yml b/docker-compose.yml
index 67f7f6e..d22f668 100644
--- a/docker-compose.yml
+++ b/docker-compose.yml
@@ -1,36 +1,5 @@
version: '3'
services:
- zookeeper:
- image: zookeeper
- container_name: zookeeper
- restart: always
-
- nimbus:
- image: storm
- container_name: nimbus
- command: storm nimbus
- depends_on:
- - zookeeper
- links:
- - zookeeper
- volumes:
- - .:/usr/src/app
- restart: always
- ports:
- - 6627:6627
-
- supervisor:
- image: storm
- container_name: supervisor
- command: storm supervisor
- depends_on:
- - nimbus
- - zookeeper
- links:
- - nimbus
- - zookeeper
- restart: always
-
backend:
build:
context: ./
diff --git a/docker/Dockerfile b/docker/Dockerfile
index c7ba950..ac833c3 100644
--- a/docker/Dockerfile
+++ b/docker/Dockerfile
@@ -3,16 +3,18 @@ FROM python:3.6-bullseye
RUN apt-get update && \
apt-get install --no-install-recommends -y \
openjdk-11-jdk \
+ maven \
leiningen && \
rm -rf /var/lib/apt/lists/*
-RUN wget https://dlcdn.apache.org/storm/apache-storm-2.1.0/apache-storm-2.1.0.zip && \
- unzip apache-storm-2.1.0.zip && \
- mv apache-storm-2.1.0/bin/* /usr/lib/jvm/java-11-openjdk-amd64/bin && \
- mv apache-storm-2.1.0/lib/* /usr/lib/jvm/java-11-openjdk-amd64/lib && \
- rm -rf apache-storm-2.1.0
+RUN wget https://dlcdn.apache.org/storm/apache-storm-2.3.0/apache-storm-2.3.0.zip && \
+ unzip apache-storm-2.3.0.zip && \
+ mv apache-storm-2.3.0/bin/* /usr/lib/jvm/java-11-openjdk-amd64/bin && \
+ mv apache-storm-2.3.0/lib/* /usr/lib/jvm/java-11-openjdk-amd64/lib && \
+ rm -rf apache-storm-2.3.0
-RUN pip install streamparse
+# RUN pip install streamparse==4.0.0
+RUN pip install git+https://github.com/Thornycrackers-Forks/streamparse.git#egg=streamparse
ENV LEIN_ROOT=/usr/src/app
@@ -21,6 +23,5 @@ ENV LEIN_ROOT=/usr/src/app
ENV JAVA_HOME=/usr/lib/jvm/java-11-openjdk-amd64
RUN ln -s /usr/lib/jvm/java-11-openjdk-amd64/bin/storm /bin/storm
-
# The code is stored here
WORKDIR /usr/src/app
diff --git a/wordcount/project.clj b/wordcount/project.clj
index 4ca974a..4b08880 100644
--- a/wordcount/project.clj
+++ b/wordcount/project.clj
@@ -3,8 +3,8 @@
:target-path "_build"
:min-lein-version "2.0.0"
:jvm-opts ["-client"]
- :dependencies [[org.apache.storm/storm-core "2.1.0"]
- [org.apache.storm/flux-core "2.1.0"]]
+ :dependencies [[org.apache.storm/storm-core "2.3.0"]
+ [org.apache.storm/flux-core "2.3.0"]]
:jar-exclusions [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
:uberjar-exclusions [#"log4j\.properties" #"org\.apache\.storm\.(?!flux)" #"trident" #"META-INF" #"meta-inf" #"\.yaml"]
)