Oracle Enterprise Manager Cloud Control 12c Shared Agent Install

This post is mostly a reminder to myself on how to install an EM12c shared agent. I found the documentation somewhat lacking, so I hope this will help someone else attempting to perform a shared agent installation.
With a shared agent installation, a master agent is installed on a shared filesystem such as NFS and a shared agent is "installed" on remote hosts. The remote hosts should have read-only access to the share. The documentation lists the following pre-requisites for the mount options on the remote host.
mount -t nfs -o ro :
For example, run the following command:
mount -t nfs -o ro abc.oracle.com:/scratch/masterAgent /scratch/sharedAgent
Since I use a NAS for serving NFS shares in my environment I replaced the master_agent_host_name with the name of the filer and the exported volume.


The shared agent will have its agent instance located on a local file system which contains configuration and host-specific information.
When deploying an agent on NFS, the default location of the central inventory is based on the inventory pointer location (/etc/oraInst.loc on some Unix based OSes). Normally, this would be a similar shared filesystem. If you plan on making the agent a master agent, then the inventory needs to be moved to a local filesystem as per the installation requirements. It may also be of benefit to create a separate inventory for the EM12c agent on local filesystems regardless of the type of installation. This would make it easier to modify in case of any installation issues without affecting other products.
Agent installation can be done using either the GUI or in silent mode. Here I will demonstrate using silent mode agent installations for master and shared agents.

Install Master Agent using agentDeploy.sh

1. Use EMCLI to login and perform a sync operation
[oracle@bumblebee ~]$ emcli login -username=sysman
Enter password :
Login successful
[oracle@bumblebee ~]$ emcli sync
Synchronized successfully
[oracle@bumblebee ~]$ emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /opt/oracle/.emcli/agent.log
About to access self-update code path to retrieve the platforms list..
Getting Platforms list ...
-----------------------------------------------
Version = 12.1.0.2.0
Platform = Linux x86-64
-----------------------------------------------
Version = 12.1.0.2.0
Platform = IBM AIX on POWER Systems (64-bit)
-----------------------------------------------
Platforms list displayed successfully
2. Get the image for the target platform from the OMS. Target host is AIX in this case. Output has been truncated.
$ emcli get_agentimage -destination=/u02/orastage -platform="IBM AIX on POWER Systems (64-bit)" -version=12.1.0.2.0
Platform:IBM AIX on POWER Systems (64-bit)
Destination:/u02/orastage
=== Partition Detail ===
Space free : 6 GB
Space required : 1 GB
Check the logs at /opt/oracle/.emcli/get_agentimage_2013-07-25_17-25-06-PM.log
Setting property ORACLE_HOME to:/u01/app/oracle/Middleware/oms
calling pulloneoffs with arguments:/u01/app/oracle/Middleware/oms/orasource/Linux/EM/swlib/8/CF6F07082B141DC6E043AD54020A8F7312.1.0.2.0aix
Check this logs for more information: /u01/app/oracle/Middleware/oms/sysman/prov/agentpush/logs
cat /opt/oracle/.emcli/get_agentimage_2013-07-25_17-25-06-PM.log
Platform:IBM AIX on POWER Systems (64-bit)
Version:12.1.0.2.0
Destination:/u02/orastage
Getting Agent Image ...
Getting Platforms list ...


