Chapter 9. Appendix: Upgrading the HDP Stack from 1.2.0 to 1.2.1

If you have a current instance of the 1.2.0 stack that was installed and managed by Ambari that you wish to upgrade to the current 1.2.1 version of the stack and the patched 1.2.2.4 version of Ambari Server and Agents, use the following instructions. This insures that your new stack can still be managed by Ambari.

[Note]Note

If you have already upgraded to Ambari Server 1.2.2.4 and just wish to upgrade the HDP stack, you can skip steps 4-13.

  1. Use the Services View on the Ambari Web UI to stop all services.

  2. Stop Ambari Server. On the Server host:

    ambari-server stop
  3. Stop Ambari Agents. On each host:

    ambari-agent stop
  4. Upgrade the Ambari repository on all hosts and replace the old repo file with the new file:

    [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.

    • For RHEL/CentOS 5

      wget http://public-repo-1.hortonworks.com/ambari/centos5/1.x/GA/ambari.repo
      cp ambari.repo /etc/yum.repos.d/ambari.repo
    • For RHEL/CentOS 6

      wget http://public-repo-1.hortonworks.com/ambari/centos6/1.x/GA/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/GA/ambari.repo
      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.

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

  6. Upgrade the Server:

    • For RHEL/CentOS

      yum upgrade ambari-server
    • For SLES

      zypper clean all
      zypper up ambari-server
  7. Check for upgrade success:

    • As the process runs, the console should produce output similar 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 an update ...

      Once the process is complete, check each host to make sure the new 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
  8. Rename the config folder for the Server. The name is changed during the upgrade process and must be changed back:

    mv /etc/ambari-server/conf.save /etc/ambari-server/conf
  9. Upgrade the schema for Ambari Server:

    ambari-server upgrade
  10. Local repository installs only: Take the version of the repoinfo.xml file you copied in Step 5 and copy it to /var/lib/ambari-server/resources/stacks/HDPLocal/1.2.0/repos/repoinfo.xml.

  11. Upgrade the Agent on all hosts:

    • For RHEL/CentOS

      yum upgrade ambari-agent
    • For SLES

      zypper up ambari-agent
  12. Rename the config folder for the Agent. The name is changed during the upgrade process and must be changed back. On each Agent host:

    mv /etc/ambari-agent/conf.save /etc/ambari-agent/conf
  13. Rename the ambari-agent.ini file. This name is changed during the upgrade process and must be changed back. On each Agent host:

    mv /etc/ambari-agent/conf/ambari-agent.ini.rpmsave /etc/ambari-agent/conf/ambari-agent.ini
  14. Update the stack version in the Server database, depending on if you are using a local repository:

    ambari-server upgradestack HDP-1.2.1
    or
    ambari-server upgradestack HDPLocal-1.2.1
  15. Upgrade the HDP repository on all hosts and replace the old repo file with the new file:

    • For RHEL/CentOS 5

      wget  http://public-repo-1.hortonworks.com/HDP/centos5/1.x/updates/1.2.1/hdp.repo 
      cp HDP.repo /etc/yum.repos.d/HDP.repo
    • For RHEL/CentOS 6

      wget http://public-repo-1.hortonworks.com/HDP/centos6/1.x/updates/1.2.1/hdp.repo 
      cp HDP.repo /etc/yum.repos.d/HDP.repo
    • For SLES 11

      wget  http://public-repo-1.hortonworks.com/HDP/suse11/1.x/updates/1.2.1/hdp.repo 
      cp HDP.repo /etc/zypp/repos.d/HDP.repo
  16. Upgrade the stack on all Agent hosts and restart the http daemon:

    • For RHEL/CentOS

      yum upgrade collectd* epel-release* gccxml* oozie* hadoop* zookeeper* hbase* pig* sqoop* 
                hive* hcatalog* webhcat-tar* hdp_mon_nagios_addons
      service httpd restart
    • For SLES

      zypper up collectd epel-release* gccxml* oozie* hadoop* zookeeper* hbase* pig* sqoop* 
                hive* hcatalog* webhcat-tar* hdp_mon_nagios_addons*
      yast --update hadoop hcatalog hive                        
      service apache2 restart
  17. Start the Ambari Server. On the server host:

    ambari-server start
  18. Start each Ambari Agent. On all agent hosts:

    ambari-agent start
  19. Use the Services View on Ambari Web to start all services.


loading table of contents...