Apache Ambari Upgrade
Also available as:
PDF

Chapter 3. Upgrading the Cluster's Underlying OS

Hortonworks supports using Ambari in a multi-OS version environment. Specifically, an environment in which both RHEL/CentOS 6 and RHEL/CentOS 7 nodes are being used in the cluster. This configuration is common, as many organizations are migrating from RHEL/CentOS 6 to RHEL/CentOS 7. This chapter describes specific caveats and requirements related to using Ambari in a mixed OS version environment.

[Note]Note

No Ambari package upgrades are necessary, only ensuring the Ambari Server database is handled properly, and that individual cluster host OS packages are validated post-upgrade.

Prior to upgrading your cluster nodes that are running RHEL/CentOS 6 to RHEL/CentOS 7, please perform the following steps on the server that is running Ambari Server instance if, and only if you are using the embedded Postgres instance for the Ambari Server’s backing database.

Before Upgrading Ambari Server Host OS

  1. Create a backup of your pg_hba.conf file.

    cd /var/lib/pgsql/data/
    cp pg_hba.conf pg_hba.conf.backup
  2. On the Ambari Server host, stop the original Ambari Server.

    ambari-server stop
  3. Create a directory to hold the database backups.

    cd /var/tmp
    mkdir dbdumps
    cd dbdumps
  4. Create the database backups.

    pg_dump -U {ambari.db.username} -f ambari.sql
    Password: {ambari.db.password}

    where:

    Variable

    Description

    Default

    ambari.db.username

    The database username

    ambari

    ambari.db.password

    The database password

    bigdata

  5. Create a backup of the Ambari Server meta info.

    ambari-server backup

After Upgrading Ambari Server Host OS

During the OS upgrade from RHEL/CentOS 6 to RHEL/CentOS 7 OS packages are upgraded, including the Postgres instance that the Ambari Server relies upon. Use the following steps to ensure the Ambari Server host OS and database function properly after the OS has been upgraded.

  1. Clean up HDP and Ambari related repositories created by upgrade tool.

    (redhat-upgrade-*)
  2. Ensure that all OS packages were upgraded appropriately. If not, it may be necessary to remove packages containing ‘el6’ in their names and install the appropriate el7 replacement packages.

    yum check dependencies
    [Note]Note

    Ensure that check dependencies returns 0 before continuing.

    1. Postgres is upgraded during the OS upgrade. You must run the following command to complete the database upgrade:

    postgresql-setup upgrade
  3. It is also necessary to restore the original pg_hba.conf that contains configuration for the Ambari users:

    cd /var/lib/pgsql/data/
    cp pg_hba.conf pg_hba.conf.after-upgrade
    cp pg_hba.conf.backup pg_hba.conf
  4. Restart the postgres instance.

    service postgresql restart
  5. Start the Ambari Server.

    ambari-server start

After Upgrading Ambari Agent Host OS

For the rest of the cluster, it is only necessary to ensure the repositories and host OS packages have been fully upgraded, no additional steps are required beyond the following:

  1. Cleanup HDP and Ambari related repositories created by upgrade tool.

    (redhat-upgrade-*)
  2. Ensure that all OS packages were upgraded appropriately. If not, it may be necessary to remove packages containing ‘el6’ in their names and install the appropriate el7 replacement packages.

    yum check dependencies
    [Note]Note

    Ensure that check dependencies returns 0 before continuing.