There are two ways on how to install Storm Streaming Server on your machine - you can either download files manually and start the server though provided shell scripts, or use Docker image instead. The first method requires a working JVM, as not all systems come with it preinstalled. A detailed tutorial on how to do this can be found in our Java Installation Guide.
Alternatively a Docker container can be used instead, since all Storm Streaming Server builds come with dedicated Docker images. We have prepared a complete tutorial for Docker installation and reconfiguration, that can be found in Docker Installation Guide section.
Storm Streaming Server can be download from My Products / Download page and comes as the compressed zip file. Please uncompress it into a desired location (we suggest something within /home or /srv directories). The package contains:
StormStreamingServer.jar | Main server file (jar library) |
config/log4j.xml | XML containing log4j configuration |
config/preferences.xml | XML containing server configuration |
log/log.log | Initial log file (empty) |
license/storm-license.key | License key (it will be updated by the server itself) |
license/storm-pubic.key | Public license key |
scripts/start.sh | Start script |
scripts/stop.sh | Stop script |
In order to start the server, you can edit scripts/start.sh script. It’s very short and simple:
#!/bin/sh
pkill -9 -f "StormStreamingServer.jar"
echo Shutting down old instances ... 3
sleep 1
echo Shutting down old instances ... 2
sleep 1
echo Shutting down old instances ... 1
sleep 1
pkill -9 -f "StormStreamingServer.jar"
echo Shutting down old instances ... 0
sleep 1
echo Staring new Java App
java -server -Xmx128g -Xms32g -XX:+UseG1GC -XX:MaxGCPauseMillis=100 -jar "/home/storm/StormStreamingServer.jar" -configRootDIR /home/storm &
The script will automatically kill all instances of Storm sever and start a new one. We’ll have to edit some parameters before we can properly launch the server.
Parameter | Description |
---|---|
-Xmx128g | JVM parameter controlling the maximum amount of RAM memory can be allocated to JVM. The amount shouldn’t exceed ¾ of the total RAM In your system. You can replace memory value with any number according to this pattern: -XmxYZ, where Y is the number of Z (g – gigabytes, m -megabytes) |
-Xms32g | JVM parameter controlling the minimal amount of RAM memory allocated to the JVM. This number shouldn’t be lower than ¼ of the -Xmx parameter |
-jar “<PATH_TO_JAR_FILE>” | This is the direct path to the jar file |
-configRootDIR <PATH_TO_MAIN_FOLDER> | This parameter points to the main folder of the server (containing license and config folders) |
& | This option will keep the server running in the background |
In order to start the server you can edit scripts/start.bash script. It’s very short and simple:
taskkill /f /t /im java.exe
echo Shutting down old instances ... 3
sleep 1
echo Shutting down old instances ... 2
sleep 1
echo Shutting down old instances ... 1
sleep 1
taskkill /f /t /im java.exe
echo Shutting down old instances ... 0
sleep 1
print Staring new Java App
START /B java -Xmx128g -Xms32g -jar C:\Program Files\Storm\StormStreamingServer.jar -configRootDIR C:\Program Files\Storm
The script will automatically kill all instances of Storm sever and start a new one. We’ll have to edit some parameters before we can properly launch the server.
Parameter | Description |
---|---|
-Xmx128g | JVM parameter controlling the maximum amount of RAM memory can be allocated to JVM. The amount shouldn’t exceed ¾ of total RAM in your system. You can replace memory value with any number according to this pattern: -XmxYZ, where Y is the number of Z (g – gigabytes, m -megabytes) |
-Xms32g | JVM parameter controlling the minimal amount of RAM memory allocated to the JVM. This number shouldn’t be lower than ¼ of the -Xmx parameter |
-jar “<PATH_TO_JAR_FILE>” | This is the direct path to the jar file |
-configRootDIR <PATH_TO_MAIN_FOLDER> | This parameter points to the main folder of the server (containing license and config folders) |
START /B | This option will keep the server running in the background |
This is an alternative method to manual installation. In order to download storm image, please use the following command (linux, mac os terminal):
docker run -it -d --name StormStreamingServer --hostname StormStreamingServer -e "JAVA_OPTS=-Xmx16G" -p 1935:1935 -p 80:8080 -p 443:8443 -v /home/storm/config:/opt/storm/data docker.stormstreaming.com/stormstreamingserver/stormstreamingserver:latest
Commands explanation:
--name StormStreamingServer | Name (alias) of our docker container. |
--hostname StormStreamingServer | Hostname of our docker container. |
-e "JAVA_OPTS=-Xmx16G" | Additional Java opts, -Xmx16G tells that JVM can use up to 16 GB of memory. We recommend to increase this value up to 2/3 of total machine memory. Eg. -Xms128GB, -Xms256GB |
-p 1935:1935 | Assigns local port (left) to the container port. This port reserved for RTMP Server. |
-p 80:8080 | Assigns local port (left) to the container port. This port reserved for Non-SSL HTTP Server. |
-p 433:8433 | Assigns local port (left) to the container port. This port reserved for SSL HTTP Server. |
-v /home/storm:/opt/storm/data. | Assigns host directory (left) to the config holder inside the container. Please make sure that the path on your host machine is valid! |
docker.stormstreaming.com/stormstreamingserver/stormstreamingserver:latest | Defines which image should be downloaded from the registry. Please make sure to always check for the latest version image (number at the end). You can check it on the My Products / Download page, within your account. |
To manage a Docker container, few commands come in handy:
docker logs StormStreamingServer
docker stop StormStreamingServer
docker start StormStreamingServer
Before StormStreamingServer can be started for the first time, some modifications to the preferences.xml must be made prior. For Docker images it will be auto-generated upon first container launch, but must be edited nonetheless.
<License key="YOUR-SERIAL-CODE-GOES-HERE" />
<Domain>sub1.mydomain.com</Domain>
<Certificate>
<path>/etc/ssl/private/mydomain.jks</path>
<password>mypassword</password>
</Certificate>
One more thing that needs to be done is defining the log files directory. In order to do it, please edit log4j.xml file and search for appender name="file" tag.
One of the parameters will show the directory for the logs.
<param name="file" value="H:/StormServer/log/log.log" />