This page outlines the steps for getting a Storm cluster up and running.
If you run into difficulties with your Storm cluster, first check for a solution is in the Troubleshooting page. Otherwise, email the mailing list.
Here's a summary of the steps for setting up a Storm cluster:
Storm uses Zookeeper for coordinating the cluster. Zookeeper is not used for message passing, so the load Storm places on Zookeeper is quite low. Single node Zookeeper clusters should be sufficient for most cases, but if you want failover or are deploying large Storm clusters you may want larger Zookeeper clusters. Instructions for deploying Zookeeper are here.
A few notes about Zookeeper deployment:
Next you need to install Storm's dependencies on Nimbus and the worker machines. These are:
These are the versions of the dependencies that have been tested with Storm. Storm may or may not work with different versions of Java and/or Python.
Next, download a Storm release and extract the zip file somewhere on Nimbus and each of the worker machines. The Storm releases can be downloaded from here.
The Storm release contains a file at
conf/storm.yaml that configures the Storm daemons. You can see the default configuration values here. storm.yaml overrides anything in defaults.yaml. There's a few configurations that are mandatory to get a working cluster:
storm.zookeeper.servers: - "111.222.333.444" - "555.666.777.888"
If the port that your Zookeeper cluster uses is different than the default, you should set storm.zookeeper.port as well.
If you run storm on windows, it could be:
If you use a relative path, it will be relative to where you installed storm(STORM_HOME). You can leave it empty with default value
You‘re encouraged to fill out the value to list of **machine’s FQDN**. If you want to set up Nimbus H/A, you have to address all machines' FQDN which run nimbus. You may want to leave it to default value when you just want to set up ‘pseudo-distributed’ cluster, but you're still encouraged to fill out FQDN.
supervisor.slots.ports: - 6700 - 6701 - 6702 - 6703
Storm provides a mechanism by which administrators can configure the supervisor to run administrator supplied scripts periodically to determine if a node is healthy or not. Administrators can have the supervisor determine if the node is in a healthy state by performing any checks of their choice in scripts located in storm.health.check.dir. If a script detects the node to be in an unhealthy state, it must return a non-zero exit code. In pre-Storm 2.x releases, a bug considered a script exit value of 0 to be a failure. This has now been fixed. The supervisor will periodically run the scripts in the health check dir and check the output. If the script’s output contains the string ERROR, as described above, the supervisor will shut down any workers and exit.
If the supervisor is running with supervision “/bin/storm node-health-check” can be called to determine if the supervisor should be launched or if the node is unhealthy.
The health check directory location can be configured with:
The scripts must have execute permissions. The time to allow any given healthcheck script to run before it is marked failed due to timeout can be configured with:
If you need support from external libraries or custom plugins, you can place such jars into the extlib/ and extlib-daemon/ directories. Note that the extlib-daemon/ directory stores jars used only by daemons (Nimbus, Supervisor, DRPC, UI, Logviewer), e.g., HDFS and customized scheduling libraries. Accordingly, two environment variables STORM_EXT_CLASSPATH and STORM_EXT_CLASSPATH_DAEMON can be configured by users for including the external classpath and daemon-only external classpath. See Classpath handling for more details on using external libraries.
The last step is to launch all the Storm daemons. It is critical that you run each of these daemons under supervision. Storm is a fail-fast system which means the processes will halt whenever an unexpected error is encountered. Storm is designed so that it can safely halt at any point and recover correctly when the process is restarted. This is why Storm keeps no state in-process -- if Nimbus or the Supervisors restart, the running topologies are unaffected. Here's how to run the Storm daemons:
bin/storm nimbusunder supervision on the master machine.
bin/storm supervisorunder supervision on each worker machine. The supervisor daemon is responsible for starting and stopping worker processes on that machine.
As you can see, running the daemons is very straightforward. The daemons will log to the logs/ directory in wherever you extracted the Storm release.
Just like with nimbus or the supervisors you will need to launch the drpc server. To do this run the command
bin/storm drpc on each of the machines that you configured as a part of the
DRPC optionally offers a REST API as well. To enable this set teh config
drpc.http.port to the port you want to run on before launching the DRPC server. See the REST documentation for more information on how to use it.
It also supports SSL by setting
drpc.https.port along with the keystore and optional truststore similar to how you would configure the UI.