X

Proactive insights, news and tips from Oracle WebLogic Server Support. Learn Oracle from Oracle.

Three Easy Steps to a Patched Domain Using ZDT Patching and OPatchAuto

Now that you’ve seen how easy it is to Update WebLogic by rolling
out a new patched OracleHome to your managed servers, let’s go one step further
and see how we can automate the preparation and distribution parts of that
operation as well.

ZDT Patching has integrated with a great new tool in 12.2.1 called
OPatchAuto. OPatchAuto is a single
interface that allows you to apply patches to an OracleHome, distribute the
patched OracleHome to all the nodes you want to update, and start the
OracleHome rollout, in just three steps.

1. The first step is to create a patched OracleHome archive (.jar) based on
combining an OracleHome in your production environment with the desired patch
or patchSetUpdate. This operation will make
a copy of that OracleHome so it will not affect the production
environment. It will then apply the specified
patches to the copy of the OracleHome and create the archive from it. This is the archive that the rollout will use
when the time comes, but first it needs to be copied to all of the targeted
nodes.

The OPatchAuto command for the first step looks like this:

${ORACLE_HOME}/OPatch/auto/core/bin/opatchauto.sh apply /pathTo/PatchHome
-create-image -image-location /pathTo/image.jar –oop –oh /pathTo/OracleHome

PatchHome is a directory or file containing the patch or
patchSetUpdate to apply.

image-location is where to put the resulting image file

-oop means “out-of-place” and tells OPatchAuto to copy the source
OracleHome before applying the patches

2.  The second step is to copy the patched OracleHome archive created in step
one to all of the targeted nodes. One
cool thing about this step is that since OPatchAuto is integrated with ZDT Patching,
you can give OPatchAuto the same target you would use with ZDT Patching, and it
will ask ZDT Patching to calculate the nodes automatically. Here’s an example of what this command might
look like:

${ORACLE_HOME}/OPatch/auto/core/bin/opatchauto.sh apply
-plan wls-push-image -image-location
/pathTo/image.jar -wls-admin-host ${ADMINHOSTNAME}:7001 -wls-target Cluster1 -remote-image-location /pathTo/image.jar
-wallet ${WALLET_DIR}

image-location is the jar file created in the first step

wls-target can be a domain name, cluster name, or list of clusters

Note that if you do not already have a wallet for ssh authorization to the
remote hosts, you may need to configure one using

3.  The last step is using OPatchAuto to invoke the ZDT Patching OracleHome
rollout. You could switch to WLST at
this point and start it as described in the previous post, but OPatchAuto will
monitor the progress of the rollout and give you some helpful feedback as
well. The command to start the rollout
through OPatchAuto looks like this:

${ORACLE_HOME}/OPatch/auto/core/bin/opatchauto.sh apply
-plan wls-zdt-rollout -image-location
/pathTo/image.jar -wls-admin-host ${ADMINHOSTNAME}:7001 -wls-target Cluster1 -backup-home
/pathTo/home-backup -remote-image-location
/pathTo/image.jar -wallet ${WALLET_DIR}

image-location is the jar file created in the first step

backup-home is the location on each remote node to store the
backup of the original OracleHome

image-location and remote-image-location are both specified so
that if a node is encountered that is missing the image, it can be copied
automatically. This is also why the
wallet is specified here again

One more great thing to consider when looking at automating the entire
process is how easy it would be to use these same commands to distribute and
rollout the same patched OracleHome archive to a test environment for
verification. Once verification is
passed, a minor change to the same two commands will push the exact same (verified)
OracleHome archive out to a production environment.

For more information about updating OracleHome with Zero Downtime Patching
and OPatchAuto, view the documentation.

Be the first to comment

Comments ( 0 )
Please enter your name.Please provide a valid email address.Please enter a comment.CAPTCHA challenge response provided was incorrect. Please try again.Captcha
Oracle

Integrated Cloud Applications & Platform Services