VMware Cloud Community
hypermike
Contributor
Contributor
Jump to solution

Whats the best way to upgrading the agent versions on remote linux or Solar

Whats the best way to upgrading the agent versions on remote linux or Solar systems.

Is there a way once new versions of agent software are downloaded to clients to upgrade
the clients without logging into each one.
Reply
0 Kudos
1 Solution

Accepted Solutions
ama_hyperic
Hot Shot
Hot Shot
Jump to solution

automate, automate, automate.

I would use SSH keys and a quickie shell script to do the work for me.

#!/bin/sh

HOSTS="`cat host_list`"
for host in ${HOSTS}
do
echo "SCP'ing <new agent> to ${host}"
scp -o ConnectTimeout=5 <new agent>.tar.gz hyperic@${host}:/home/hyperic/
echo "Working on ${host}"
ssh -o ConnectTimeout=5 hyperic@${host} '/home/hyperic/<old agent>/hq-agent stop'
ssh -o ConnectTimeout=5 hyperic@${host} 'cd /home/hyperic/ ; tar -zxvf <new agent>.tar.gz'
ssh -o ConnectTimeout=5 hyperic@${host} '/home/hyperic/<new agent>/hq-agent start'

if [ $? -ne 0 ]
then
echo "${host} - agent failed to start"
fi
done

View solution in original post

Reply
0 Kudos
3 Replies
ama_hyperic
Hot Shot
Hot Shot
Jump to solution

automate, automate, automate.

I would use SSH keys and a quickie shell script to do the work for me.

#!/bin/sh

HOSTS="`cat host_list`"
for host in ${HOSTS}
do
echo "SCP'ing <new agent> to ${host}"
scp -o ConnectTimeout=5 <new agent>.tar.gz hyperic@${host}:/home/hyperic/
echo "Working on ${host}"
ssh -o ConnectTimeout=5 hyperic@${host} '/home/hyperic/<old agent>/hq-agent stop'
ssh -o ConnectTimeout=5 hyperic@${host} 'cd /home/hyperic/ ; tar -zxvf <new agent>.tar.gz'
ssh -o ConnectTimeout=5 hyperic@${host} '/home/hyperic/<new agent>/hq-agent start'

if [ $? -ne 0 ]
then
echo "${host} - agent failed to start"
fi
done
Reply
0 Kudos
pcampbel
Contributor
Contributor
Jump to solution

I would add copying the agent.properties file if any modifications have been made.
ama_hyperic
Hot Shot
Hot Shot
Jump to solution

You can also add a .hq directory for whichever user you have running the agent. Adding agent.properties in there propagates the changes across agent upgrades so you dont have to copy it all the time.


SSH Keys short tutorial.
http://rcsg-gsir.imsb-dsgi.nrc-cnrc.gc.ca/documents/internet/node31.html
Reply
0 Kudos