Agent Image Name:12.1.0.2.0_AgentCore_212.zip
Final zip location given by the getFullAgentImage api is:/u02/orastage/12.1.0.2.0_PluginsOneoffs_212.zip
Check this logs for more information: /u01/app/oracle/Middleware/oms/sysman/prov/agentpush/logs
Agent image name:12.1.0.2.0_AgentCore_212.zip
Plugin image name:12.1.0.2.0_PluginsOneoffs_212.zip
Executing command: /u02/orastage/zip /u02/orastage/12.1.0.2.0_AgentCore_212.zip /u02/orastage/12.1.0.2.0_PluginsOneoffs_212.zip -j
adding: 12.1.0.2.0_PluginsOneoffs_212.zip (stored 0%)
Command:/u02/orastage/zip /u02/orastage/12.1.0.2.0_AgentCore_212.zip /u02/orastage/12.1.0.2.0_PluginsOneoffs_212.zip -j completed with status=0
3. Verify that the agent has been extracted to the OMS filesystem
$ ls -ltr /u02/orastage/12.1.0.2.0_AgentCore_212.zip
-rw-r----- 1 oracle dba 340630674 Jul 25 17:25 /u02/orastage/12.1.0.2.0_AgentCore_212.zip
4. Copy the agent image to the target host
$ scp /u02/orastage/12.1.0.2.0_AgentCore_212.zip lab10d:/u02/orastage
The authenticity of host 'lab10d (10.10.92.20)' can't be established.
RSA key fingerprint is 46:4d:62:00:1c:43:d8:2c:ce:71:df:f1:1e:f2:df:70.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added 'lab10d,10.10.92.20' (RSA) to the list of known hosts.
oracle@lab10d's password:
12.1.0.2.0_AgentCore_212.zip 100% 325MB 32.5MB/s 00:10
5. Extract the agent binaries
$ unzip 12.1.0.2.0_AgentCore_212.zip
Archive: 12.1.0.2.0_AgentCore_212.zip
inflating: unzip
inflating: agentDeploy.sh
inflating: agentimage.properties
inflating: agent.rsp
extracting: agentcoreimage.zip
extracting: 12.1.0.2.0_PluginsOneoffs_212.zip

6. Create a response file for the agent (agent.rsp) by supplying values for the below parameters.
NOTE: The agent instance should be place on a local filesystem.
OMS_HOST="bumblebee.example.com"
EM_UPLOAD_PORT="4899"
AGENT_REGISTRATION_PASSWORD="oracle12c"
AGENT_INSTANCE_HOME="/home/oracle/agent12.1.0.2.0/agent_inst"
AGENT_PORT="3872"
b_startAgent=true
#ORACLE_HOSTNAME=lab10.example.com
#s_agentHomeName=>
7. Execute the agentDeploy.sh script and pass the INVENTORY_LOCATION parameter to point to a local filesystem
./agentDeploy.sh AGENT_BASE_DIR=/u02/oracle/agent12cR2 RESPONSE_FILE=/u02/orastage/agent.rsp INVENTORY_LOCATION=/home/oracle/oraInventory
-e Validating the OMS_HOST & EM_UPLOAD_PORT
Executing command : /u02/oracle/agent12cR2/core/12.1.0.2.0/jdk/bin/java -classpath /u02/oracle/agent12cR2/core/12.1.0.2.0/jlib/agentInstaller.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/OraInstaller.jar oracle.sysman.agent.installer.AgentInstaller /u02/oracle/agent12cR2/core/12.1.0.2.0 /u02/orastage /u02/oracle/agent12cR2 -prereq
Validating oms host & port with url: http://bumblebee.example.com:4899/empbs/genwallet
Validating oms host & port with url: https://bumblebee.example.com:4899/empbs/genwallet
Return status:3
Unzipping the agentcoreimage.zip to /u02/oracle/agent12cR2 ....
12.1.0.2.0_PluginsOneoffs_212.zip
Executing command : /u02/orastage/unzip -o /u02/orastage/12.1.0.2.0_PluginsOneoffs_212.zip -d /u02/oracle/agent12cR2
Executing command : /u02/oracle/agent12cR2/core/12.1.0.2.0/jdk/bin/java -d64 -classpath /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/OraInstaller.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/xmlparserv2.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/srvm.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/emCfg.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/jlib/agentInstaller.jar:/u02/oracle/agent12cR2/core/12.1.0.2.0/oui/jlib/share.jar oracle.sysman.agent.installer.AgentInstaller /u02/oracle/agent12cR2/core/12.1.0.2.0 /u02/orastage /u02/oracle/agent12cR2 /home/oracle/agent12.1.0.2.0/agent_inst AGENT_BASE_DIR=/u02/oracle/agent12cR2 AGENT_BASE_DIR=/u02/oracle/agent12cR2 RESPONSE_FILE=/u02/orastage/agent.rsp INVENTORY_LOCATION=/home/oracle/oraInventory
Executing agent install prereqs...
Executing command: /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -prereqchecker -silent -ignoreSysPrereqs -waitForCompletion -prereqlogloc /u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/agentDeploy -entryPoint oracle.sysman.top.agent_Complete -detailedExitCodes PREREQ_CONFIG_LOCATION=/u02/oracle/agent12cR2/core/12.1.0.2.0/prereqs -J-DORACLE_HOSTNAME=lab10d.example.com INVENTORY_LOCATION=/home/oracle/oraInventory -J-DAGENT_PORT=3872 -J-DAGENT_BASE_DIR=/u02/oracle/agent12cR2
Prereq Logs Location:/u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/agentDeploy/prereq.log
Agent install prereqs completed successfully
Cloning the agent home...
Executing command: /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -clone -forceClone -silent -waitForCompletion -nowait ORACLE_HOME=/u02/oracle/agent12cR2/core/12.1.0.2.0 -responseFile /u02/orastage/agent.rsp AGENT_BASE_DIR=/u02/oracle/agent12cR2 AGENT_BASE_DIR=/u02/oracle/agent12cR2 RESPONSE_FILE=/u02/orastage/agent.rsp INVENTORY_LOCATION=/home/oracle/oraInventory -noconfig ORACLE_HOME_NAME=agent12c1 INVENTORY_LOCATION=/home/oracle/oraInventory -force b_noUpgrade=true
Clone Action Logs Location:/home/oracle/oraInventory/logs/cloneActions.log
Cloning of agent home completed successfully
Attaching sbin home...
Executing command: /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -attachHome -waitForCompletion -nowait ORACLE_HOME=/u02/oracle/agent12cR2/sbin ORACLE_HOME_NAME=sbin12c1 INVENTORY_LOCATION=/home/oracle/oraInventory -force
Attach Home Logs Location:/u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/agentDeploy/AttachHome.log
Attach home for sbin home completed successfully.
Updating home dependencies...
Executing command: /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/bin/runInstaller -ignoreSysPrereqs -updateHomeDeps -waitForCompletion HOME_DEPENDENCY_LIST={/u02/oracle/agent12cR2/sbin:/u02/oracle/agent12cR2/core/12.1.0.2.0,} -invPtrLoc /u02/oracle/agent12cR2/core/12.1.0.2.0/oraInst.loc -force
Update Home Dependencies Location:/u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/agentDeploy/UpdateHomeDeps.log
Update home dependency completed successfully.
Performing the agent configuration...
Executing command: /u02/oracle/agent12cR2/core/12.1.0.2.0/oui/bin/runConfig.sh ORACLE_HOME=/u02/oracle/agent12cR2/core/12.1.0.2.0 RESPONSE_FILE=/u02/oracle/agent12cR2/core/12.1.0.2.0/agent.rsp ACTION=configure MODE=perform COMPONENT_XML={oracle.sysman.top.agent.11_1_0_1_0.xml} RERUN=true
Configuration Log Location:/u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/cfgfw/CfmLogger.log
Agent Configuration completed successfully
The following configuration scripts need to be executed as the "root" user.
#!/bin/sh
#Root script to run
/u02/oracle/agent12cR2/core/12.1.0.2.0/root.sh
To execute the configuration scripts:
1. Open a terminal window
2. Log in as "root"
3. Run the scripts
Agent Deployment Successful.
Agent deployment log location:
/u02/oracle/agent12cR2/core/12.1.0.2.0/cfgtoollogs/agentDeploy/agentDeploy_2013-07-26_00-45-05-AM.log
Agent deployment completed successfully.
8. Execute root.sh script

