Chapter 8. Appendix: Upgrading Ambari to 1.2.5

This process upgrades Ambari Server, Ambari Agents, Nagios and Ganglia. It does not change the underlying Hadoop Stack. This is a fourteen step manual process.

[Note] Note

You must know the location of the Nagios and Ganglia servers for step 11. Use the Services->Nagios/Ganglia-> Summary panel to locate the hosts on which they are running.

  1. Stop Nagios and Ganglia, using the Ambari Web GUI. From the Services View, select Nagios and use the Management Header to stop it. Do the same for Ganglia.

  2. Stop the Ambari Server and all Ambari Agents. From the Ambari Server host:

    ambari-server stop

    From each Ambari Agent host:

    ambari-agent stop
  3. Check to see if you have a conf.save directory for Ambari server and agents. If you do, move them to a back-up location:

    mv /etc/ambari-server/conf.save/ /etc/ambari-server/conf.save.bak 
    mv /etc/ambari-agent/conf.save/ /etc/ambari-agent/conf.save.bak 
  4. Get the new Ambari bits. Use wget to fetch the repository file and replace the old repo file with the new repo file on every host.

    [Important] Important

    Check your current directory before you download the new repo file to make sure that there are no previous versions of the file. If you do not, and a previous version exists, the new download is saved with a numeric extension such as ambari.repo.1. Make sure that the version you copy is the new version.

    • Fetch the new repo file and replace the old repo file with the new file:

      For RHEL/CentOS 5/Oracle Linux 5

      wget http://public-repo-1.hortonworks.com/ambari/centos5/1.x/updates/1.2.5.17/ambari.repo
      cp ambari.repo /etc/yum.repos.d/ambari.repo

      For RHEL/CentOS 6/Oracle Linux 6

      wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.2.5.17/ambari.repo
      cp ambari.repo /etc/yum.repos.d/ambari.repo

      For SLES 11

      wget http://public-repo-1.hortonworks.com/ambari/suse11/1.x/updates/1.2.5.17/ambari.repo
      cp ambari.repo /etc/zypp/repos.d/ambari.repo
    [Note] Note

    If your cluster does not have access to the Internet, set up a local repository with this data before you continue. See Configure the Local Repositories for more information.

  5. Upgrade Ambari Server. From the Ambari Server host:

    • RHEL/CentOS/Oracle Linux

      yum clean all
      yum upgrade ambari-server ambari-log4j
    • SLES

      zypper clean
      zypper up ambari-server ambari-log4j
      
  6. Check for upgrade success:

    • As the process runs, the console should produce output similar, although not identical, to this:

      Setting up Upgrade Process
      Resolving Dependencies
      --> Running transaction check
      ---> Package ambari-agent.x86_64 0:1.2.2.3-1 will be updated
      ---> Package ambari-agent.x86_64 0:1.2.2.4-1 will be updated ...
      ---> Package ambari-agent.x86_64 0:1.2.2.5-1 will be an update ...

      After the process is complete, check each host to make sure the new 1.2.5 files have been installed:

      rpm -qa | grep ambari
    • If the upgrade fails, the console should produce output similar to this:

      Setting up Upgrade Process
      No Packages marked for Update
  7. Check to see if you have a folder named /etc/ambari-server/conf.save. If you do, rename it back:

    mv /etc/ambari-server/conf.save /etc/ambari-server/conf
  8. Upgrade the Ambari Server schema. From the Ambari Server host:

    ambari-server upgrade
  9. Upgrade the Ambari Agent on all hosts. From each Ambari Agent host:

    • RHEL/CentOS/Oracle Linux

      yum upgrade ambari-agent ambari-log4j
    • SLES

      zypper up ambari-agent ambari-log4j
      [Note] Note

      If you get a warning that begins "There are some running programs that use files deleted by recent upgrade" you can ignore it.

  10. Check to see if you have a folder named /etc/ambari-agent/conf.save on each Agent host. If you do, rename it back. On each Agent host:

    mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf
  11. Upgrade Ganglia and Nagios:

    • Upgrade Ganglia Server. From the Ganglia Server host:

      • RHEL/CentOS/Oracle Linux

        yum upgrade ganglia-gmond ganglia-gmetad libganglia
        yum erase gweb hdp_mon_ganglia_addons
        yum install ganglia-web
      • SLES

        zypper up ganglia-gmond ganglia-gmetad libganglia
        zypper remove gweb hdp_mon_ganglia_addons
        zypper install ganglia-web
    • Upgrade Ganglia Monitor. From every host that has Ganglia Monitor installed:

      • RHEL/CentOS

        yum upgrade ganglia-gmond libganglia
      • SLES

        zypper up ganglia-gmond libganglia 
    • Upgrade Nagios. From the Nagios Server host:

      • RHEL/CentOS/Oracle Linux

        yum upgrade nagios
        yum upgrade hdp_mon_nagios_addons
        yum erase nagios-plugins-1.4.15
        yum install nagios-plugins-1.4.9

        The 1.4.9 version of the plugin may already be installed. In this case, the second step is a no-op.

      • SLES

        zypper up nagios
         zypper up hdp_mon_nagios_addons
        zypper remove nagios-plugins-1.4.15
        zypper install nagios-plugins-1.4.9

        The 1.4.9 version of the plugin may already be installed. In this case, the second step is a no-op.

  12. Start the Ambari Server and Agents on all hosts. From the Server host:

    ambari-server start

    From each Agent host:

    ambari-agent start
  13. Open Ambari Web. Point your browser to http://{your.ambari.server}:8080

    [Important] Important

    You need to refresh your browser so that it loads the new version of the code. Hold the Shift key down while clicking the refresh button on the browser. If you have problems, clear your browser cache manually and restart Ambari Server.

    Use the Admin name and password you have set up to log in.

  14. Start the Ganglia and Nagios services and restart MapReduce. In Ambari Web.

    1. Go to the Services and select each service.

    2. Use the Management Header to start or stop and re-start each service.


loading table of contents...