Chapter 8. Appendix: Upgrading Ambari Server from 1.2.0/1.2.1/1.2.2/1.2.2.5 to 1.2.3.7

Upgrading Ambari Server is a fifteen step manual process.

[Note] Note

You will need to know where the Nagios server is for Step 12. Use the Services View-> Summary panel to locate the host on which it is running, if necessary.

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

    ambari-server stop

    From each Ambari Agent host:

    ambari-agent stop
  2. 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.

    • Fetch the new repo file:

      For RHEL/CentOS 5

      wget http://public-repo-1.hortonworks.com/ambari/centos5/1.x/updates/1.2.3.7/ambari.repo 

      For RHEL/CentOS 6

      wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/updates/1.2.3.7/ambari.repo 

      For SLES 11

      wget http://public-repo-1.hortonworks.com/ambari/suse11/1.x/updates/1.2.3.7/ambari.repo 
      [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 will be saved with a numeric extension such as ambari.repo.1. Make sure that the version you copy is the new version.

    • Replace the old repo file with the new repo file.

      For RHEL/CentOS 5

      cp ambari.repo /etc/yum.repos.d/ambari.repo

      For RHEL/CentOS 6

      cp ambari.repo /etc/yum.repos.d/ambari.repo

      For SLES 11

      cp ambari.repo /etc/zypp/repos.d/ambari.repo
    [Note] Note

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

  3.  Local repository installs only: Copy the old stacks definition file (/var/lib/ambari-server/resources/stacks/HDPLocal/[1.2.0 or 1.2.1]/repos/repoinfo.xml to a safe place. You will be using it in Step 9.

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

    • RHEL/CentOS

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

      zypper clean
      zypper up ambari-server ambari-log4j
      
  5. 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 ...

      Once the process is complete, check each host to make sure the new 1.2.3.7 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
  6. 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
  7. Copy the following properties from the old properties file version named /etc/ambari-server/conf/ambari.properties.rpmsave to the new properties file version named /etc/ambari-server//conf/ambari.properties

    • server.jdbc.user.name

    • server.jdbc.user.passwd

    • java.home

    • server.os_type

  8. Upgrade the Ambari Server schema. From the Ambari Server host:

    ambari-server upgrade
  9. Local repository installs only: Take the version of the repoinfo.xml file you copied in Step 3, and copy it back to /var/lib/ambari-server/resources/stacks/HDPLocal/[1.2.0 or 1.2.1]/repos/repoinfo.xml.

  10. Upgrade the Ambari Agent on all hosts. From each Ambari Agent host:

    • RHEL/CentOS

      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.

  11. Check to see if you have a file 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
  12. Upgrade the Nagios and Ganglia addons package and restart. On the Nagios/Ganglia host:

    • RHEL/CentOS

      yum upgrade hdp_mon_nagios_addons hdp_mon_ganglia_addons
      service httpd restart
    • SLES

      zypper up hdp_mon_nagios_addons hdp_mon_ganglia_addons
      service apache2 restart
  13. Start the Server and the Agents on all hosts. From the Server host:

    ambari-server start

    From each Agent host:

    ambari-agent start
  14. 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 you may need to clear your browser cache manually and restart Ambari Server.

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

  15. Re-start the Ganglia, Nagios, and MapReduce services. In Ambari Web.

    1. Go to the Services View and select each service.

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


loading table of contents...