Wednesday, February 18, 2026

CPU patching with golden images

With the CPU patches, it's a all exercise that we all repeat 4 times a year on the systems.
We are patching the different software part of the Peoplesoft. And part of the Peoplesoft is the Oracle database, Java, Tuxedo and Weblogic, if we keep Peopletools apart.

Java is only a tarball to extract onto the target environment to replace the previous JDK home directory. So we won't come back on it, easy one.

The home directory for Database, Tuxedo and Weblogic, on an other way, cannot just be replaced like Java. Can they ? Well... yes, in a way.
And it makes the patching so fast and easy that we do not want to go back and apply all the required patches one by one anymore onto each and every target environments.
How do we do it ? We're using the golden images. Trying it makes you adopt it.

So what is a gold image ? It's nothing but a home directory where you are able to run the installer from, of that software onto the current location environment. Almost the same as when you install the 1st time any of these software, Oracle database server, Tuxedo and Weblogic.
The steps to create a gold image is pretty simple, and the same principle for all of the three that we are talking about :
1. install the software into a new location exactly as you would do it for the first time
2. apply all the patches out of the CPU, as usual
3. create the gold image, this is a dedicated command line
4. deploy and install that gold image everywhere it is needed.

The first 3 steps are done once every quarter, then you have to repeat the 4th step as many time as you have environments. Installing software is much more error proof than installing individual patch, you do not have to rollback any prior patches to install the next one, you install it and it is ready.

If you do have a dozen of system or hundreds, that does not matters anymore, you'll always have to do the same installation, regardless the path folder where you installed it.

We'll go through the main command lines here below to create the gold image and how to deploy it, aka install it.

1. Oracle database

1.1 Create the gold image

The following command line will create a zipfile in the given directory. This zipfile will be the gold image to be deployed elsewhere.

$ORACLE_HOME/runInstaller -silent -createGoldImage -destinationLocation /software/OH_gold_image

1.2 Deploy the gold image

Backup the current dbs and network folders from the target ORACLE_HOME, delete the current ORACLE_HOME directory, then

mkdir -p $ORACLE_HOME
cd $ORACLE_HOME

unzip -oq $GI_ORACLE -d $ORACLE_HOME

./runInstaller -ignorePrereq -waitforcompletion -silent              \
     -responseFile ${ORACLE_HOME}/install/response/db_install.rsp    \
     oracle.install.option=INSTALL_DB_SWONLY                          \
     ORACLE_HOSTNAME=${ORACLE_HOSTNAME}                              \
     UNIX_GROUP_NAME=${inst_group}                                    \
     INVENTORY_LOCATION=${ORA_INVENTORY}                              \
     SELECTED_LANGUAGES=en,en_GB                                      \
     ORACLE_HOME=${ORACLE_HOME}                                      \
     ORACLE_BASE=${ORACLE_BASE}                                      \
     oracle.install.db.InstallEdition=${ORACLE_INSTALL_EDITION}      \
     oracle.install.db.OSDBA_GROUP=${inst_group}                      \
     oracle.install.db.OSBACKUPDBA_GROUP=${inst_group}                \
     oracle.install.db.OSDGDBA_GROUP=${inst_group}                    \
     oracle.install.db.OSKMDBA_GROUP=${inst_group}                    \
     oracle.install.db.OSRACDBA_GROUP=${inst_group}                  \
     SECURITY_UPDATES_VIA_MYORACLESUPPORT=false                      \
     DECLINE_SECURITY_UPDATES=true

Reinstall the dbs and network directory that you have been taken a copy of prior the gold image deployment.

2. Tuxedo

2.1 Create the gold image

A simple tarball from the inside of $TUXEDO_HOME

tar czf * /gold_image/tuxedo_gi.tgz

2.2 Apply the gold image

Remove the TUXEDO_HOME directory, and recreate it, then inside the new created folder TUXEDO_HOME, untar the gold image then

cd $TUXEDO_HOME

export JAVA_HOME=$TUXEDO_HOME/jdk
export PATH=$JAVA_HOME/bin:$PATH
export LD_LIBRARY_PATH=$TUXEDO_HOME/jdk/lib/amd64/jli:$TUXEDO_HOME/jdk/jre/lib/amd64:$LD_LIBRARY_PATH

./runInstaller -silent -clone ORACLE_HOME=$TUXEDO_HOME -defaultHomeName -invPtrLoc $TUXEDO_HOME/oraInst.loc

3. Weblogic

3.1 Create the gold image

sh $WLS_ORACLE_HOME/oracle_common/bin/copyBinary.sh -javaHome $JAVA_HOME \
              -archiveLoc /gold_image/weblogic.jar \
              -sourceOracleHomeLoc ${WLS_ORACLE_HOME}

3.2 Apply the gold image

Remove the current Weblogic home directory, recreate it and

cd $WLS_ORACLE_HOME

tar xzf ${GI_WEBLOGIC}

cd $WLS_ORACLE_HOME/oracle_common/bin

./pasteBinary.sh -archiveLoc $WLS_ORACLE_HOME/installer/weblogic.jar \
               -targetOracleHomeLoc $WLS_ORACLE_HOME \
               -javaHome $JAVA_HOME \
               -invPtrLoc $WLS_ORACLE_HOME/oraInst.loc \
               -ohAlreadyCloned true


No comments: