Oracle Enterprise Manager 12c Windows Agent Deployments Made Easy

As of late, I’ve had to do a few Windows OS Agent Deployments. As we all know, if you want to auto deploy to a Windows OS, you need to have CygWin installed (on each target host) first.The alternative, via Silent Install, is illustrated by my good friend Bobby Curtis here. However, for large scale quicker deployments, I came up with an a solution which worked quite well.Assuming you have already download the agent binaries from the OMS server, copy them to a centralized location accessible to all target hosts.In my case, I used \\slave\software\oracle\oem\12.1.0.3.0\agent.
The important thing here is the content of the agent.rsp file. Mine looks like this. I did not keep the ORACLE_HOSTNAME parameter within the response file (agent.rsp).
####################################################################
## copyright (c) 1999, 2012 Oracle. All rights reserved. ##
## ##
## Specify values for the variables listed below to customize ##
## your installation. ##
## ##
## Each variable is associated with a comment. The comment ##
## identifies the variable type. ##
## ##
## Please specify the values in the following format: ##
## ##
## Type Example ##
## String "Sample Value" ##
## Boolean True or False ##
## Number 1000 ##
## StringList {"String value 1","String Value 2"} ##
## ##
## The values that are given as  need to be ##
## specified for a silent installation to be successful. ##
## ##
## ##
## This response file is generated by Oracle Software ##
## Packager. ##
###################################################################

RESPONSEFILE_VERSION=2.2.1.0.0

#-------------------------------------------------------------------------------
#OMS_HOST: OMS host info required to connect to OMS
#EM_UPLOAD_PORT: OMS port info required to connect to OMS
#AGENT_REGISTRATION_PASSWORD: Agent Registration Password needed to
# establish a secure connection to the OMS.
#AGENT_INSTANCE_HOME: Agent instance home is the location of agent state directory.
#AGENT_PORT: Agent port on which the agent process should be started.
#b_startAgent: Agent will not be started after configuration if the value specified is false.
#ORACLE_HOSTNAME: Fully qualified domain name of host where is the agent is deployed.
#s_agentHomeName:Customized Oracle home name for the agent home. Example: s_agentHomeName="agent12gR1"
#-------------------------------------------------------------------------------
OMS_HOST=cruiser.missile.com
EM_UPLOAD_PORT=4899
AGENT_REGISTRATION_PASSWORD=you_havent_changed_the_sysman_password
AGENT_INSTANCE_HOME=D:\oracle\app\product\12.1\agent
AGENT_PORT=3875
b_startAgent=true
s_agentHomeName=agent12c_home1
#-------------------------------------------------------------------------------
#s_agentServiceName: Sets the agent Service Name and this variable can be
# used to overrite the agent service name calculated by the install. This is
# required for only Windows.
# Example:
# s_agentServiceName = "Oracleagent12gAgent" ; default value
# s_agentServiceName = "GridAgent" ; User specified value
#-------------------------------------------------------------------------------
s_agentServiceName="Oracleagent12cAgent"

####################################################################################
#Please Don't change the values of these variables
####################################################################################
#-------------------------------------------------------------------------------
#EM_INSTALL_TYPE: install type
#-------------------------------------------------------------------------------
EM_INSTALL_TYPE="AGENT"

I then created a wrapper install script. Since I was deploying on windows, the script looked like

c:\> view DeployTheAgent.bat \\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.bat AGENT_BASE_DIR=D:\Oracle\app\product\12.1 RESPONSE_FILE=\\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rsp ORACLE_HOSTNAME=%COMPUTERNAME%.%USERDNSDOMAIN%
The linux version of this might look something like
$ cat DeployTheAgent.sh \\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.sh AGENT_BASE_DIR=/u01/app/oracle/product/12.1 RESPONSE_FILE=\\agent.rsp ORACLE_HOSTNAME=hostname.domainname
From here, its a simple as invoking the script from the target host:
c:\>\\slave\software\oracle\oem\12.1.0.3.0\agent\DeployTheAgent.bat
\\slave\software\oracle\oem\12.1.0.3.0\agent\agentDeploy.bat AGENT_BASE_DIR=D:\Oracle\app\product\12.1 RESPONSE_FILE=\\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rsp ORACLE_HOSTNAME=javelin.missile.com
\\slave\software\oracle\oem\12.1.0.3.0\agent
Present working directory:\\slave\software\oracle\oem\12.1.0.3.0\agent
Archive location:\\slave\software\oracle\oem\12.1.0.3.0\agent directory
AGENT_BASE_DIR
AGENT_BASE_DIR
D:\Oracle\app\product\12.1
Agent base directory:D:\Oracle\app\product\12.1
D:\Oracle\app\product\12.1
RESPONSE_FILE
\\slave\software\oracle\oem\12.1.0.3.0\agent\agent.rspORACLE_HOSTNAME
javelin.missile.com
Agent base directory:D:\Oracle\app\product\12.1
OMS Host:
Agent image loc : "\\slave\software\oracle\oem\12.1.0.3.0\agent"
D:\Oracle\app\product\12.1 configonlyfalse
Reading the properties file: "\\slave\software\oracle\oem\12.1.0.3.0\agent"\agentimage.properties
1 file(s) copied.
This is the version 12.1.0.2.0
This is the type core
This is the aru id 233
The installer takes a few minutes and I’d rather not bore you with the contents of the log files. You know what you are doing :)So, for any new target host, simply invoke the DeployAgent.bat or DeployAgent.sh script and relax! Assuming that your paths are correct and, network ports are accessible, the installation should go through without any glitches.

Reference:Oracle Documentation: Installing Oracle Management Agent in Silent Mode
About these ads

6 comments

  1. Anonymous · · Reply

    I found that in order to install on Windows, I needed to use double back slashes in the AGENT.RSP file if going deeper than one directory. Using the example above it would look like this.
    AGENT_INSTANCE_HOME=D:\\oracle\\app\\product\\12.1\\agent

  2. work like a charm .)

  3. Good to hear and thanks for the feedback!

  4. Thanks for sharing your alteration. Glad it was helpful!

  5. Kerry Barney · · Reply

    Thanks for this. This seems alot easier than all the manual entering of prompts in the GUI and is similar to the way it worked in 11.1.

  6. That is correct, even though the mass deployment feature via the GUI is great, it does become a bit cumbersome for Windows based hosts.

    Thanks for the feedback!

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

Musings

Things I see and learn!

Thoughts from James H. Lui

If you Care a Little More, Things Happen. Bees can be dangerous. Always wear protective clothing when approaching or dealing with bees. Do not approach or handle bees without proper instruction and training.

bdt's oracle blog

Sharing experience (by Bertrand Drouvot)

Frits Hoogland Weblog

IT Technology; Oracle, linux, TCP/IP and other stuff I find interesting

Vishal desai's Oracle Blog

Just another WordPress.com weblog

Follow

Get every new post delivered to your Inbox.

Join 167 other followers

%d bloggers like this: