Ambari Reference Guide
Also available as:
PDF
loading table of contents...

Chapter 3. Configuring Storm for Supervision

If you have installed a cluster with HDP 2.2 Stack that includes the Storm service, you can configure the Storm components to operate under supervision. This section describes those steps:

  1. Stop all Storm components.

    Using Ambari Web, browse to Services > Storm > Service Actions, choose Stop. Wait until the Storm service stop completes.

  2. Stop Ambari Server.

    ambari-server stop

  3. Change 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 accordingly.

    [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 accordingly to the location of the JDK being used by Ambari in your environment.

  6. Start Supervisord service on all Supervisor and Nimbus hosts.

    service supervisord start

  7. Start Ambari Server.

    ambari-server start

  8. Start all the other Storm components.

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