Skip to main content
Version: 1.2.2.0

Ambari Upgrade

Ambari can be upgraded independently from ODP stack.

Prepare Ambari Upgrade

  • Be sure to review the Ambari 2.7.9.0 release notes for Known Issues and Behavioral Changes.
  • It’s necessary to possess root, administrative, or equivalent privileges on the host of the Ambari Server and all Ambari Agent hosts within the cluster.
  • It’s essential to create a backup of the Ambari Server database. You can use tool like pgdump or mysqldump.
  • You’re required to safely duplicate the Ambari Server configuration file located at /etc/ambari-server/conf/ambari.properties.
note

If you have made any modification to /var/lib/ambari-server/ambari-env.sh file (like for example modifying the heapsize), you will need to restore because during Ambari upgrade process, the existing /var/lib/ambari-server/ambari-env.sh file is overwritten. A backup copy of ambari-env.sh (with extension .rpmsave) is created.

Upgrading Ambari

Ambari services

  1. If you are running Ambari Metrics and/or Ambari Infra services, you need to stop the services. Put the services in Maintenance Mode.

  2. Stop Ambari server. Connect to the Ambari Server Host

    If you are using systemd to start/stop Ambari Server

    systemctl stop ambari-server

    If you are not using systemd to start/stop Ambari Server

    ambari-server stop
  3. Stop Ambari Agent. Connect to on every host runing an Ambari Agent. If you are using systemd to start/stop Ambari Agent

    systemctl stop ambari-agent

    If you are not using systemd to start/stop Ambari Agent

    ambari-agent stop
    note

    It is not recommanded to run Ambari Agent using systemd because when restarting, it can stop child process started by Ambari Agent and cause downtime.

  4. Collect the new Ambari Repository file and replace the old one:

    For Ubuntu 22:

    wget -nv https://archive.clemlab.com/ubuntu22/ambari-release/2.7.9.0.0-110/ambari.list -O /etc/apt/sources.list.d/ambari.list

    For CentOS/RedHat 7:

    wget -nv https://archive.clemlab.com/centos7/ambari-release/2.7.9.0.0-110/ambari.repo -O /etc/yum.repos.d/ambari.repo

    For CentOS/RedHat/RockyLinux/AlmaLinux 8:

    wget -nv https://archive.clemlab.com/centos8/ambari-release/2.7.9.0.0-110/ambari.repo -O /etc/yum.repos.d/ambari.repo
  5. Upgrading Ambari Server Package

    For Ubuntu 22: Connect on Ambari Server Host

    apt update -y
    apt upgrade ambari-server
    ambari-server upgrade

    You can check that ambari-server package has been upgraded by typing the following command.

    apt search ambari-server
    Sorting... Done
    Full Text Search... Done
    ambari-server/opensource.clemlab.com,now 2.7.9.0.0-110 amd64 [installed]

    For Centos/RHEL/Rocky/AlmaLinux 7/8: Connect on Ambari Server Host

    yum upgrade -y ambari-server

    You can check that ambari-server package has been upgraded by typing the following command.

    yum list installed | grep ambari-server 
    ambari-server.x86_64 2.7.9.0.0-110 @ambari-2.7.9.0.0-110

    Upgrade Ambari Server Metadata

    ambari-server upgrade
    Upgrading ambari-server
    INFO: Upgrade Ambari Server
    INFO: Updating Ambari Server properties in ambari.properties ...
    INFO: Updating Ambari Server properties in ambari-env.sh ...
    INFO: Original file ambari-env.sh kept
    WARNING: Original file krb5JAASLogin.conf kept
    INFO: File krb5JAASLogin.conf updated.
    INFO: Fixing database objects owner
    Ambari Server configured for Postgres. Confirm you have made a backup of the Ambari Server database [y/n] (n)?

    Backup Ambari Server Database then enter yes

    INFO: Upgrading database schema
    INFO: Return code from schema upgrade command, retcode = 0
    INFO: Console output from schema upgrade command:
    INFO: {}
    INFO: Schema upgrade completed
    Adjusting ambari-server permissions and ownership...
    Ambari repo file doesn't contain latest json url, skipping repoinfos modification
    Ambari Server 'upgrade' completed successfully.

    When it is successfull you have the following message Ambari Server 'upgrade' completed successfully.

  6. Upgrading Ambari Agent Package

    For Ubuntu 22: Connect on every Ambari Agent Host

    apt update -y
    apt upgrade ambari-agent

    You can check that ambari-agent package has been upgraded by typing the following command.

    apt search ambari-agent
    Sorting... Done
    Full Text Search... Done
    ambari-agent/opensource.clemlab.com,now 2.7.9.0.0-110 amd64 [installed]

    For Centos/RHEL/Rocky/AlmaLinux 7/8: Connect on every Ambari Agent Host

    yum upgrade -y ambari-agent

    You can check that ambari-agent package has been upgraded by typing the following command.

    yum list installed | grep ambari-agent 
    ambari-agent.x86_64 2.7.9.0.0-110 @ambari-2.7.9.0.0-110
  1. Upgrading Ambari Infra Package

    For Ubuntu 22: Connect on every Ambari Infra Host

    apt update -y
    apt upgrade ambari-infra-solr ambari-infra-solr-client

    You can check that ambari-server package has been upgraded by typing the following command.

    apt search ambari-agent
    Sorting... Done
    Full Text Search... Done
    ambari-infra-solr/opensource.clemlab.com,now 2.7.9.0.0-110 amd64 [installed]
    Apache Ambari Infra Solr Server Package build by Clemlab

    ambari-infra-solr-client/opensource.clemlab.com,now 2.7.9.0.0-110 amd64 [installed]
    Apache Ambari Infra Solr Client Package build by Clemlab

    For Centos/RHEL/Rocky/AlmaLinux 7/8: Connect on every Ambari Infra Host

    yum upgrade -y ambari-infra-solr ambari-infra-solr-client

    You can check that ambari-server package has been upgraded by typing the following command.

    yum list installed | grep ambari-infra-solr 
    ambari-infra-solr.noarch 2.7.9.0.0-110 @ambari-2.7.9.0.0-110
    ambari-infra-solr-client.noarch 2.7.9.0.0-110 @ambari-2.7.9.0.0-110
  2. Upgrading Ambari Metrics Package

    For Ubuntu 22: Connect on every Ambari Metrics Host

    apt update -y
    apt upgrade ambari-metrics

    You can check that ambari-server package has been upgraded by typing the following command.

    apt search ambari-metrics
    Sorting... Done
    Full Text Search... Done
    ambari-metrics/opensource.clemlab.com,now 2.7.9.0.0-110 amd64 [installed]
    Ambari Metrics Package Build by Clemlab company

    For Centos/RHEL/Rocky/AlmaLinux 7/8:

    yum upgrade -y ambari-metrics

    You can check that ambari-metrics package has been upgraded by typing the following command.

    yum list installed | grep ambari-metrics 
    ambari-metrics.x86_64 2.7.9.0.0-110 @ambari-2.7.9.0.0-110
  3. Starting Ambari Server after the upgrade

    Connect on Ambari Server Host
    If you are using systemd to start/stop Ambari Server

    systemctl start ambari-server

    If you are not using systemd to start/stop Ambari Server

    ambari-server start
  4. Starting Ambari Agent after the upgrade

    Connect on Ambari Agent Host

    ambari-agent start

    Connect to the WebUI for example http://ambari.clemlab.com:8080 or https://ambari.clemlab.com:8442 (if SSL/TLS is enabled) to check that everything is okay, and restart Ambari Infra and Ambari Metrics services