Sunday, January 18, 2015

Applying the latest Plugins to Cloud Control



If we want to play with DBAAS (see note 1549855.1)  we need to have the latest plugins. 

OK so into Cloud Control/Extensibililty/Plugins we go 



We can see there's a later plugin for the database than the one we have *.06 so we need to get 12.1.0.7 

We can see the same for the CLoud Plugin which is at 12.1.0.8 and we need 12.1.0.9 

and the same for the storage management framework. 


We need to deploy on the OMS server first and then roll out the agent side changes. 

OMS Server

Downloading the Plugins 


OK so those plugins are not downloaded so we need to download them before we can deploy them. 
CLick into 

For each plug in listed above, click into Setup/Extensibility/Self Update, then scroll down to Plugins, 

For each plugin listed above, click Download , then Select Immediately

Wait for 5 minutes or so for all the plugins to be downloaded  ( note that the DB plugin alone is 630 MB ... You wonder what they are doing with all that ! ) 

Now we can apply them to the relevant places. 
  Go back to Setup/Extensibility/Plugins and we can see the plugins are now available



Ok now go to Deploy On/Management Server in the buttons above the plugins

Click Add, and select each of the 4 plugins we have just downloaded

Click Next.  Unfortunately we now get a warning that we need the latest virtualization plugin as well
so back to extensibility/selfupdate/plugins we go 

Select the 12.1.0.7 Plugin and Download .  This should only take a short time 
Now go back to the plugins page and 12.1.0.7 virtualization should be available  ( note you will need to repeat this process for Fusion Middleware currently 12.1.0.7 
Once you've done that you eventually get a progress bar checking the prerequisites ! 

]
These failed because we need more swap ( the Azure VM has no swap in it ). 
Step out, add swap,  retry 
if all is well the plugin prereq check should succeed 

Click Next 
On this window decide on your REPO back up strategy ( recommended ) and enter a SYSDBA credential for the repo database 
Click Next. 
you will now see an OMS downtime warning so ensure you know what this means ( no system monitoring while it is down ) 

If all is well and you wish to proceed, Click Deploy 
a final confirmation window opens...

Click OK 

We can step out and watch with emctl status oms -details -sysman_pwd 
Plug-in Name         : Oracle Virtualization
Version              : 12.1.0.7.0
ID                   : oracle.sysman.vt
Content              : Plug-in
Action               : Deployment
Status               : Deploying
Steps Info:
---------------------------------------- ------------------------- ------------------------- ----------
Step                                     Start Time                End Time                  Status
---------------------------------------- ------------------------- ------------------------- ----------
Submit job for deployment                1/18/15 11:54:42 AM EST   1/18/15 11:54:42 AM EST   Success

Initialize                               1/18/15 11:54:44 AM EST   1/18/15 11:54:53 AM EST   Success

Install software                         1/18/15 11:54:53 AM EST   1/18/15 11:54:59 AM EST   Success

Validate plug-in home                    1/18/15 11:55:01 AM EST   1/18/15 11:55:03 AM EST   Success

Perform custom preconfiguration          1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Check mandatory patches                  1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Generate metadata SQL                    1/18/15 11:55:03 AM EST   1/18/15 11:55:03 AM EST   Success

Preconfigure Management Repository       1/18/15 11:55:03 AM EST   1/18/15 11:55:04 AM EST   Success

Preregister DLF                          1/18/15 11:55:04 AM EST   1/18/15 11:55:04 AM EST   Success

Stop management server                   1/18/15 11:55:05 AM EST   N/A                       Running

---------------------------------------- ------------------------- ------------------------- ----------


we can see lots of stuff happening 

After about 90 minutes this clears up and we can log back in again !
Don't forget, though, we still need to roll out the plugins to the environments we want to deploy to or manage from.

In later posts we will look at the differences between all the plugins and the proper usage of all these.


Adding Swap to a Linux VM



Find a device on which you want to put the swap

for our purposes we will put it as a file on the boot device.

