Apache Ambari Major Upgrade
Also available as:
PDF

Upgrade Ambari

  1. Turn off Auto Restart from Ambari Web by browsing to Admin > Service Auto Start. Set Auto-Start Services to Disabled. Click Save.

    From Ambari Web, browse to Admin > Service Auto Start. Set Auto-Start Services to Disabled. Click Save.

  2. If you are running SmartSense in your cluster, stop the service.

    From Ambari Web, browse to Services > SmartSense and select Stop from the Service Actions menu. Then, select Turn on Maintenance Mode from the Service Actions menu.

  3. If you are running Ambari Metrics in your cluster, stop the service and put it in Maintenance Mode.

    From Ambari Web, browse to Services > Ambari Metrics and select Stop from the Service Actions menu. Then, select Turn on Maintenance Mode from the Service Actions menu.

  4. If you are running Log Search in your cluster, stop the service.

    From Ambari Web, browse to Services > Log Search and select Stop from the Service Actions menu. Then, select Turn on Maintenance Mode from the Service Actions menu.

  5. Stop the Ambari Server. On the host running Ambari Server:

    ambari-server stop
  6. Stop all Ambari Agents. On each host in your cluster running an Ambari Agent:

    ambari-agent stop
  7. Back up your existing Ambari Server database.

    For example,to back up the default, embedded postgres db for Ambari:

     mkdir /root/backups/
    pg_dump -U ambari ambari > /root/backups/ambari-before-upgrade.sql

    The default password is: bigdata .

  8. Upgrade your Ambari Server database to a current supported version, only if your Ambari Server database version is not supported on the target Ambari version.

    To verify current supported versions, see the Hortonworks Support Matrix.

    For example, if you are running postgres v9.4, you must upgrade postgres to v9.6 or v10.2. If you are running MariaDB 10.2, upgrading the Ambari Server database is not required.

    Consult the documentation for your database type and version for specific database upgrade instructions.

  9. Fetch the new Ambari repo and replace the old repository file with the new repository file on all hosts in your cluster.

    [Important]Important

    Check your current directory before you download the new repository file to make sure that there are no previous versions of the ambari.repo 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.

    Select the repository appropriate for your environment from the following list:

    • For RHEL/CentOS/Oracle Linux 7:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/centos7/ambari.repo -O /etc/yum.repos.d/ambari.repo
    • For Amazon Linux 2:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/amazonlinux2/ambari.repo -O /etc/yum.repos.d/ambari.repo
    • For SLES 12:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/sles12/ambari.repo -O /etc/zypp/repos.d/ambari.repo
    • For Ubuntu 14:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/ubuntu14/ambari.list -O /etc/apt/sources.list.d/ambari.list
    • For Ubuntu 16:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/ubuntu16/ambari.list -O /etc/apt/sources.list.d/ambari.list
    • For Debian 9:

      wget -nv https://archive.cloudera.com/p/ambari/2.x/2.7.1.0/debian9/ambari.list -O /etc/apt/sources.list.d/ambari.list
  10. Upgrade Ambari Server. On the host running Ambari Server:

    • For RHEL/CentOS/Oracle/Amazon Linux:

      yum clean all
      yum info ambari-server

      In the info output, visually validate that there is an available version containing "2.7"

      yum upgrade ambari-server
    • For SLES:

      zypper clean
      zypper info ambari-server

      In the info output, visually validate that there is an available version containing "2.7"

      zypper up ambari-server
    • For Ubuntu/Debian:

      apt-get clean all
      apt-get update
      apt-cache show ambari-server | grep Version 

      In the info output, visually validate that there is an available version containing "2.7"

      apt-get install ambari-server 
    [Important]Important

    When performing upgrade on SLES, you will see a message "There is an update candidate for 'ambari-server', but it is from different vendor. Use 'zypper install ambari-server-2.7.1-750.noarch' to install this candidate". You will need to to use yast to update the package, as follows:

    1. From the command line run: > yast.

      > yast

      You will see command line UI for YaST program.

    2. Choose Software > Software Management, then click the Enter button.

    3. In the Search Phrase field, enter ambari-server, then click the Enter button.

    4. On the right side you will see the search result ambari-server 2.7.1. Click Actions, choose Update, then click the Enter button.

    5. Go to Accept, and click enter.

  11. Check for upgrade success by noting progress during the Ambari Server installation process you started in Step 8.

    • As the process runs, the console displays output similar, although not identical, to the following:

      Setting up Upgrade Process Resolving Dependencies --> Running transaction check

    • If the upgrade fails, the console displays output similar to the following:

      Setting up Upgrade Process No Packages marked for Update

    • A successful upgrade displays output similar to the following:

      Updated: ambari-server.noarch 0:2.7.1 Complete!

    [Important]Important

    Confirm there is only one ambari-server*.jar file in /usr/lib/ambari-server. If there is more than one JAR file with name ambari-server*.jar, move all JARs except ambari-server-2.7.1*.jar to /tmp before proceeding with upgrade.

  12. Upgrade all Ambari Agents. On each host in your cluster running an Ambari Agent:

    • For RHEL/CentOS/Oracle/Amazon Linux:

      yum upgrade ambari-agent
    • For SLES:

      zypper up ambari-agent
      [Note]Note

      Ignore the warning that begins with "There are some running programs that use files deleted by recent upgrade".

      [Important]Important

      When performing upgrade on SLES, you will see a message "There is an update candidate for 'ambari-agent', but it is from different vendor. Use 'zypper install ambari-agent-2.7.1-750.noarch' to install this candidate". You will need to to use yast to update the package, as follows:

      1. From the command line run: > yast

        > yast

        You will see command line UI for YaST program.

      2. Choose Software > Software Management, then click the Enter button.

      3. In the Search Phrase field, enter ambari-agent, then click the Enter button.

      4. On the right side you will see the search result ambari-agent 2.7.1. Click Actions, choose Update, then click the Enter button.

      5. Go to Accept, and click enter.

    • For Ubuntu/Debian:

      apt-get update
      apt-get install ambari-agent
  13. After the upgrade process completes, check each host to make sure the new files have been installed:

    For RHEL/CentOS/Oracle Linux 7, Amazon Linux 2:
    rpm -qa | grep ambari-agent
    For SLES 12:
    rpm -qa | grep ambari-agent
    For Ubuntu 14:
    dpkg -l ambari-agent
    For Ubuntu 16:
    dpkg -l ambari-agent
    For Debian 9:
    dpkg -l ambari-agent
  14. Upgrade Ambari Server database schema. On the host running Ambari Server:

    ambari-server upgrade

    When the Ambari Server database schema has been upgraded, you should see command output like this:

    Ambari Server ‘upgrade’ completed successfully
  15. Start the Ambari Server. On the host running Ambari Server:

    ambari-server start
  16. Start all Ambari Agents. On each host in your cluster running an Ambari Agent:

    ambari-agent start
  17. Open Ambari Web.

    Point your browser to the Ambari Web UI:

    • When Ambari Server is configured for HTTPS:

      https://<your.ambari.server>:8443

    • When Ambari Server is configured for HTTP:

      http://<your.ambari.server>:8080

    where <your.ambari.server> is the name of your ambari server host. For example, c7401.ambari.apache.org.

    [Important]Important

    Refresh your browser so that it loads the new version of the Ambari Web code. If you have problems, clear your browser cache manually, then restart Ambari Server.

  18. Log in, using the Ambari administrator credentials that you have set up.

    For example, the default name/password is admin/admin.

    You will see a Restart indicator next to each service after upgrading. Ambari upgrade has added to/adjusted the configuration properties of your cluster based on new configuration types and properties being made available for each service with this release of Ambari. Review these changes by comparing the previous configuration with the latest version created by "ambari-upgrade".

    [Important]Important

    DO NOT RESTART these services unless future steps in the upgrade guide prompt you to do so. Manually restarting these services may significantly disrupt your upgrade. Ambari will restart each service automatically during the HDP upgrade.

  19. If you have configured Ambari to authenticate against an external LDAP or Active Directory, you must re-run

    ambari-server setup-ldap
  20. If you have configured your cluster for Hive, Ranger or Oozie with an external database (Oracle, MySQL or PostgreSQL), you must re-run

    ambari-server setup --jdbc-db and --jdbc-driver

    to get the JDBC driver jar file in place.

[Important]Important

Ambari Metrics System, and SmartSense must be upgraded after first registering the HDP 3.0.x version and installing HDP 3.0.x packages. Please do not attempt to start Ambari Metrics or SmartSense until the HDP 3.0.x upgrade has completed.

Next Steps

Upgrading HDP

More Information

Configuring Ambari Authentication for LDAP/AD

Using a new or existing database with Hive

Using an existing database with Oozie

Configuring a Database Instance for Ranger

​Install Databases for HDF services