USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is...
Transcript of USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is...
![Page 1: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/1.jpg)
USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE AGENTS TO EM12C
Mike Gangler – Senior Database Specialist / Team LeadSecure-24 - @[email protected]
![Page 2: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/2.jpg)
![Page 3: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/3.jpg)
ABOUT MIKE GANGLER
• Oracle ACE• DBA for over 28 years, working with Oracle since version 4
• Team Lead and Senior Database Specialist at Secure-24• Currently serving on the board of the Southeast Michigan Oracle
Professionals (SEMOP) group• Charter member of the Board of Directors for the International Oracle
Users Group (IOUG) – www.ioug.org
• Follow me on my Blog http://mjgangler.wordpress.com • twitter! @mjgangler
3
![Page 4: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/4.jpg)
ABOUT SECURE-24
4
FOUNDED
HEADQUARTERS
OPERATION CENTERS
DATA CENTERS
Secure-24 was founded in 2001 and
since then has grown to 500+ employees
and has received recognition as one of
Computerworld’s Best Places to Work in IT,
4-years running.
Secure-24 is headquartered in
Southfield, MI Serving customers around the globe,
Secure-24 has two (2) Operation Centers in Michigan, one (1) in
Nevada and one (1) in Hyderabad India.
Secure-24 has three (3) data centers in Michigan,
one (1) in Nevada, plus several global partnerships. We only choose the safest
locations for our data centers.
Secure-24 has 16 years of experience delivering managed IT operations, application hosting and cloud services to enterprises worldwide. We manage SAP, Hyperion, PeopleSoft, JD Edwards, Oracle E-Business Suite and other
mission critical applications across all industries for businesses of every size.
![Page 5: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/5.jpg)
TODAYS DISCUSSION
Learn how Secure-24 is leveraging RPM’s to “automagically” install Oracle Agents to EM12C (Using Puppet). This presentation uses the Linux x86-64 operating system and may not apply to your environment.
Agenda:• Overview• Creating an Oracle Agent for EM12C• Connecting OMS• Puppet Details• Demo • Additional items – Puppet Promoting Databases
5
![Page 6: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/6.jpg)
RPM OVERVIEW
![Page 7: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/7.jpg)
RPM OVERVIEW
• RPM – Uses Tar / Zip type technology to package the software
• Allows for automated installation of new servers to our Monitoring systems
• Uses “Service Now” and database table for new customer information (i.e. type of machine, Customer, etc) – Secure-24 specific
• Future use – Oracle 11G and Oracle 12C RAC software Installation
7
![Page 8: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/8.jpg)
RPM SUPPORTED PLATFORM - (OMS HOST)
#1 – display your supported platforms:[oracle@msp-oempl01 bin]$ emcli get_supported_platforms ç==-----------------------------------------------Version = 12.1.0.5.0Platform = Microsoft Windows x64 (64-bit)
-----------------------------------------------Version = 12.1.0.5.0 Platform = Linux x86-64
-----------------------------------------------Version = 12.1.0.5.0Platform = Linux x86-----------------------------------------------Platforms list displayed successfully.
8
#1Display your supported platforms
![Page 9: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/9.jpg)
RPM CREATING (OMS HOST)
#2 – Generate a RPM for your supported platforms:>> emcli get_agentimage_rpm -destination=/tmp -platform="Linux x86-64" -version="12.1.0.5.0"Platform:Linux x86-64
Destination:/tmp
Exalogic:false
Checking for disk space requirements...
=== Partition Detail ===
Space free : 1 GB
Space required : 1 GB
RPM Creation in progress ...
Check the logs at /u01/app/oracle/oem12c/gc_inst/em/EMGC_OMS1/sysman/emcli/setup/.emcli/get_agentimage_rpm_2016-02-29_23-35-01-PM.log
This operation may take few minutes, please wait ...
….........
•Agent Image copied successfully...
•Creation of RPM started...
•RPM creation successful.
•Agent image to rpm conversion completed successfully
9
#2Generate a RPM
for your supported platforms
![Page 10: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/10.jpg)
RPM CREATING (OMS HOST)
Copy the Agent to target system
#3 - scp oracle-agt-12.1.0.5.0-1.0.x86_64.rpm oracle@target system
10
#3Copy the Agent to
target system.
![Page 11: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/11.jpg)
RPM CREATING TARGET – MANUAL
As RootMake agent directory:>> mkdir /usr/lib/oracle>> chmod oracle:oinstall /usr/lib/oracle
Apply the RPM>> rpm -ivh oracle-agt-12.1.0.5.0-1.0.x86_64.rpmPreparing... ########################################### [100%]
Running the prereq
1:oracle-agt ########################################### [100%]
Agent RPM installation is completed successfully. Now to configure the agent follow the below steps:
1. Edit the properties file: /usr/lib/oracle/agent/agent.properties with the correct values
2. Execute the script /etc/init.d/oracle-agt RESPONSE_FILE=/usr/lib/oracle/agent/agent.properties
11
#1
#2
![Page 12: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/12.jpg)
RPM CONNECTING TO OMS
At this point the agent software is installed but not connected to the OMS.
#1 – Modify /usr/lib/oracle/agent/agent.propertiesChangeOMS_HOSTOMS_PORTAGENT_REGISTRATION_PASSWORDAGENT_USERNAMEAGENT_GROUPAGENT_PORTORACLE_HOSTNAMEORAINVLOC
12
![Page 13: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/13.jpg)
RPM CONNECTING TO OMS – PART 2
Example
OMS_HOST=gridcontrol.companyname.comOMS_PORT=4903AGENT_REGISTRATION_PASSWORD=<Password>AGENT_USERNAME=oracleAGENT_GROUP=oinstallAGENT_PORT=3872ORACLE_HOSTNAME=host_nameOraInvLoc=/u01/app/oraInventory
13
![Page 14: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/14.jpg)
RPM CONNECTING TO OMS – PART 3
Run the following to attach the host machine and agent to the OMS
/etc/init.d/oracle-agt RESPONSE_FILE=/usr/lib/oracle/agent/agent.properties
After this completes, you will have a connected agent to the OMS Host
14
![Page 15: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/15.jpg)
RPM - VERIFY AGENTRun the following to verify Agent is running :
oracle@mycc-hyodl01 bin]$ ./emctl status agent
Oracle Enterprise Manager Cloud Control 12c Release 5
Copyright (c) 1996, 2015 Oracle Corporation. All rights reserved.
---------------------------------------------------------------
Agent Version : 12.1.0.5.0
OMS Version : 12.1.0.5.0
Protocol Version : 12.1.0.1.0
Agent Home : /usr/lib/oracle/agent/agent_inst
Agent Log Directory : /usr/lib/oracle/agent/agent_inst/sysman/log
Agent Binaries : /usr/lib/oracle/agent/core/12.1.0.5.0
Agent Process ID : 3360
Parent Process ID : 3279
Agent URL : https://host-name:3872/emd/main/
Local Agent URL in NAT : https://host-name:3872/emd/main/
Repository URL : https://gridcontrol.companyname.net:4903/empbs/upload
Started at : 2016-02-12 19:48:07
Started by user : oracle
Agent is Running and Ready
15
![Page 16: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/16.jpg)
RPM CONNECTING TO OMS – PART 3
•Once the agent is installed, connected and running – Only the Host and agent will show up on the OMS.
•You will have to promote and add any other targets independently
16
![Page 17: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/17.jpg)
RPM CONNECTING TO OMS – PART 3
•Passing a parameter for the agent directory Is not supported at this time.
•Using the RPM method, the agent gets installed under a directory /usr/lib/oracle and this cannot be amended manually at this time.
•Documented in the MOS note:–EM 12c: Enterprise Manager 12.1.0.2 Cloud Control Agent Deployment with
the RPM Method Does not Allow Passing a Custom Agent Base Directory Location[ID 1531693.1]
17
![Page 18: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/18.jpg)
DEMO OF MANUAL INSTALLATION
![Page 19: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/19.jpg)
19 Secure-24 Confidential – Internal – Copyright © 2015 Secure-24 and/or its affiliates. All rights reserved.
![Page 20: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/20.jpg)
PUPPET OVERVIEW - INFORMATION
![Page 21: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/21.jpg)
PUPPET BENEFITS
•Puppet is an automated program that can perform many operating system commands and operations.
•Puppet gives us the Automatic process that we are trying to achieve.
•We have many machines getting built daily – Puppet allows us to remove manual effort.
21
![Page 22: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/22.jpg)
PUPPET NOTES
•We (DBA)’s provided the prerequisites
•Linux Team created the Oracle Policy for Puppet
•Puppets runs Every hour on all Linux boxes and checks pre-requisites listed next
22
![Page 23: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/23.jpg)
PUPPET - AUTOMATED PROCESS DETAILS
![Page 24: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/24.jpg)
PUPPET PREREQUISITES
•There must not be a Grid control <Machine name> host file entry manually entered into Puppet or it will cause a resource conflict. The “PUPPET_POLICY” module will ensure the correct generation of a host file entry.
•The RPM will do a port check to make sure it can communicate with the OMS.
24
![Page 25: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/25.jpg)
PUPPET PREREQUISITES
• A previously installed agent must NOT be running or present on the system. The module will endeavor to detect the case where an existing agent is installed and running and not proceed. (emwd.pl agent)
• There needs to be a proper /etc/oraInst.loc file to outline where the oraInventory location is. Puppet will check the location of the oraInventory and install the agent as this user.
• Does the Oracle user and oinstall group exist?
25
![Page 26: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/26.jpg)
PUPPET STEPS (HIGH LEVEL)
26
Puppet adds the grid control
name to the machine host file
Checks Host file for current
machine name
Verifies Oracle user an Oinstall
Group
Verifies Port is opened
Copies and runs RPM (sudo as oracle)
Modifies agent.
properties
Runs /etc/init.d/oracle-agt
![Page 27: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/27.jpg)
PUPPET STEPS (HIGH LEVEL) – PART 2
• Puppet will install the RPM and configure the OEM agent to check in to the master.
• The targets will still need to be promoted, but the hosts will show up on the console.
• The agent will be installed in the /usr/lib/oracle directory.
• Puppet will manage the /usr/lib/oracle/agent/agent_inst/sysman/config/emd.propertiesfile to allow us to control all the agents configurations centrally.
27
![Page 28: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/28.jpg)
LESSONS LEARNED
![Page 29: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/29.jpg)
• Puppet can only do 1 OMS version at a time. We had to change our process to only run Puppet on our Production system Linux servers.
• Managing the Host file was critical – many didn't have the correct host machine names, and many were not fully qualified.
• Puppet is mindless. So it will run the Oracle Agent process no matter if you were in the middle of an install (manual or not). It will override any changes you made.
• Still need a process to promote the targets within the agent and host.
29
LESSONS LEARNED
![Page 30: USING RPMS TO “AUTOMAGICALLY” INSTALL ORACLE · PDF fileLearn how Secure-24 is leveraging RPM’s to “automagically” install Oracle ... •Overview •Creating an Oracle Agent](https://reader031.fdocuments.us/reader031/viewer/2022022500/5aa22ad87f8b9aa0108cd61b/html5/thumbnails/30.jpg)
REFERENCES
A huge thanks to the following blogs and websites:
http://www.gokhanatil.com/2012/12/how-to-deploy-oracle-management-agent-using-rpm-file.html
https://martincarstenbach.wordpress.com/2011/11/22/installing-oem-12c-agents-in-rpm-format/
http://gavinsoorma.com/2013/06/installing-the-12c-management-agent-using-the-rpm-method/
http://docs.oracle.com/cd/E25054_01/install.1111/e24089/install_agent_usng_rpm.htm
30