[root@ebscloud ~]# mkdir /swap
[root@ebscloud ~]# cd /swap
[root@ebscloud swap]# dd if=/dev/zero of=swapfile1 bs=1048576 count=500
500+0 records in
500+0 records out
524288000 bytes (524 MB) copied, 0.709267 s, 739 MB/s
[root@ebscloud swap]# ls -lrt
total 512000
-rw-r--r-- 1 root root 524288000 Jan 18 11:40 swapfile1
[root@ebscloud swap]#
[root@ebscloud swap]# mkswap ./swapfile1
Setting up swapspace version 1, size = 511996 KiB
no label, UUID=47543a04-0a4b-4b36-a257-2eb5f4aceb7a
[root@ebscloud swap]#
[root@ebscloud swap]# swapon ./swapfile1
[root@ebscloud swap]#

Don't forget to add the entry into fstab to make it persistent at reboot ( left as exercise for reader ! )

( NB :  If you are following the above is slightly incorrect as we need 600 not 500 but the theory is the same ) 

Saturday, January 17, 2015

Downloading And Applying our patches to Cloud Control ( Part 4 - Agent Patches )




OK  so let's log on to CLoud Control and thus to the Site Map


Click into patching and provisioning/patches and updates at the bottom left
This brings us to this window


Enter 20109357  ( we get this patch ID from the 1900943.1 note  it is the master note for this ) 


Once the patch appears in the list, open it, and click on Add to Plan/Add to New 
Pick the Server you want and give the plan a name - such as AGENT_PATCHPLAN_1 above 
then create plan.  Click into the plan and scroll down to Validation, then ANALYZE 




this takes a couple of minutes but 
Click into Review and Deploy on the left, and down on the right click DEPLOY

Now click Submit 
On the page it changes to Deploy in Progress.  Click into Show Details Results 

After about 5 minutes it should show OK and patch completed after stopping and restarting the agent










Downloading And Applying our patches to Cloud Control ( Part 3 - Plugin Patches )



Now we have an uptodate OMS lets get the plugins updated

At the moment this is patch 20188140: enterprise manager for oms plugins 12.1.0.4.

Download the patch to the server using the wget method I showed earlier

This is a big patch approx 400MB so it will take a bit 

unzip it to a patch directory and lets run opatch analyze 

[oracle@ebscloud 20188140]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -analyze -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-17_08-17-50AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/20188140/opatch_oms_2015-01-17_08-17-53AM_analyze.log


WARNING: Sub-patch "19051557" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "19282500" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "19513319" skipped for incompatibility with components installed in the OMS system.
WARNING: Sub-patch "20109340" skipped for incompatibility with components installed in the OMS system.

Configuration Validation: Success


SKIPPED...

Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-17_08-17-50AM_SystemPatch_20188140_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are applicable:

      Oracle Home Name   Sub-patches                                          Log file
      ----------------   -----------                                          --------
    oracle_sysman_xa21      19907892   19907892_ApplyPrereq2015-01-17_08-18-23AM_2.log
  oracle_sysman_emas21      20109345   20109345_ApplyPrereq2015-01-17_08-18-08AM_2.log
    oracle_sysman_db21      20109326   20109326_ApplyPrereq2015-01-17_08-18-18AM_2.log
   oracle_sysman_ssa21      20109312   20109312_ApplyPrereq2015-01-17_08-18-31AM_2.log
  oracle_sysman_emct21      19163444   19163444_ApplyPrereq2015-01-17_08-18-15AM_2.log
    oracle_sysman_vt21      19060193   19060193_ApplyPrereq2015-01-17_08-18-26AM_2.log
   oracle_sysman_mos21      19051548   19051548_ApplyPrereq2015-01-17_08-18-28AM_2.log


The following sub-patches are incompatible with components installed in the OMS system:
19051557,19282500,19513319,20109340



