Wednesday, June 5, 2013

How to install cloud controll 12c agent in silent mode

Installing Oracle Management Agent in Silent Mode


I will use agentDeploy scipt for installing agent. (Installing Using agentDeploy Script).
First we need the management agent software. 

If you are using online mode in OMS( Oracle Management Server) ( you can easily download agent from internet, if you are using offline mode (in this mode you did not enter oracle support id or your oms is not open to internet) you need some additional steps to download management agent software.After downloading management agent software, you need to upload this zip to client which we install agent. Then install in silent mode.


Lets start with emcli command which query OMS repository for agent software . 
Then download example agent software for windwos 64 bit platform and apply this software to OMS reposiyory for future installations. 
Finally install management agent to client machine in silent mode.

  


  • Download agent  software from OMS repository: Download the Management Agent Software onto the OMS Host Using EMCLI



Login successful
[oracle@grid12c bin]$ ./emcli login -username=sysman
Enter password :

Login successful
[oracle@grid12c bin]$ ./emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /u01/app/oracle/Middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.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 = HP-UX Itanium
-----------------------------------------------
Version = 12.1.0.2.0
 Platform = Microsoft Windows (32-bit)
-----------------------------------------------
Platforms list displayed successfully.

Note: If you don't have the software for required platform, you need additional steps for downloading from internet and appliying to OMS. Here we have 3 platforms which are downloaded previously, I will add windows 64 bit software to illustrate.



  • Download agent software from internet: (Acquiring Management Agent Software in Offline Mode)


If you run grid12c server on offline mode, you have to perform additional steps before download the agent install software:




  1. From the Setup menu, select Extensibility, then select Self Update.



2. On the Self Update home page, click Check Updates. A message is displayed that contains the URL to be accessed to download a catalog of all updates.



3. From an Internet-enabled computer, download the catalog file using the aforementioned URL.
Note:
                           Do not unzip the file.



4. Copy the downloaded file to OMS host machine.

5. Navigate to the home/bin directory on OMS and log in to EMCLI, run the command as the install user, for example:

Login successful
[oracle@grid12c bin]$ ./emcli login -username=sysman
Enter password :

Login successful
[oracle@grid12c bin]$ ./emcli sync
Synchronized successfully
[oracle@grid12c bin]$ ./emcli import_update_catalog -omslocal  -file=/home/oracle/p9348486_112000_Generic.zip
Processing catalog for Provisioning Bundle
Processing catalog for Agent Software
Processing catalog for Management Connector
Processing catalog for Plug-in
Processing update: Plug-in - Enterprise Manager for Oracle Virtual Desktop Infrastructure
Processing update: Plug-in - Enterprise Manager for Oracle Virtual Desktop Infrastructure
Processing update: Plug-in - Enterprise Manager for Sun Ray Software
Processing update: Plug-in - Management Plug-in for the Sun ZFS Storage Appliance Family
Processing update: Plug-in - Enterprise Manager for Oracle Tuxedo
Processing update: Plug-in -
                Enterprise Manager for Pillar Axiom

Processing catalog for Middleware Profiles and Gold Images
Processing catalog for Informational
Processing update: Informational - Oracle Audit Vault Plug-in (12.1.0.3) to be Withdrawn
Processing update: Informational - Announcing New and Updated Cloud Management Capabilites for Database, Infrastructure, and Testing
Processing update: Informational - Enterprise Manager Cloud Control 12c Release 2 Plug-in Update 1 (12.1.0.2) now available on OTN
Processing catalog for Extensibility Development Kit
Processing update: Extensibility Development Kit - 'Extensibility Development Kit (EDK) is a standalone tool designed to help development of Enterprise Manager extensions (For example: Plug-ins)'

Operation completed successfully. Self Update catalog has been uploaded to Enterprise Manager. Please use the Self Update Home to view and manage updates.

6. Return to the Self Update home page and do a refresh to see a count of new updates in the Available Updates column. Here you can compare plugin row with section 2 picture. Here it has 28 available updates, at section 2  it was 22. This means repository is refreshed !



7. For Type, select Agent Software, then select Open from the Actions menu. The Agent Software Updates page appears to show the Management Agent software available for different platforms

8. Select an update from the list of available updates. All entries other than the one that matches the platform of the OMS host should show their status asAvailable.

9. Click Download. A message displays with a URL and instructions.



10.  After downloading zip file and uploading to oms server run command:

[oracle@grid12c bin]$ ./emcli import_update -omslocal -file=/home/oracle/p14570373_112000_Generic.zip
Processing update: Agent Software - Agent Software (12.1.0.2.0) for Microsoft Windows x64 (64-bit)
Operation completed successfully. Update has been uploaded to Enterprise Manager. Please use the Self Update Home to manage this update.


11. On grid control self update page, click refresh. And press apply button .



12. After job finishes you can see that agent software is applied



Now we can run the emcli commd again and see that windows 64 bit software is available on OMS repository.

[oracle@grid12c bin]$ ./emcli get_supported_platforms
Getting list of platforms ...
Check the logs at /u01/app/oracle/Middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.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 = HP-UX Itanium
-----------------------------------------------
Version = 12.1.0.2.0
 Platform = Microsoft Windows (32-bit)
-----------------------------------------------
Version = 12.1.0.2.0
 Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------
Platforms list displayed successfully.

Now we can download agent software from OMS repository to any directory on host, for example /tmp.

[oracle@grid12c bin]$ ./emcli get_agentimage -destination=/tmp -platform="Linux x86-64" -version=12.1.0.2.0
Platform:Linux x86-64
Destination:/tmp
 === Partition Detail ===
Space free : 31 GB
Space required : 1 GB
Check the logs at /u01/app/oracle/Middleware/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_2013-06-05_11-30-42-AM.log
Setting property ORACLE_HOME to:/u01/app/oracle/Middleware/oms
calling pulloneoffs with arguments:/u01/app/oracle/Middleware/oms/u01/app/oracle/Middleware/oms/sysman/agent/12.1.0.2.0_AgentCore_226.zip12.1.0.2.0linux_x64
Check this logs for more information: /u01/app/oracle/Middleware/oms/sysman/prov/agentpush/logs
[oracle@grid12c bin]$ ls -l /tmp/*.zip
-rw-r----- 1 oracle oinstall 240091482 Jun  5 11:30 /tmp/12.1.0.2.0_AgentCore_226.zip




  • Installing management agent software to clients: (Install the Management Agent Using the agentDeploy Script)



1. Unzip the file on a stage directory on client that agent will be installed. 

 $ unzip 12.1.0.2.0_AgentCore_226.zip

2. Fill the agent.rsp file as following:

$ cat 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 <Value Required> 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:<String> OMS host info required to connect to OMS
#EM_UPLOAD_PORT:<String> OMS port info required to connect to OMS
#AGENT_REGISTRATION_PASSWORD:<String> Agent Registration Password needed to 
#     establish a secure connection to the OMS.
#AGENT_INSTANCE_HOME:<String> Agent instance home is the location of agent state directory.
#AGENT_PORT:<String> Agent port on which the agent process should be started.
#b_startAgent:<boolean> Agent will not be started after configuration if the value specified is false.
#ORACLE_HOSTNAME:<String> Fully qualified domain name of host where is the agent is deployed.
#s_agentHomeName:<String>Customized Oracle home name for the agent home. Example: s_agentHomeName="agent12gR1"
#-------------------------------------------------------------------------------
OMS_HOST=grid12c.xxx.com
EM_UPLOAD_PORT=4904
AGENT_REGISTRATION_PASSWORD=xxxxxxxx
#AGENT_INSTANCE_HOME=<Value Unspecified>
#AGENT_PORT=3872
b_startAgent=true
ORACLE_HOSTNAME=xxxx.xxx.com
#s_agentHomeName=<Value Unspecified>
#-------------------------------------------------------------------------------
#s_agentServiceName:<String> 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=""

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


3. Execute the following command:

./agentDeploy.sh AGENT_BASE_DIR=/u01/app/agent12c RESPONSE_FILE=/u01/app/agent12c_install/agent.rsp


where agent_base_dir is installation directory of management agent.


4. Run root.sh scipt