Apache Ambari Update
Prerequisites
- Creation or update of the local package repository for updates with restricted or no internet access.
- Verification of the prerequisites for the update.
Updating Apache Ambari
Package Repository
- Instructions
- Vídeo (Example)
Carry out the following procedures on all Cluster machines to define a new package repository for Apache Ambari:
-
Access the directory where the Ambari package repository file (repo file) is located:
Terminal inputcd /etc/yum.repos.d/
-
Execute the command below to download the
ambari.repo
file and save it in the local directory /etc/yum.repos.d/, to be used by the YUM package manager.-
Terminal input
wget -O /etc/yum.repos.d/ambari.repo https://repo.tecnisys.com.br/repository/public/tdp/2.2.0/el-9-x86_64/ambari.repo
-
Terminal input
curl -o /etc/yum.repos.d/ambari.repo https://repo.tecnisys.com.br/repository/public/tdp/2.2.0/el-9-x86_64/ambari.repo
warningThe commands suggested below overwrite the file
/etc/yum.repos.d/ambari.repo
, if it already exists in the directory. If necessary, perform a backup of the file with the current definitions first. -
-
In the ambari.repo file, replace the USER and PASS variables, present in the URLs of the baseurl and gpgkey properties, respectively, with your user and password registered on the Site da Tecnisys . If using a local repository, adjust these URLs.
-
After defining the package repository of the new TDP version, we recommend updating the yum/dnf cache:
Terminal inputyum clean all; yum makecache fast;
Updating the Ambari Agent
- Instructions
- Vídeo (Example)
With the new package repository defined, begin updating the Ambari Agent component.
Communication between the Ambari Agent and the Ambari Server is suspended during the update. However, the services of other Cluster components continue to operate.

To update the Ambari Agent, perform the following procedure on all Cluster machines:
-
Stop the Ambari Agent service:
Terminal inputambari-agent stop
-
Update the Ambari Agent binaries:
Terminal inputyum upgrade ambari-agent -y
noteAny customizations of the
ambari-agent.ini
file can be recovered from the backup file generated:ambari-agent.ini.old
-
Start the Ambari Agent service:
Terminal inputambari-agent start
Updating the Ambari Server
- Instructions
- Vídeo (Example)
After updating the Ambari Agent on all Cluster machines, proceed to update the Ambari Server.
This operation requires stopping the Ambari Server service.
It is recommended to perform a backup of the Ambari metadata database before starting this operation.
Carry out the following procedure only on the machine where the Ambari Server is installed:
-
Stop the Ambari Server service:
Terminal inputambari-server stop
-
Update the Ambari Server binaries:
Terminal inputyum upgrade ambari-server -y
Figure 2 - Updating the Ambari Server binaries -
Update the Ambari Server metadata:
Terminal inputambari-server upgrade
noteBasically, this command performs the following operations:
- Adjustments of Ambari properties.
- Update of the metadata database schema.
- Verification of new versions of the TDP stack.
Figure 3 - Ambari Server Upgrade -
Start the Ambari Server:
Terminal inputambari-server start
-
Check the new version of Ambari in the web interface by clicking on the user button, located at the top right of the page, and then on the About option.
Figure 4 - Ambari Version -
Check the new version of the TDP stack in the web interface by clicking on the Stack and Versions option from the sidebar menu, and then on the VERSIONS tab.
importantIf the alert "Host component out of sync" is displayed on the VERSIONS tab, perform the procedure defined in Updating the Current Stack Version to correct this inconsistency.
Updating the Current Stack Version
- Instructions
- Vídeo (Example)
If the alert "Host component out of sync" is displayed when checking the versions of the TDP stack in the Ambari web interface, carry out the detailed procedure in this section to correct this occasional inconsistency between the current stack version and the information defined in the Ambari metadata database.

This operation requires stopping the Ambari Server service.
It is recommended to perform a backup of the Ambari metadata database before starting this operation.
Carry out the following procedure on the machine where the Ambari Server is installed:
-
Stop the Ambari Server:
Terminal inputambari-server stop
-
Update the Ambari metadata database.
If the metadata database is NOT on PostgreSQL, access the relevant database and execute the following command:
Terminal inputUPDATE ambari.host_version SET state = 'CURRENT' WHERE state!= 'CURRENT';
If the metadata database is on PostgreSQL:
Terminal inputambari server set current --cluster name <CLUSTER-NAME> --version display name TDP<VERSION>
Figure 6 - Setting the current stack versionnoteEnsure that the CLUSTER-NAME and VERSION are correct by consulting the Stack and Versions page of the Ambari web interface.
-
Start the Ambari Server:
Terminal inputambari-server start
-
Check if the inconsistency has been resolved by accessing the Ambari web interface, clicking on the Stack and Versions option from the sidebar menu, and then on the VERSIONS tab.
Figure 7 - Inconsistency resolved