+ All Categories
Home > Documents > Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation...

Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation...

Date post: 17-May-2020
Category:
Upload: others
View: 22 times
Download: 0 times
Share this document with a friend
29
Session ID: Prepared by: Using RPMS to Automagically to install Oracle Agents to EM12C Palm B Monday, April 11 12 – 12:30pm 1201 @mjgangler Mike Gangler – Senior Database Specialist Secure-24 - @mjgangler [email protected]
Transcript
Page 1: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Session ID:

Prepared by:

Using RPMS to Automagically to install Oracle Agents to EM12C

Palm B Monday, April 11 12 – 12:30pm

1201

@mjgangler

Mike Gangler – Senior Database Specialist Secure-24 - @mjgangler [email protected]

Page 2: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

About Mike Gangler

•  Oracle ACE with robust database credentials •  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 – www.meetup.com

•  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 and on twitter! @mjgangler

2

Page 3: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

About Secure-24

3

FOUNDED

HEADQUARTERS GLOBAL

OPERATION CENTERS

DATA CENTERS

Secure-24 was founded in 2001 and since then has grown

to 500+ employees and has received

recogniPon as one of Computerworld’s Best Places to Work in IT, 3-

years running.

Secure-24 is headquartered in

Southfield, MI

Serving customers around the globe,

Secure-24 has two (2) OperaPon 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 locaPons for

our data centers.

Secure-24 has 15 years of experience delivering managed IT operaPons, applicaPon hosPng and cloud services to enterprises worldwide. We manage SAP, Hyperion, PeopleSo], JD Edwards, Oracle E-Business Suite and other mission

criPcal applicaPons across all industries for businesses of every size.

Page 4: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Communi'es Educa'on

Join for as low as $150

SELECT Journal Resource Center IOUG Press Webinars & Podcasts IOUG Forum 5 Minute Briefing

Plus, get access to IOUG’s content library, peer-to-peer networking, and more! Corporate options also available!

Page 5: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Oracle Conferences in Detroit Area

Southeast Michigan Oracle Professionals

http://www.meetup.com/SouthEast-Michigan-Oracle-Professionals/

Meet monthly – 2nd Tuesday of the month

Michigan Oracle User Summit November 3, 2016 http://www.mous.us

Page 6: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Great Lakes Oracle Conference

•  2016 Great Lakes Oracle Conference (GLOC)

•  May 18 & 19, 2016 Cleveland Public Auditorium

Cleveland, OH

https://www.neooug.org/gloc/

Page 7: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Todays Discussion

Learn how Secure-24 is leveraging RPM’s to automagically install Oracle Agents to EM12C (Using Puppet). This presentation is using Linux x86-64 operating system and may not apply to your environment. Agenda: Overview Creating an Oracle Agent for EM12C Connecting OMS Puppet Details

7

Page 8: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Overview

Page 9: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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 software Installation (NON-RAC)

9

Page 10: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Creating (OMS Host)

#1 – display your supported platforms: [oracle@msp-oempl01 bin]$ emcli get_supported_platforms ----------------------------------------------- Version = 12.1.0.5.0 Platform = Microsoft Windows x64 (64-bit) ----------------------------------------------- Version = 12.1.0.5.0 Platform = Linux x86-64 ----------------------------------------------- Version = 12.1.0.5.0 Platform = Linux x86 -----------------------------------------------

Platforms list displayed successfully.

10

Page 11: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Creating (OMS Host)

#1 – display your supported platforms: [oracle@msp-oempl01 bin]$ 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

#2 - scp oracle-agt-12.1.0.5.0-1.0.x86_64.rpm oracle@target system

11

Page 12: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Creating Target – Non-Puppet #1 – As Root Make agent directory: >> mkdir /usr/lib/oracle >> chmod oracle:oinstall /usr/lib/oracle #2 – Apply the RPM >> rpm -ivh oracle-agt-12.1.0.5.0-1.0.x86_64.rpm Preparing... ########################################### [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

12

Page 13: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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.properties Change OMS_HOST OMS_PORT AGENT_REGISTRATION_PASSWORD AGENT_USERNAME AGENT_GROUP AGENT_PORT ORACLE_HOSTNAME ORAINVLOC

13

Page 14: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Connecting to OMS – Part 2

At this point the agent software is installed but not connected to the OMS. Example

OMS_HOST=gridcontrol.companyname.com OMS_PORT=4903 AGENT_REGISTRATION_PASSWORD=<Password> AGENT_USERNAME=oracle AGENT_GROUP=oinstall AGENT_PORT=3872 ORACLE_HOSTNAME=host_name OraInvLoc=/u01/app/oraInventory

14

Page 15: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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

15

Page 16: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Verify Agent

Run 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

16

Page 17: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

RPM Connecting to OMS – Part 3

NOTES: 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

• Using the RPM method, the agent gets installed under a directory /usr/lib/oracle and this cannot be amended manually at this time. • It is 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 to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Puppet Overview - Information

Page 19: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Puppet Notes

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 build daily, Puppet allows us to remove manual effort. 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

19

Page 20: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Puppet - Automated Process Details

Page 21: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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. •  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.

•  Oracle user and oinstall group exists

21

Page 22: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Puppet Steps (High Level)

•  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

22

Page 23: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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.properties file to allow us to control all the agents configurations centrally.

23

Page 24: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Lessons Learned

Page 25: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Lessons Learned

NOTES: 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 a install (Manual) or not. It will override any changes you made Still need a process to promote the targets within the agent and host

25

Page 26: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

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

26

Page 27: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Visit Secure-24 in booth #1315!

•  Enter for a chance to win a $5,000 travel gift card!

•  Meet with other S-24 executives and technical resources

•  Discuss your organization’s Cloud Strategy for 2016

•  Learn more about our capabilities with Oracle’s Virtual Compute Appliance

Page 28: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Questions

JDE

[email protected]:h?ps://mjgangler.wordpress.com

@mjgangler

Page 29: Using RPMS to Automagically to install Oracle Agents to EM12C · Allows for automated installation of new servers to our Monitoring systems Uses “Service Now” and database table

Please complete the session evaluation Paper – 1201 Author – Mike Gangler We appreciate your feedback and Insight

You May complete the session evaluation via the mobile app


Recommended