Perform Shared Agent Installation on remote server using AgentNFS.pl

9. Create agent response file
cat /home/oracle/AgentNFS.rsp
ORACLE_HOME=/u02/oracle/agent12cR2/core/12.1.0.2.0
AGENT_PORT=3872
AGENT_INSTANCE_HOME=/home/oracle/agent12.1.0.2.0/agent_inst
b_startAgent=TRUE
AGENT_REGISTRATION_PASSWORD=oracle12c
10. Execute the AgentNFS.pl script from the target host and pass the location of the inventory by specifying the INVENTORY_LOCATION parameter
/u02/oracle/agent12cR2/core/12.1.0.2.0/perl/bin/perl /u02/oracle/agent12cR2/core/12.1.0.2.0/sysman/install/AgentNFS.pl -responseFile /home/oracle/AgentNFS.rsp INVENTORY_LOCATION=/home/oracle/oraInventory
Checking whether Agent Instance Home already exists
Checking whether Agent Instance Home directory has write permission
Creating the Agent Instance Home directory : /home/oracle/agent12.1.0.2.0/agent_inst
mkdir /home/oracle/agent12.1.0.2.0
mkdir /home/oracle/agent12.1.0.2.0/agent_inst
mkdir /home/oracle/agent12.1.0.2.0/agent_inst/nfslog
Attaching the composite home to local inventory
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-26_12-58-26AM. Please wait ...The inventory pointer is located at /u02/oracle/agent12cR2/core/12.1.0.2.0/oraInst.loc
The inventory is located at /home/oracle/oraInventory
'AttachHome' was successful.
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-26_12-59-06AM. Please wait ...The inventory pointer is located at /u02/oracle/agent12cR2/core/12.1.0.2.0/oraInst.loc
The inventory is located at /home/oracle/oraInventory
'AttachHome' was successful.
Starting Oracle Universal Installer...
Checking swap space: must be greater than 500 MB. Actual 8192 MB Passed
Preparing to launch Oracle Universal Installer from /tmp/OraInstall2013-07-26_12-59-42AM. Please wait ...The inventory pointer is located at /u02/oracle/agent12cR2/core/12.1.0.2.0/oraInst.loc
The inventory is located at /home/oracle/oraInventory
'UpdateHomeDeps' was successful.
Configuring the Agent Instance Home
Copying install related scripts
Generating root.sh
Completed the Shared Agent Installation
NOTE: Post install steps to follow :
Please execute /home/oracle/agent12.1.0.2.0/agent_inst/root.sh script as root
11. Execute the root.sh script
$ /home/oracle/agent12.1.0.2.0/agent_inst/root.sh
/etc exist
12. Verify that the agents are up and communicating with the OMS
$AGENT_INSTANCE/bin/emctl status agent
That's all there is to it. You can add any number of shared agents to the master agent as long as they are on the same operating system.

Comments

  1. Leihgton,
    Thanks for posting your install notes.
    Couple of quick questions. In the begining you refer to the NFS mounted share as "/scratch/sharedAgent" but I'm having difficulty tracing where you refernece this later.
    In step 7 when you execute agentDeploy.sh, this host has rw access to the NFS share, mounted in the path /u02 somewhere, correct?
    And in step 10 when you execute AgentNFS.pl, this host now has the NFS share mounted as /u02/* (ro of course), correct? Or am I missing something??
    Thanks.

    --
    john

    ReplyDelete
  2. How do you manage the plugins for the master and shared agent?
    In my experience, plugin deployment wants to update the inventory and if the inventory file is scattered for all hosts, it becomes inconsistent.

    ReplyDelete

Post a Comment

Popular posts from this blog

Viewing ASM trace files and alert logs in Unix/Linux

ORA-00020: maximum number of processes (%s) exceeded

Troubleshooting RAC Public Network Failure