Create Golden Image of your current Grid Infrastructure 12.2 installation

Starting with the release of Grid Infrastructure 12c Release 2, Oracle changed the installation process. Instead of unzipping the downloaded zip files to a staging area, you unzip them to your target Oracle Home location. Afterwards you run the configuration script gridSetup.sh.

This new installer has a lot of improvements like patching the installer itself or installing patchset updates or bundle patches before the actual configuration of the Grid Infrastructure starts.

I want to demonstrate one of these new features – the creation of a Gold Image of an existing Grid Infrastructure installation.

Use Cases

Why should I want to create a Gold Image of my Grid Infrastruction installation? Well for the case you want to install a new system with the same patch level like your reference system. Of course you can still install the base version and patch it to the required level.

But with the new functionality of the installer, you can save time and resources. After creating the Gold Image, you copy it to the target server and unzip it – then you are ready to configure.

Execution

The command to create such a Gold Image is very simple. In the case you run this command without X11 support, you have to add the -silent parameter.

$> ./gridSetup.sh -silent -createGoldImage -destinationLocation /data/goldimage/
Launching Oracle Grid Infrastructure Setup Wizard...

Successfully Setup Software.
Gold Image location: /data/goldimage/grid_home_2017-10-26_05-19-42PM.zip

To reduce the size of the generated zip file, you can exclude files or directories using the -exclFiles parameter. A good candidate for an exclude is the .patch_storage directory – except you want to keep the possibility to rollback the installed patches.

$> ./gridSetup.sh ... -exclFiles /u00/app/grid/product/12.2.0.1/.patch_storage,...

Internally, the installer just execute a zip command.

$> ps -ef | grep "zip"
grid 20837 19789 45 17:22 pts/0 00:00:00 /u00/app/grid/product/12.2.0.1/bin/zip -q -y -g /data/goldimage/grid_home_2017-10-26_05-19-42PM.zip nls/data/lx1000a.nlb nls/data/lx2009a.nlb nls/data/lx201fc.nlb usm/mesg/acfskus.msg rdbms/mesg/udija.msb has/mesg/clsgnth.msb crs/config/config.pl nls/data/lx20147.nlb bin/lsnodes.ouibak.1 ...

Pitfalls

While testing this new feature, I ran into a few issues.

Required space

In my case the Oracle Home directory of the Grid Infrastructure had a total size of 18 GB. To proceed with the creation of the Gold Image, gridSetup.sh expected nearly 40 GB in the destination location.

$> ./gridSetup.sh -silent -createGoldImage -destinationLocation /data/goldimage/
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-32707] The specified destination location (/data/goldimage/) does not have enough free space.
ACTION: Provide a destination location path with at least (39,548) MB of free space.

I am not sure, how the installer calculates this amount of free space, but the final zip file had a size of 5,5 GB.

Original OPatch Version required

When you updated your OPatch version to a higher version, then you are not able to create a Gold Image. The execution will fail with the following errors.

