Upgrade Apache Ambari.
Prepare the repositories and upgrade the cluster management service.
The Apache Ambari upgrade starts with the package repository definition, on all machines of the Cluster, goes through the Ambari Agent, also on all machines, and ends at the Ambari Server, only on the machine where it is installed.
- Creating or updating the local package repository for upgrades with restricted or no internet access.
- Checking the upgrade prerequisites.
Scenarios
- 1 · Point to the repository
- 2 · Ambari Agent
- 3 · Ambari Server
- 4 · Verify
Define the new Apache Ambari package repository, public or local, on all machines.
Before upgrading Apache Ambari, a new package repository must be defined for it. The procedure applies to all machines of the Cluster and uses the Ambari package repository file (repo file), ambari.repo, in the YUM package manager.
On all machines of the Cluster, in the /etc/yum.repos.d/ directory.
ambari.repo, which defines the repository baseurl and gpgkey URLs.
Go to the repo file directory
The directory that holds the Ambari package repository file.
cd /etc/yum.repos.d/
Download the ambari.repo file
The ambari.repo saved in the local /etc/yum.repos.d/ directory, to be used by the YUM package manager.
The commands below overwrite the /etc/yum.repos.d/ambari.repo file if it already exists in the directory. If needed, first make a backup of the file with the current definitions.
Run the command below to download the ambari.repo file and save it in the local /etc/yum.repos.d/ directory, to be used by the YUM package manager.
wget -O /etc/yum.repos.d/ambari.repo https://repo.tecnisys.com.br/repository/public/tdp/3.0/el-9_x86_64/ambari.repo
curl -o /etc/yum.repos.d/ambari.repo https://repo.tecnisys.com.br/repository/public/tdp/3.0/el-9_x86_64/ambari.repo
ls /etc/yum.repos.d/ambari.repo
It worked when
ambari.repo file is listed in the /etc/yum.repos.d/ directory.$ ls /etc/yum.repos.d/ambari.repo
/etc/yum.repos.d/ambari.repoAdjust the URLs in ambari.repo
The ambari.repo pointing to the repository you use.
In the ambari.repo file, replace the USER and PASS variables, present in the URLs of the baseurl and gpgkey properties, with the username and password registered on the Tecnisys Site .
It worked when
ambari.repo, the USER and PASS variables were replaced by your username and password.In the ambari.repo file, the USER and PASS variables are present in the URLs of the baseurl and gpgkey properties. Because you use a local repository, adjust these URLs. Creating the local repository is described in Creating a Local Package Repository.
It worked when
ambari.repo point to your local repository.Update the yum/dnf cache
The cache with the repository of the new TDP version.
After defining the package repository of the new TDP version, we recommend updating the yum/dnf cache:
yum clean all; yum makecache timer;
yum repolist
It worked when
ambari.repo appears in the repository list.$ yum repolist
repo id repo name
Ambari-TDP Ambari TDP
TDP-3.0-repo-1 TDP-3.0-repo-1
TDP-UTILS-3.0-repo-1 TDP-UTILS-3.0-repo-1
appstream Rocky Linux 9 - AppStream
baseos Rocky Linux 9 - BaseOS
crb Rocky Linux 9 - CRB
epel Extra Packages for Enterprise Linux 9 - x86_64
epel-cisco-openh264 Extra Packages for Enterprise Linux 9 openh264 (From Cisco) - x86_64
extras Rocky Linux 9 - ExtrasStop, upgrade, and start the Ambari Agent on all cluster machines.
With the new package repository defined, you start the Apache Ambari upgrade with the Ambari Agent component.
On all machines of the Cluster.
Communication between the Ambari Agent and the Ambari Server is suspended. The services of the other Cluster components keep running.
Stop the Ambari Agent service
The Ambari Agent stopped on the machine.
ambari-agent stop
ambari-agent status
It worked when
Upgrade the Ambari Agent binaries
The binaries of the new version.
yum upgrade ambari-agent -y
Any customizations of the ambari-agent.ini file can be recovered from the backup file that is generated: ambari-agent.ini.old
rpm -q ambari-agent
It worked when
ambari-agent package is installed in the new Apache Ambari version.$ rpm -q ambari-agent
ambari-agent-3.0.0.4-0.x86_64Start the Ambari Agent service
The Ambari Agent running in the new version.
ambari-agent start
It worked when
$ ambari-agent start
Verifying ambari-agent process status...
Ambari Agent successfully started
Agent PID at: /run/ambari-agent/ambari-agent.pid
Agent out at: /var/log/ambari-agent/ambari-agent.out
Agent log at: /var/log/ambari-agent/ambari-agent.logStop, upgrade the binaries and metadata, and start the Ambari Server.
After upgrading the Ambari Agent on all machines of the Cluster, you upgrade the Ambari Server.
Only on the machine where the Ambari Server is installed.
This operation requires stopping the Ambari Server service.
We recommend making a backup of the Ambari metadata database before starting this operation.
Stop the Ambari Server service
The Ambari Server stopped.
ambari-server stop
ambari-server status
It worked when
Upgrade the Ambari Server binaries
The binaries of the new version.
yum upgrade ambari-server -y
rpm -q ambari-server
It worked when
ambari-server package is installed in the new Apache Ambari version.$ rpm -q ambari-server
ambari-server-3.0.0.4-0.x86_64Upgrade the Ambari Server metadata
The schema and the properties adjusted to the new version.
ambari-server upgrade
This command does the following:
- Adjusts Ambari properties.
- Upgrades the schema of the metadata database.
- Checks for new versions of the TDP stack.
It worked when
ambari-server upgrade command finishes without errors, after adjusting the Ambari properties, upgrading the schema of the metadata database, and checking for new versions of the TDP stack.$ ambari-server upgrade
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.Start the Ambari Server
The Ambari Server running.
ambari-server start
It worked when
$ ambari-server start
Waiting for server start.................
Server started listening on 8080
DB configs consistency check: no errors and warnings were found.
Ambari Server 'start' completed successfully.Check the new Ambari version and the TDP stack version in the web interface.
The Ambari Server is back and you check, in the web interface, the new Ambari version and the new TDP stack version.
Check the Ambari version
The new Ambari version in the web interface.
In the web interface, click the user button, in the upper right corner of the page, and then the About option to see the new Ambari version.
It worked when
Check the TDP stack version
The new stack version in the VERSIONS tab.
In the web interface, click the Stack and Versions option in the side menu and then the VERSIONS tab to see the new TDP stack version.
It worked when
If an alert is displayed in the VERSIONS tab
If the ´Host component out of sync´ alert is displayed in the VERSIONS tab, follow the procedure in Updating the Current Version of the Stack to fix this inconsistency.
When something goes wrong
Troubleshooting
Paste the message or choose the symptom.