--------------------------------------------------------------------------------
The following warnings have occurred during OPatchauto execution:
1)  Sub-patch "19051557" skipped for incompatibility with components installed in the OMS system.
2)  Sub-patch "19282500" skipped for incompatibility with components installed in the OMS system.
3)  Sub-patch "19513319" skipped for incompatibility with components installed in the OMS system.
4)  Sub-patch "20109340" skipped for incompatibility with components installed in the OMS system.
--------------------------------------------------------------------------------
OPatchauto Session completed with warnings.
Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/20188140/opatch_oms_2015-01-17_08-17-53AM_analyze.log

OPatchauto completed with warnings.
[oracle@ebscloud 20188140]$


so now emctl stop oms 

and run the apply 

[Jan 17, 2015 8:20:27 AM]    Collect Patch Data: In Progress...
[Jan 17, 2015 8:20:33 AM]    Collect Patch Data: Completed.
[Jan 17, 2015 8:20:33 AM]    Collect Target Data: In Progress...
[Jan 17, 2015 8:20:33 AM]    Collect Target Data: Completed.
[Jan 17, 2015 8:20:33 AM]    --------------------------------------------------------------------------------------------------------------------------------------------

                             Enterprise Manager with single primary OMS instance only, not a Multi-OMS environment, and no HA configuration;
                             Primary OMS instance(s):


                            Platform Oracle home:
                             /u01/oracle/oms12104/oms
                             List of Plugin Oracle homes:
                             oracle_sysman_cfw21 : /u01/oracle/oms12104/plugins/oracle.sysman.cfw.oms.plugin_12.1.0.1.0
                             oracle_sysman_db21 : /u01/oracle/oms12104/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0
                             oracle_sysman_xa21 : /u01/oracle/oms12104/plugins/oracle.sysman.xa.oms.plugin_12.1.0.6.0
                             oracle_sysman_emas21 : /u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0
                             oracle_sysman_mos21 : /u01/oracle/oms12104/plugins/oracle.sysman.mos.oms.plugin_12.1.0.6.0
                             oracle_sysman_ssa21 : /u01/oracle/oms12104/plugins/oracle.sysman.ssa.oms.plugin_12.1.0.8.0
                             oracle_sysman_emct21 : /u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0
                             oracle_apps_ebs21 : /u01/oracle/oms12104/plugins/oracle.apps.ebs.oms.plugin_12.1.0.2.0
                             oracle_sysman_vt21 : /u01/oracle/oms12104/plugins/oracle.sysman.vt.oms.plugin_12.1.0.6.0
                             --------------------------------------------------------------------------------------------------------------------------------------------
[Jan 17, 2015 8:20:33 AM]    Validate Configuration: In Progress...
[Jan 17, 2015 8:20:33 AM]    Checking the status of weblogic admin server for OMS instance domain...
[Jan 17, 2015 8:20:34 AM]    State of the weblogic admin server "EMGC_ADMINSERVER" for OMS instance domain is : RUNNING
[Jan 17, 2015 8:20:34 AM]    AdminServer status check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Checking the status of OMS repository...
[Jan 17, 2015 8:20:34 AM]    Status of the OMS repository is : UP
[Jan 17, 2015 8:20:34 AM]    OMS repository status check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Checking whether software library is configured....
[Jan 17, 2015 8:20:34 AM]    Software library is correctly configured.
[Jan 17, 2015 8:20:34 AM]    Checking whether software library is configured....Software library configuration check: [PASSED]
[Jan 17, 2015 8:20:34 AM]    Validate Configuration: Completed.
[Jan 17, 2015 8:20:34 AM]    Running apply prerequisite checks for sub-patch(es) "20109345" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:36 AM]    Sub-patch(es) "20109345" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emas.oms.plugin_12.1.0.6.0"
[Jan 17, 2015 8:20:36 AM]    Running apply prerequisite checks for sub-patch(es) "19163444" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:39 AM]    Sub-patch(es) "19163444" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.emct.oms.plugin_12.1.0.6.0"
[Jan 17, 2015 8:20:39 AM]    Running apply prerequisite checks for sub-patch(es) "20109326" and Oracle Home "/u01/oracle/oms12104/plugins/oracle.sysman.db.oms.plugin_12.1.0.6.0"...
[Jan 17, 2015 8:20:42 AM]    Sub-patch(es) "20109326" are successfully analyzed for Oracle Home "/u01/oracle/oms1

