hypermike
Contributor
Contributor

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

Jump to solution
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.
0 Kudos
1 Solution

Accepted Solutions
ama_hyperic
Hot Shot
Hot Shot
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

0 Kudos
3 Replies
ama_hyperic
Hot Shot
Hot Shot
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
0 Kudos
pcampbel
Contributor
Contributor
I would add copying the agent.properties file if any modifications have been made.
ama_hyperic
Hot Shot
Hot Shot
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
0 Kudos