I was privileged to be a speaker at the Rocky Mountain training days #td17 on the topic of “Automagically” Deploying EM12c Agents and Mass promotion of targets once the hosts have been added.
The presentation is attached, but in a nut shell, using EM12C’s RPM generation and using Puppet we are able to push out agents, the moment the machines are built and validated.
The first step is to log into the OMS machine and generate the RPM using EMCLI (After logging into emcli )
> emcli get_supported_platforms <== This will get the information for building the RPM’s
> emcli get_agentimage_rpm -destination=/tmp -platform=”Linux x86-64″ -version=”220.127.116.11.0″
This last command will generate a RPM in the /tmp directory called: “oracle-agt-18.104.22.168.0-1.0.x86_64.rpm” << notice the version # and platform in the name
Now that the RPM is ready, we use Puppet to copy and to install the RPM on new machines.
A few notes about puppet installs with RPMS
- We use a standard location / directory
- Only run if the standard location is NOT in place
- Only run if “emwd.pl” is not in place
- Verifies the correct ownership of the directories
- Uses oraInventory for location
There are 2 steps for the puppet process
- apply RPM – >> rpm -ivh oracle-agt-22.214.171.124.0-1.0.x86_64.rpm
- create agent.properties file – With host name, default password, etc.
- run – /etc/init.d/oracle-agt RESPONSE_FILE=/usr/lib/oracle/agent/agent.properties
- When Step 3 finishes, there should be a new OMS entry for that host and connected to the OMS.
Last step – Just added recently – (Not part of presentation) is to perform a mass promotion of non-host targets like databases, listeners, etc.
Mass Promote code is in GIT Hub – https://github.com/harry2040/OEM12cMassPromote
Thanks again to #td17 for a great conference and the opportunity.