..SKIPPED...

[Jan 17, 2015 8:38:51 AM]    Patching summary:
                             -----------------
                             Binaries of the following sub-patch(es) have been applied successfully:
                             oracle_sysman_xa21:19907892
                             oracle_sysman_emas21:20109345
                             oracle_sysman_db21:20109326
                             oracle_sysman_ssa21:20109312
                             oracle_sysman_emct21:19163444
                             oracle_sysman_vt21:19060193
                             oracle_sysman_mos21:19051548


                             The following sub-patches are incompatible with components installed in the OMS system:
                             19051557,19282500,19513319,20109340

                             Deployment summary:
                             -------------------


So that is ALL OK 

We are patched. 


emctl start oms and we are done. 

Downloading And Applying our patches to Cloud Control ( Part 2 - PSU )



Using the WGET method download and unzip patch 19218456

Unzip it and run the analyze phase, with the credential key file we have created :
[oracle@ebscloud 19218456]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -analyze -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-14_07-18-43AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-14_07-18-45AM_analyze.log



Configuration Validation: Success


Running apply prerequisite checks for sub-patch(es) "19218456" and Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_14_2015_07_18_43/ApplyPrereq2015-01-14_07-19-00AM_2.log
Sub-patch(es) "19218456" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/oms"


Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-14_07-18-43AM_SystemPatch_19218456_1"

Prerequisites analysis summary:
-------------------------------

The following sub-patch(es) are applicable:

  Oracle Home Name   Sub-patches                                          Log file
  ----------------   -----------                                          --------
           oms12c2      19218456   19218456_ApplyPrereq2015-01-14_07-19-00AM_2.log



Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-14_07-18-45AM_analyze.log

OPatchauto succeeded.


So now we have validated our patchset, it is now time to apply it per the notes : 

emctl stop oms

Oracle Enterprise Manager Cloud Control 12c Release 4
Copyright (c) 1996, 2014 Oracle Corporation.  All rights reserved.
Stopping WebTier...
WebTier Successfully Stopped
Stopping Oracle Management Server...
Oracle Management Server Successfully Stopped
Oracle Management Server is Down
[oracle@ebscloud 19218456]$
[oracle@ebscloud 19218456]$ /u01/oracle/oms12104/oms/OPatch/opatchauto apply -property_file /home/oracle/patches/wlsprops.txt
OPatch Automation Tool
Copyright (c) 2014, Oracle Corporation.  All rights reserved.


OPatchauto version : 11.1.0.12.3
OUI version        : 11.1.0.12.0
Running from       : /u01/oracle/oms12104/oms
Log file location  : /u01/oracle/oms12104/oms/cfgtoollogs/opatch/opatch2015-01-17_07-56-03AM_1.log

OPatchauto log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-17_07-56-06AM_deploy.log



Configuration Validation: Success


Running apply prerequisite checks for sub-patch(es) "19218456" and Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_17_2015_07_56_03/ApplyPrereq2015-01-17_07-56-18AM_2.log
Sub-patch(es) "19218456" are successfully analyzed for Oracle Home "/u01/oracle/oms12104/oms"

To continue, OPatchauto will do the following:
[Patch and deploy artifacts]   : Apply sub-patch(es) [ 19218456 ] to Oracle Home "/u01/oracle/oms12104/oms";
                                 Apply RCU artifact with patch "/u01/oracle/oms12104/oms/.patch_storage/19218456_Oct_14_2014_03_22_39/original_patch"


Do you want to proceed? [y|n]
y
User Responded with: Y

Applying sub-patch "19218456" to Oracle Home "/u01/oracle/oms12104/oms"...
Please monitor OPatch log file: /u01/oracle/oms12104/oms/cfgtoollogs/opatch/19218456_Jan_17_2015_07_56_03/apply2015-01-17_07-56-30AM_4.log

