Building Apache Storm - linux-on-ibm-z/docs GitHub Wiki

Apache Storm

General Notes:

  • When following the steps below please use a standard permission user unless otherwise specified.
  • A directory /<source_root>/ will be referred to in these instructions, this is a temporary writable directory anywhere you'd like to place it.

Apache Storm binaries are available and can be downloaded from here.

Note: Apache Storm (v2.6.1) was verified at the time of creation of these instructions

Step 1: Install dependencies

export SOURCE_ROOT=/<source_root>/
  • RHEL (7.8, 7.9)

    sudo yum install -y curl which procps tar wget python3 gcc gcc-c++ bzip2 make

    RocksDB require a newer libstdc++ than the one available on RHEL 7.x so a newer version of GCC needs to be built:

    cd $SOURCE_ROOT
    ver=10.2.0
    wget https://ftp.gnu.org/gnu/gcc/gcc-${ver}/gcc-${ver}.tar.gz
    tar xzf gcc-${ver}.tar.gz
    cd gcc-${ver}
    ./contrib/download_prerequisites
    mkdir build-gcc
    cd build-gcc
    ../configure --enable-languages=c,c++ --disable-multilib
    make -j$(nproc)
    sudo make install
    sudo ldconfig /usr/local/lib64 /usr/local/lib
    
  • RHEL (8.6, 8.8, 8.9)

    sudo yum install -y curl which procps tar wget python3.11
  • RHEL (9.0, 9.2, 9.3)

    sudo yum install -y curl which procps tar wget python3
  • SLES 12 SP5

    sudo zypper install -y curl which tar wget
    

    Install Python 3.12.x.

  • SLES 15 SP5

    sudo zypper install -y curl which tar wget python311
    sudo ln -sf /usr/bin/python3.11 /usr/bin/python3
    
  • Ubuntu (20.04, 22.04, 23.10)

    sudo apt update
    sudo apt-get install -y curl tar wget python3 gnupg2

Step 2: Install Java

  • RHEL (7.8, 7.9, 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)

    • With Eclipse Temurin

      • Download and install Eclipse Temurin JDK (Java 11, 17 or 21) from here.
    • With IBM Semeru Runtime

      • Download and install IBM Semeru Runtime (Java 11, 17 or 21) from here.
    • With OpenJDK11

      sudo yum install -y java-11-openjdk-devel
      
    • With OpenJDK17 (RHEL 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)

      sudo yum install -y java-17-openjdk-devel
      
    • With OpenJDK21 (RHEL 8.6, 8.8, 8.9, 9.0, 9.2, 9.3)

      sudo yum install -y java-21-openjdk-devel
      
  • SLES (12 SP5, 15 SP5)

    • With Eclipse Temurin

      • Download and install Eclipse Temurin JDK (Java 11, 17 or 21) from here.
    • With IBM Semeru Runtime

      • Download and install IBM Semeru Runtime (Java 11, 17 or 21) from here.
    • With OpenJDK11

      sudo zypper install -y java-11-openjdk-devel
      
    • With OpenJDK17 (15 SP5)

      sudo zypper install -y java-17-openjdk-devel
      
  • Ubuntu (20.04, 22.04, 23.10)

    • With Eclipse Temurin

      • Download and install Eclipse Temurin JDK (Java 11, 17 or 21) from here.
    • With IBM Semeru Runtime

      • Download and install IBM Semeru Runtime (Java 11, 17 or 21) from here.
    • With OpenJDK11

      sudo apt-get update
      sudo apt-get install -y openjdk-11-jdk
      
    • With OpenJDK17

      sudo apt-get update
      sudo apt-get install -y openjdk-17-jdk
      
    • With OpenJDK21

      sudo apt-get update
      sudo apt-get install -y openjdk-21-jdk
      

Step 3: Set environment variables

export JAVA_HOME=<path to java>
export PATH=$JAVA_HOME/bin:$PATH

Step 4: Setting up a Storm cluster

  • Run Apache Zookeeper

    Apache ZooKeeper binaries are available and can be downloaded from here.

    To start the server, extract binary tar to $SOURCE_ROOT and follow steps given below.

    cd $SOURCE_ROOT/<apache_zookeeper_binary_folder>/
    mv conf/zoo_sample.cfg conf/zoo.cfg
    
    bin/zkServer.sh start
    bin/zkCli.sh

    Note:

    • If encountering error message 'Starting zookeeper ... FAILED TO START', please check whether 'ps' command is enabled in bash.
    • User can rename existing sample config file or create their own zoo.cfg.
  • Run Apache Storm

    Extract binary tar to $SOURCE_ROOT and follow steps given below.

    cd $SOURCE_ROOT/<apache_storm_folder>/
    mkdir data
    • Append below lines to $SOURCE_ROOT/<apache_storm_folder>/conf/storm.yaml.

       @@ -105,3 +105,13 @@
       #        class: "org.apache.storm.metrics2.filters.RegexFilter"
       #        expression: ".*my_component.*emitted.*"
      
      +storm.zookeeper.servers:
      + - "localhost"
      +storm.local.dir: "$SOURCE_ROOT/<apache_storm_folder>/data"
      +ui.port: <port_no>
      +nimbus.seeds: ["localhost"]
      +supervisor.slots.ports:
      + - 6700
      + - 6701
      + - 6702
      + - 6703

      Note: The port is configured by ui.port. Please provide <port_no> of your choice. It is set to 8080 by default.

    • Run the Storm daemons.

       cd $SOURCE_ROOT/<apache_storm_folder>/
       nohup bin/storm nimbus &
       nohup bin/storm supervisor &
       nohup bin/storm ui &

      Note: The UI can be accessed by navigating your web browser to http://<ip_address>:{ui port}.

References:

⚠️ **GitHub.com Fallback** ⚠️