Upgrade Ambari Agents
Before proceeding with the Ambari Agent Upgrade on all nodes where Ambari Agents are installed, ensure that you have stopped both the Ambari Server and Agents during the Ambari Server Upgrade. Prior to the upgrade, make sure to back up the file located at /etc/ambari-agent/conf/ambari-agent.ini
.
- Erase Ambari Agent: From the Ambari
agents
node, remove the installed packages before upgrading.
For RHEL:
yum remove ambari-agent -y
For Ubuntu:
apt remove ambari-agent -y
- Update Repository Files: Update ambari.repo (RedHat) or ambari.list (Ubuntu). For repositories, refer Ambari Repositories.
- Install Updated Agents:
If you are upgrading from any Python 2 based ODP version, make sure to perform the below additional steps to install Python 3.11 and its dependencies on all the hosts before proceeding with the next step.
For Ubuntu 20/22:
apt install software-properties-common
add-apt-repository ppa:deadsnakes/ppa
apt update
apt-get install python3.11
curl https://bootstrap.pypa.io/get-pip.py -o get-pip.py
/usr/bin/python3.11 get-pip.py
pip3.11 install distro lxml
For RHEL 8/9:
yum install python3.11 python3.11-pip
pip3.11 install distro lxml
Proceed with the Agent installation.
For RHEL:
yum clean all
yum install ambari-agent -y
For Ubuntu:
apt clean
apt update
apt install ambari-agent -y
- Restore Configuration Files: Backup
/etc/ambari-agent/conf/ambari-agent.ini
and restore/etc/ambari-agent/conf/ambari-agent.ini
- Start Ambari Agents:
Before starting the Ambari server, make sure to set the Python and Python3 alternatives.
sudo update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.11 1
sudo update-alternatives --install /usr/bin/python python /usr/bin/python3.11 1
ambari-agent start
Was this page helpful?