|
|
@@ -10,27 +10,27 @@ Apache Storm is a distributed computation framework written predominantly in the
|
|
|
|
|
|
## Running topologies in local mode
|
|
|
|
|
|
-Assuming you have `storm-starter-topologies-1.0.1.jar` in the current directory.
|
|
|
+Assuming you have `storm-starter-topologies-1.0.2.jar` in the current directory.
|
|
|
|
|
|
- $ docker run -it -v $(pwd)/storm-starter-topologies-1.0.1.jar:/topology.jar 31z4/storm:1.0.1 storm jar /topology.jar org.apache.storm.starter.ExclamationTopology
|
|
|
+ $ docker run -it -v $(pwd)/storm-starter-topologies-1.0.2.jar:/topology.jar storm:1.0.2 storm jar /topology.jar org.apache.storm.starter.ExclamationTopology
|
|
|
|
|
|
## Setting up a minimal Storm cluster
|
|
|
|
|
|
1. [Apache Zookeeper](https://zookeeper.apache.org/) is a must for running a Storm cluster. Start it first. Since the Zookeeper "fails fast" it's better to always restart it.
|
|
|
|
|
|
- $ docker run -d --restart always --name zookeeper 31z4/zookeeper:3.4.8
|
|
|
+ $ docker run -d --restart always --name some-zookeeper zookeeper:3.4
|
|
|
|
|
|
2. The Nimbus daemon has to be connected with the Zookeeper. It's also a "fail fast" system.
|
|
|
|
|
|
- $ docker run -d --restart always --name nimbus --net container:zookeeper 31z4/storm:1.0.1 storm nimbus
|
|
|
+ $ docker run -d --restart always --name some-nimbus --link some-zookeeper:zookeeper storm:1.0.2 storm nimbus
|
|
|
|
|
|
3. Finally start a single Supervisor node. It will talk to the Nimbus and Zookeeper.
|
|
|
|
|
|
- $ docker run -d --restart always --name supervisor --net container:nimbus --net container:zookeeper 31z4/storm:1.0.1 storm supervisor
|
|
|
+ $ docker run -d --restart always --name supervisor --link some-zookeeper:zookeeper --link some-nimbus:nimbus storm:1.0.2 storm supervisor
|
|
|
|
|
|
4. Now we can submit a topology to our cluster.
|
|
|
|
|
|
- $ docker run -it --net container:nimbus -v $(pwd)/storm-starter-topologies-1.0.1.jar:/topology.jar 31z4/storm:1.0.1 storm jar /topology.jar org.apache.storm.starter.WordCountTopology topology
|
|
|
+ $ docker run --link some-nimbus:nimbus -it --rm -v $(pwd)/storm-starter-topologies-1.0.2.jar:/topology.jar storm:1.0.2 storm jar /topology.jar org.apache.storm.starter.WordCountTopology topology
|
|
|
|
|
|
## %%COMPOSE%%
|
|
|
|
|
|
@@ -38,20 +38,20 @@ Run `docker-compose up` and wait for it to initialize completely. The Nimbus wil
|
|
|
|
|
|
## Configuration
|
|
|
|
|
|
-This image uses [default configuration](https://github.com/apache/storm/blob/v1.0.1/conf/defaults.yaml) of the Apache Storm. There are two main ways to change it.
|
|
|
+This image uses [default configuration](https://github.com/apache/storm/blob/v1.0.2/conf/defaults.yaml) of the Apache Storm. There are two main ways to change it.
|
|
|
|
|
|
1. Using command line arguments.
|
|
|
|
|
|
- $ docker run -d --restart always --name nimbus 31z4/storm:1.0.1 storm nimbus -c storm.log.dir="/logs" -c storm.zookeeper.servers="[\"zookeeper\"]"
|
|
|
+ $ docker run -d --restart always --name nimbus storm:1.0.2 storm nimbus -c storm.log.dir="/logs" -c storm.zookeeper.servers="[zookeeper]"
|
|
|
|
|
|
2. Assuming you have `storm.yaml` in the current directory you can mount it as a volume.
|
|
|
|
|
|
- $ docker run -it -v $(pwd)/storm.yaml:/apache-storm-1.0.1/conf/storm.yaml 31z4/storm:1.0.1 storm nimbus
|
|
|
+ $ docker run -it -v $(pwd)/storm.yaml:/apache-storm-1.0.2/conf/storm.yaml storm:1.0.2 storm nimbus
|
|
|
|
|
|
## Data persistence
|
|
|
|
|
|
No data are persisted by default. For convenience there are `/data` and `/logs` directories in the image owned by `storm` user. Use them accordingly to persist data and logs using volumes.
|
|
|
|
|
|
- $ docker run -it -v /logs -v /data 31z4/storm:1.0.1 storm nimbus -c storm.log.dir="/logs" -c storm.local.dir="/data"
|
|
|
+ $ docker run -it -v /logs -v /data storm:1.0.2 storm nimbus -c storm.log.dir="/logs" -c storm.local.dir="/data"
|
|
|
|
|
|
*Please be noticed that using paths other than those predefined is likely to cause permission denied errors. It's because for [security reasons](https://docs.docker.com/engine/userguide/eng-image/dockerfile_best-practices/#user) the Storm is running under the non-root `storm` user.*
|