There comes a time when RES Automation Manager Linux agents need upgrading. A typical example is with the GA release of RES HyperDrive. Now that RES Automation Manager 2012 SR1 has been released, there is a newer Linux agent that isn’t (currently) is the RES HyperDrive appliance.
If you’re like me, you’ll want to upgrade this. The Getting Started with RES Automation Manager Agent for Linux guide will point you in the right direction, but unless you’re a fairly competent Linux administrator you may struggle with certain aspects. For example, to upgrade the RES AM Linux agent all you need to do is:
1. Stop the currently installed RES Automation Manager Agent for Linux by using the command /etc/init.d/resamad stop.
2. Uninstall the RES Automation Manager Agent for Linux.
3. Install the new version of the RES Automation Manager Agent for Linux.
4. Start the new RES Automation Manager Agent for Linux.
So there you have it – simple!
I’ll actually take you through the individual steps to upgrade the Linux agent installed in a RES HyperDrive appliance. These steps are equally applicable to any Linux installation but this will no doubt be a common scenario. As an overview the steps required are:
- Find installed RES Automation Manager Agent for Linux version;
- Uninstall existing RES Automation Manager Agent for Linux;
- Copy new RES Automation Manager Agent for Linux;
- Extract RES Automation Manager Agent for Linux;
- Install RES Automation Manager Agent for Linux;
- Configure RES Automation Manager Agent for Linux;
- Start the RES Automation Manager Agent for Linux.
Connecting
Firstly you’ll need to connect to the RES HyperDrive virtual appliance via SSH (see Remotely Administering RES HyperDrive) or connect to the console session.
Uninstall Existing Version
To uninstall the existing RES Automation Manager Agent for Linux you’ll need to find the currently installed version before you can actually remove it. To find the existing version run:
[code]rpm –qa | grep –i res-am[/code]
This will display the current version. Make a note as you’ll need it in a minute or two! Here’s an example screenshot from the RC2 appliance:
To uninstall the agent run:
[code]rpm –e <res-am-agent-version>[/code]
The <res-am-agent-version> is listed in the first command, for example res-am-agent-6.5-0.102354. If successful the agent service should be stopped and the agent uninstalled.
Note: I have seen multiple agents installed in both the RC2 and GA releases. It looks like an oversight and the 6.4-2 version is not actually installed. If you want to remove both entries then the second rpm –e command may give you an error but it will be removed from the list.
Copy Agent Files
You will need to download the latest Linux agent version from the RES support portal as they’re not included in the management console like the Windows clients. Once you’ve downloaded the tarball, copy it to the RES HyperDrive appliance (see Transferring Files to RES HyperDrive) into the /home/hyperdrive directory.
From your SSH/console session run:
[code]mv /home/hyperdrive/res-am-agent-<version>.tgz /tmp[/code]
This will move the file into the /tmp directory. Note: If you don’t have permissions to do this run the ‘su –‘ command first, enter the root password and try again.
Extracting the Agent Installer
As the RES Automation Manager Agent for Linux is compressed it needs extracting before it can be installed. Change the working directory and extract the archive by running the tar command:
[code]cd /tmp
tar xvzf ./res-am-agent-<version>.tgz[/code]
This expands the files into the /tmp/AIX, /tmp/RedHat and /tmp/Suse directories. As CentOS is based on RedHat 5 we need to install this agent version. Install the new agent version by running:
[code]rpm –i /tmp/RedHat/Release5/x86_64/res-am-agent-<version>.x86_64.rpm[/code]
Configuring the Agent
To connect the RES Automation Manager Agent for Linux, we either need to enable auto discovery or specify a Dispatcher list. If you wish to enable auto discovery you can configure the agent with the following command:
[code]/usr/local/bin/resamad –d m[/code]
If you wish to specify a Dispatcher run this instead:
[code]/usr/local/bin/resamad –dd<Dispatcher>[/code]
For example, if your Dispatcher was called RESAMDISP01 (with an IP address of 192.168.0.100) you could either run
[code]/usr/local/bin/resamad –ddRESAMDISP01[/code]
or
[code]/usr/local/bin/resamad –dd192.168.0.100[/code]
Starting/Stopping the Agent
After the upgrade you’ll probably need to start the agent. To do this you can simply run:
[code]service resamad start[/code]
If you check the RES Automation Manager console you should see your agent online. The version shown below (6.00.111676) is the RES Automation Manager 2012 SR1 Agent for Linux.
If you need to restart the RES Automation Manager Agent for Linux run service resamad stop and then service resamad start. Why there is no service resamad restart command I don’t know! If I wasn’t lazy I’d create the required script but as the appliance is supposed to be “rip and replace” I don’t think I’ll bother 🙂
Phew – hopefully someone finds this useful? Iain