Updating repository with RCU reference file "/u01/oracle/oms12104/oms/.patch_storage/19218456_Oct_14_2014_03_22_39/original_patch"

Complete Summary
================


All log file names referenced below can be accessed from the directory "/u01/oracle/oms12104/oms/cfgtoollogs/opatch/2015-01-17_07-56-03AM_SystemPatch_19218456_1"

Patching summary:
-----------------

Binaries of the following sub-patch(es) have been applied successfully:

  Oracle Home Name   Sub-patches                                    Log file
  ----------------   -----------                                    --------
           oms12c2      19218456   19218456_apply2015-01-17_07-56-30AM_4.log

Deployment summary:
-------------------

The following artifact(s) have been successfully deployed:

  Artifacts                                                  Log file
  ---------                                                  --------
        SQL   rcu_applypatch_original_patch_2015-01-17_07-58-05AM.log


Log file location: /u01/oracle/oms12104/oms/cfgtoollogs/opatchauto/19218456/opatch_oms_2015-01-17_07-56-06AM_deploy.log

OPatchauto succeeded.

And there we are.... 12.1.0.4 PSU applied ! 

Now start it up again with emctl start oms ( don't also forget to do emcli sync on your emcli installs ). 




Wednesday, January 14, 2015

Setting up opatchauto credential files



In order to have to avoid setting in passwords every time we do opatchauto we can build a credential file :

[oracle@ebscloud patches]$ /u01/oracle/oms12104/oms/OPatch/wlskeys/createkeys.sh -h $ORACLE_HOME -location .
Please enter weblogic admin server username: weblogic
Please enter weblogic admin server password:
Creating the key file can reduce the security of your system if it is not kept in a secured location after it is created. Creating new key...

Trying to get configuration and key files for the given inputs...
This operation will take some time. Please wait for updates...
User configuration file created: /home/oracle/patches/config
User key file created: /home/oracle/patches/key
'createKeys' succeeded.

Now create the small file needed the property file to point at these, lets call it wlsprops
You need the admin server URL for the first one, you can get this from emctl status oms -details and replace https with t3s 


AdminServerURL=t3s://ebscloud.bcs.com:7103
AdminConfigFile=/home/oracle/patches/config
AdminKeyFile=/home/oracle/patches/key

So this can now be used with our Enterprise Manager patching




Friday, January 9, 2015

Updating to latest opatch

In previous post we showed how to get latest opatch,  now we show how to install it


OPATCH before

[oracle@ebscloud ~]$ /u01/oracle/oms12104/oms/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.10.4
Copyright (c) 2015, Oracle Corporation.  All rights reserved.



OPatch is just unzip the 688 zip file straight over the Oracle Home :

set ORACLE_HOME correctly  and

[oracle@ebscloud patches]$ unzip -d $ORACLE_HOME p6880880_111000_Linux-x86-64.zip
Archive:  p6880880_111000_Linux-x86-64.zip
  inflating: /u01/oracle/oms12104/oms/OPatch/wlskeys/README.txt
replace /u01/oracle/oms12104/oms/OPatch/wlskeys/createkeys.cmd? [y]es, [n]o, [A]ll, [N]one, [r]ename:

just press A and ENTER 

....
  creating: /u01/oracle/oms12104/oms/OPatch/ocm/bin/
  inflating: /u01/oracle/oms12104/oms/OPatch/ocm/bin/emocmrsp
  inflating: /u01/oracle/oms12104/oms/OPatch/opatch.bat
  inflating: /u01/oracle/oms12104/oms/OPatch/operr.bat
  inflating: /u01/oracle/oms12104/oms/OPatch/opatchauto.bat

all done.   

OPATCH after 

[oracle@ebscloud patches]$ /u01/oracle/oms12104/oms/OPatch/opatch lsinventory
Oracle Interim Patch Installer version 11.1.0.12.3
Copyright (c) 2015, Oracle Corporation.  All rights reserved.