Created 08-09-2016 11:09 AM
Hi Guys,
We are using 24 node cluster.
We have upgraded my Ambari-server and ambari agent in main server. How can i sync up the ambari agent in all other nodes.
Can someone please help us?
Created 08-09-2016 11:09 AM
You would need to upgrade the Ambari agent in other nodes as well. Check below link for details (point #7):
Once agents are upgraded and started, they would sync up with Ambari server. All agents should be at same version as Ambari server
-Vivek
Created 08-09-2016 11:09 AM
You would need to upgrade the Ambari agent in other nodes as well. Check below link for details (point #7):
Once agents are upgraded and started, they would sync up with Ambari server. All agents should be at same version as Ambari server
-Vivek
Created 08-09-2016 12:35 PM
On all host you need to do -
1. ambari-agent stop
2. #yum upgrade ambari-agent
3. ambari-agent restart
Thats sit.
Created 08-09-2016 12:40 PM
@Vivek,
If it is single digit nodes we can update the agent manually.
For example: If it is 500 Node cluster, is there any way to sync up the updated agent in all the nodes at a time?
Created 08-09-2016 02:57 PM
1. Just put the hostname/ipaddress in a file say - '/tmp/nodes'
2. use below command to run -
for i in `cat /tmp/nodes`; do ssh $i 'yum upgrade -y ambari-agent; /etc/init.d/ambari-agent restart'; done
-- [You might need to enter password if there is no passwordless ssh configured]
Created 08-09-2016 12:59 PM
@Narasimha Gunturu - In such cases, it is good to write a script to upgrade the agents across all nodes
For example:
key="/tmp/ambari-keypair" for i in {1..5} ; do ssh -i $key -o StrictHostKeyChecking=no root@host-$i.mydomain ambari-agent stop ; done repourl="http://public-repo-1.hortonworks.com/ambari/centos6/2.x/updates/2.2.2.0/ambari.repo" for i in {1..5} ; do ssh -i $key root@host-$i.mydomain wget -nv $repourl -O /etc/yum.repos.d/ambari.repo; done for i in {1..5} ; do ssh -i $key root@host-$i.mydomain yum upgrade -y ambari-agent ; done for i in {1..5} ; do ssh -i $key root@host-$i.mydomain ambari-agent start ; done
Here host-1.mydomain to host-5.mydomain are the five agent nodes and 'key' variable holds the ssh key to connect to those nodes from a central server (could be the Ambari server host)