-
Notifications
You must be signed in to change notification settings - Fork 3
How to install prerequisite software
Before you deploy this topology and the web application, you should install several components on your environment. This guide will help you do it in a few simple steps. This is how I setup my local dev environment, so please make the right amendments in case of a multi node environment.
Installing Java is pretty straightforward, however I ran into some errors when using Apache Storm with a Java version superior to 1.8. You can use the following command to install Java 1.8 on your Ubuntu server:
sudo apt-get install openjdk-8-jdk
You can download the latest version of Apache Zookeeper from the official website. I installed version 3.7.0. Unpack it anywhere you like (I chose /opt/) with the following command:
tar –xzf apache-zookeeper-3.7.0-bin.tar.gz
Then move in the unpacked folder and create an empty directory named "data" (do not enter this folder yet). After this, copy the example configuration in a file named "zoo.cfg", like this:
cp config/zoo_sample.cfg config/zoo.cfg
Edit this configuration so that the values are inserted like this and make sure you insert the path to the "data" folder you just created:
tickTime=2000
initLimit=5
syncLimit=2
dataDir=<path to data folder you just created>
clientPort=2181
admin.serverPort=9876
Then you can start Apache Zookeeper running this command:
./bin/zkServer.sh start
Now you can start the CLI with the following command:
./bin/zkCli.sh
To shut it all down, kill this CLI and stop the server like this ./bin/zkServer.sh stop
You can download the latest version of Apache Storm from the official website. I installed version 2.3.0. Unpack it anywhere you like (I chose /opt/) with the following command:
tar –xzf apache-storm-2.3.0.tar.gz
Then move in the unpacked folder and create an empty directory named "data" (do not enter this folder yet).
Edit file "storm.yaml" in "conf" folder so that it resembles the following snippet (make sure you replace the placeholder with the path to the "data" folder you just created):
storm.zookeeper.servers:
- "localhost"
storm.local.dir: "<path to data folder you just created>"
nimbus.host: "localhost"
supervisor.slots.ports:
- 6700
- 6701
- 6702
- 6703
ui.port: 8081
To start the environment you should run the following commands:
./bin/storm nimbus
./bin/storm supervisor
./bin/storm ui
Visit the UI at "http://localhost:8081" to make sure everything runs smoothly. To terminate Apache Storm, just kill the running processes.