Apache Storm Component Guide
Also available as:
PDF
loading table of contents...

Configuring Storm for Supervision

If you are deploying a production cluster with Storm, you should configure the Storm components to operate under supervision.

Follow these steps to configure Storm for supervision:

  1. Stop all Storm components.

    1. Using Ambari Web, browse to Services > Storm > Service Actions.

    2. Choose Stop, and wait until the Storm service completes.

  2. Stop Ambari Server:

    ambari-server stop

  3. Change the Supervisor and Nimbus command scripts in the Stack definition.

    On Ambari Server host, run:

    sed -ir "s/scripts\/supervisor.py/scripts\/supervisor_prod.py/g" /var/lib/ambari-server/resources/common-services/STORM/0.9.1.2.1/metainfo.xml
    
    sed -ir "s/scripts\/nimbus.py/scripts\/nimbus_prod.py/g" /var/lib/ambari-server/resources/common-services/STORM/0.9.1.2.1/metainfo.xml
  4. Install supervisord on all Nimbus and Supervisor hosts.

    • Install EPEL repository:

      yum install epel-release -y

    • Install supervisor package for supervisord:

      yum install supervisor -y

    • Enable supervisord on autostart:

      chkconfig supervisord on

    • Change supervisord configuration file permissions:

      chmod 600 /etc/supervisord.conf

  5. Configure supervisord to supervise Nimbus Server and Supervisors by appending the following to /etc/supervisord.conf on all Supervisor host and Nimbus hosts:

    [program:storm-nimbus]
    command=env PATH=$PATH:/bin:/usr/bin/:/usr/jdk64/jdk1.7.0_67/bin/ JAVA_HOME=/usr/jdk64/jdk1.7.0_67 /usr/hdp/current/storm-nimbus/bin/storm nimbus
    user=storm
    autostart=true
    autorestart=true
    startsecs=10
    startretries=999
    log_stdout=true
    log_stderr=true
    logfile=/var/log/storm/nimbus.out
    logfile_maxbytes=20MB
    logfile_backups=10
    
    [program:storm-supervisor]
    command=env PATH=$PATH:/bin:/usr/bin/:/usr/jdk64/jdk1.7.0_67/bin/ JAVA_HOME=/usr/jdk64/jdk1.7.0_67 /usr/hdp/current/storm-supervisor/bin/storm supervisor
    user=storm
    autostart=true
    autorestart=true
    startsecs=10
    startretries=999
    log_stdout=true
    log_stderr=true
    logfile=/var/log/storm/supervisor.out
    logfile_maxbytes=20MB
    logfile_backups=10
    [Note]Note

    Change /usr/jdk64/jdk1.7.0_67 to the location of the JDK being used by Ambari in your environment.

  6. Start supervisord on all Supervisor and Nimbus hosts:

    service supervisord start

  7. Start Ambari Server:

    ambari-server start

  8. Start all other Storm components:

    1. Using Ambari Web, browse to Services > Storm > Service Actions.

    2. Choose Start.