$> ./gridSetup.sh -silent -createGoldImage -destinationLocation /data/goldimage
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-42505] The installer has detected that the Oracle Grid Infrastructure home software at (/u00/app/grid/product/12.2.0.1) is not complete.
CAUSE: Following files are missing:
[/u00/app/grid/product/12.2.0.1/OPatch/opatchdiag, /u00/app/grid/product/12.2.0.1/OPatch/opatchdiag.bat, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/bin/bootstrapping.sh, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/oracle.glcm.opatchauto.database.systemmodel.classpath.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/oracle.glcm.opatchauto.database.utils.classpath.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/com.oracle.glcm.patch.opatchautodb-actions_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/systemmodels/com.oracle.glcm.patch.db-comp-automation_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/systemmodels/com.oracle.glcm.patch.db-comp-productdriver_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/systemmodels/com.oracle.glcm.patch.db-comp-model_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/systemmodels/com.oracle.glcm.patch.db-comp-patch-sdk_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/database/modules/utils/com.oracle.glcm.patch.db-systeminfogenerator_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/com.oracle.glcm.patch.opatchauto-binary_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/com.oracle.glcm.oplancore.core_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/com.oracle.glcm.patch.opatchauto_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/com.oracle.glcm.patch.opatchauto-actions_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/jackson-annotations-2.4.3.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.dependency_1.7.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.gdr-schema_1.7.0.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.comdev_7.7.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.glcm.encryption_2.6.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/jackson-core-2.4.3.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/jackson-module-jaxb-annotations-2.4.3.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.xmldh_3.3.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.oui-common_12.7.0.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.glcm.common-logging_1.5.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/jackson-databind-2.4.3.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.gdr_1.7.0.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.wizard_7.7.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/auto/core/modules/legacyoui/com.oracle.cie.rest_1.7.0.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.oracle.glcm.patch.opatch-common-api-schema_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.oracle.glcm.patch.opatchauto-wallet_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.oracle.glcm.patch.opatch-common-api_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.oracle.glcm.patch.opatch-common-api-interfaces_13.9.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.jcraft, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.jcraft/jsch, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.jcraft/jsch/0.1.53, /u00/app/grid/product/12.2.0.1/OPatch/modules/com.jcraft/jsch/0.1.53/jsch-0.1.53.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/internal/features/apache_commons_cli_lib.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/internal/features/apache_commons_compress_lib.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/features/jsch.lib.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/apache.commons, /u00/app/grid/product/12.2.0.1/OPatch/modules/apache.commons/commons-cli, /u00/app/grid/product/12.2.0.1/OPatch/modules/apache.commons/commons-cli/commons-cli-1.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/modules/apache.commons/commons-compress, /u00/app/grid/product/12.2.0.1/OPatch/modules/apache.commons/commons-compress/commons-compress-1.4.jar, /u00/app/grid/product/12.2.0.1/OPatch/oracle_common/modules/com.oracle.glcm.common-logging_1.5.0.2.jar, /u00/app/grid/product/12.2.0.1/OPatch/jlib/com.oracle.glcm.patch.opatch-common-api_13.9.1.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/jlib/com.oracle.glcm.patch.opatch-common-api-schema_13.9.1.0.jar, /u00/app/grid/product/12.2.0.1/OPatch/jlib/com.oracle.glcm.patch.opatch-common-api-interfaces_13.9.1.0.jar]
ACTION: Ensure that the Oracle Grid Infrastructure home at (/u00/app/grid/product/12.2.0.1) includes the files listed above.

To get rid of these missing files errors, the only solution I found, was to restore the old OPatch version. So, don’t remove or override the initial version – rename it!

Missing log/crs directory

Starting with 12.1.0.2 Oracle writes Clusterware logs to the Diagnostic Dest. This means, that there is no subdirectory log/crs in the Oracle Home directory.

Unfortunately gridSetup.sh will not be continue until this directory exists.

$> ./gridSetup.sh -silent -createGoldImage -destinationLocation /data/goldimage
Launching Oracle Grid Infrastructure Setup Wizard...

[FATAL] [INS-42505] The installer has detected that the Oracle Grid Infrastructure home software at (/u00/app/grid/product/12.2.0.1) is not complete.
CAUSE: Following files are missing:
[/u00/app/grid/product/12.2.0.1/log/crs]
ACTION: Ensure that the Oracle Grid Infrastructure home at (/u00/app/grid/product/12.2.0.1) includes the files listed above.

But this is easy to fix.

$> mkdir $ORACLE_HOME/log/crs

Conclusion

Despite the few issues I encountered, I like the new installer and the creation of a Gold Image for future installations. One big drawback at the moment is, that no documentation exists. The installer itself provides a little help, but it is not really helpful.

Leave a Reply

Your email address will not be published. Required fields are marked *