Migrating Fleet Maintenance Gold Images between Enterprise Manager Deployments

With Fleet Maintenance you can send updates, software images and their meta data across separate Enterprise Manager installations by migrating the Gold Images between fleet deployments. This use case is especially useful when having two Enterprise Manager installations, one for Development and Production.

You can test patching and software images on the development instance and once satisfied, move all the Software Images and their meta data to the production Enterprise Manager, avoiding having to recreate all the software images again for the production Enterprise Manager. Creating software images from installed homes can be a time-consuming affair.

Note:

When importing a Gold Image from an exported Gold Image from another Enterprise Manager patch, descriptions will appear within describeImage only if Enterprise Manager has patch information available. Patch descriptions are available once an Oracle home with the new patches is provisioned or discovered.

Steps to Migrate Fleet Maintenance Gold Images

Migrating a Fleet Maintenance Gold image, its software images and metadata, can be broken down into 3 main steps:
  1. Export the Gold Image with the Export Gold Image command from the source Enterprise Manager Software Library to a staging location.
  2. Optionally copy the Gold Image to a location accessible by the destination Enterprise Manager agent.
  3. Run Import Gold Image command to import the Gold Image files to the software library in the destination Enterprise Manager. The corresponding meta data written to the fleet bookkeeping tables and views.

Prerequisites for Exporting and Importing Fleet Maintenance Gold Images

Before starting to migrate Gold Images between Enterprise Manager installations, review the following:
  • Make sure that the given origin and destination host are Enterprise Manager visible targets.
  • Make sure that the destination host provided is a managed target within Enterprise Manager .
  • Make sure the given storage location is valid.

Steps to Export and Import Fleet Maintenance Gold Image Fleet files

  1. First you will need to create the export_gldimg.prop file with the following parameters:
    • IMAGE_NAME: Name of the image needs to be exported
    • IMAGE_ID: ID of the image needs to be exported

      Note:

      IMAGE_NAME or IMAGE_ID are mandatory
    • VERSION_NAME: Name of the image version needs to be exported
    • VERSION_ID: ID of the image version needs to be exported

      Note:

      If no version details are passed, the version with state as current will be exported. Version_Name or Version_ID are mandatory
    • DEST_HOST_NAME: Host name where to store the gold image bundle (Required)
    • DEST_HOST_CRED: Host normal credential (Required)
    • GOLD_IMAGE_BUNDLE_LOCATION: Location to store the gold image bundle (Required)
    • GOLD_IMAGE_BUNDLE_NAME: Name of the gold image bundle (Optional)
    • workingDirectory: By default, /tmp is the working directory (Optional)

    Note:

    Destination host name, destination host credential , Image Id or Image Name, Gold Image Bundle Location are mandatory parameters. These parameters are checked at run time and will return an error if they are Empty or Null.
    A sample of the export_gldimg.prop file would look like this:
    IMAGE_ID=8BBCE9315DEB1C27E05388947B0AF101
    IMAGE_NAME=18.3 patched SI Home
    VERSION_ID=8BBCC9E029AF7B18E05388947B0AB627
    DEST_HOST_NAME=example.sample.com
    DEST_HOST_CRED=USER1:SYSMAN
    GOLD_IMAGE_BUNDLE_LOCATION=/scratch/<file_path>/goldimage
    GOLD_IMAGE_BUNDLE_NAME=ExportGoldImage.zip
  2. Once the export_gldimg.prop has been created run the db_software_maintenance EM CLI verb with the exportSoftwareImage flag. See the following example:
    emcli db_software_maintenance -exportSoftwareImage
        -input_file=”data:<file_path>/export_gldimg.prop”

    Note:

    It is recommended that you use short file paths on Windows Fleet Maintenance operations to avoid issues. You can pass a work directory location within the input file with a short file path like: workingDirectory=C:\temp.
    Once completed, the Fleet Maintenance Gold Image has been successfully exported.
  3. To start the import first you will need to create an import_gldimg.prop file with the following parameters:
    • IMAGE_NAME: Gold Image name to be used for the imported image (Required).
    • HOST_NAME: Host name where gold image bundle is stored (Required).
    • HOST_CREDENTIAL: Host normal credential (Required ).
    • GOLD_IMAGE_BUNDLE_NAME: Gold image zip file bundle name (Required).
    • GOLD_IMAGE_BUNDLE_LOCATION: Location of the gold image bundle (Required).
    • IMAGE_DESCRIPTION: Imported Image description (Optional).
    • IMAGE_SWLIB_LOC: Image component location in the Software Library (Required).
    • workingDirectory: By default, /tmp is the working directory, required if path is different (Optional).
    • STORAGE_TYPE_FOR_SWLIB: Storage type for the Software Library (Required).
    • STORAGE_NAME_FOR_SWLIB: Storage name for the Software Library (Required).
    • VERSION_NAME: Imported image version name (Optional).

    Note:

    Gold Image Bundle name, location, host name and credential, storage name, type and location, working directory are mandatory parameters. These parameters are checked at run time and will return an error if they are Empty or Null.
    A sample of the import_gldimg.prop file would look like this:
    IMAGE_NAME=18.3 SI Home import1
    HOST_NAME=example.sample.com
    HOST_CREDENTIAL=USER1:SYSMAN
    GOLD_IMAGE_BUNDLE_LOCATION=/scratch/<file_path>/goldimage183
    GOLD_IMAGE_BUNDLE_NAME=ExportGoldImage183.zip
    IMAGE_DESCRIPTION=Gold Image for 18.3 SI Home - import
    IMAGE_SWLIB_LOC=Database ProvisioningProfiles/<db version>/linux_x64
    workingDirectory=/tmp
    STORAGE_TYPE_FOR_SWLIB=OmsShared
    STORAGE_NAME_FOR_SWLIB=swlib
    VERSION_NAME=18.3 SI home-import1
  4. Once the import_gldimg.prop has been created run the db_software_maintenance EM CLI verb with the importSoftwareImage flag. See the following example:
    emcli db_software_maintenance -importSoftwareImage
        -input_file=”data:<file_path>/import_gldimg.prop”
    Once completed, the Fleet Maintenance Gold Image has been successfully imported.

Export and import a Gold Image with two different version

  1. First you will need to create the export_apps_1917.prop file, this file will be used to export both images with the following parameters:
    • IMAGE_NAME: Name of the image needs to be exported.
    • HOST_NAME: Host name to be exported (Required).
    • HOST_CREDENTIAL: Host normal credential (Required).
    • GOLD_IMAGE_BUNDLE_LOCATION: Location to store the gold image bundle (Required).
    • GOLD_IMAGE_BUNDLE_NAME: Name of the gold image bundle (Required).
    • IMAGE_SWLIB_LOC: Location of the image within the Software Library.
    • workingDirectory: By default, /tmp is the working directory (Optional).
    • STORAGE_TYPE_FOR_SWLIB: Storage type defined in the software library (Required).
    • STORAGE_NAME_FOR_SWLIB: Location in the Software Library (Required).
    • VERSION_NAME: Name of the image version needs to be exported (Required).

    Note:

    Mandatory parameters are labeled as Required, these parameters are checked at run time and will return an error if they are Empty or Null.
    A sample of the export_apps_1917.prop file would look like this:
    IMAGE_NAME=19cDB-Linux-x64-Apps
    HOST_NAME=emcc.marketplace.com
    HOST_CREDENTIAL=ORACLE:SYSMAN
    GOLD_IMAGE_BUNDLE_LOCATION=/home/oracle/Downloads/
    GOLD_IMAGE_BUNDLE_NAME=ExportAPPS_1917.zip
    IMAGE_DESCRIPTION=19c DB Gold Image
    IMAGE_SWLIB_LOC=Fleet Maintenance/
    WORKING_DIRECTORY=/u01/tmp
    STORAGE_TYPE_FOR_SWLIB=OmsShared
    STORAGE_NAME_FOR_SWLIB=default_loc
    VERSION_NAME=v19.17DBRU
  2. Once the export_apps_1917.prop has been created run the db_software_maintenance EM CLI verb with the exportSoftwareImage flag. See the following example:
    emcli db_software_maintenance -exportSoftwareImage
        -input_file=”data:<file_path>/export_apps_1917.prop”

    Note:

    It is recommended that you use short file paths on Windows Fleet Maintenance operations to avoid issues. You can pass a work directory location within the input file with a short file path like: workingDirectory=C:\temp.
    Once completed, the Fleet Maintenance Gold Image has been successfully exported.
  3. Create the gold image from the export_apps_1917.prop file by running the following command:
    emcli db_software_maintenance -importSoftwareImage -input_file="data:/home/oracle/fleet/export_apps_1917.prop"
    
    This will create the Gold Image with a 19.17 version.
  4. To add a 19.18 version into this Gold Image, you will need to additionally pass the 19.18 image ID. Locate the image ID and create a new input file named ExportAPPS_1918.inp with the following parameters:
    • IMAGE_ID: ID of the image needs to be exported.

      Note:

      For this portion of the example IMAGE_ID is mandatory.
    • HOST_NAME: Host name to be exported (Required).
    • HOST_CREDENTIAL: Host normal credential (Required).
    • GOLD_IMAGE_BUNDLE_LOCATION: Location to store the gold image bundle (Required).
    • GOLD_IMAGE_BUNDLE_NAME: Name of the gold image bundle (Required).
    • IMAGE_SWLIB_LOC: Location of the image within the Software Library.
    • workingDirectory: By default, /tmp is the working directory (Optional).
    • STORAGE_TYPE_FOR_SWLIB: Storage type defined in the software library (Required).
    • STORAGE_NAME_FOR_SWLIB: Location in the Software Library (Required).
    • VERSION_NAME: Name of the image version needs to be exported (Required).
    A sample of the ExportAPPS_1918.inp file would look like this:
    IMAGE_ID=FC6A1AA82CB23A62E0532600000AB0CE
    HOST_NAME=emcc.marketplace.com
    HOST_CREDENTIAL=ORACLE:SYSMAN
    GOLD_IMAGE_BUNDLE_LOCATION=/home/oracle/Downloads/
    GOLD_IMAGE_BUNDLE_NAME=ExportAPPS_1918.zip
    IMAGE_SWLIB_LOC=Fleet Maintenance/
    workingDirectory=/u01/tmp
    STORAGE_TYPE_FOR_SWLIB=OmsShared
    STORAGE_NAME_FOR_SWLIB=default_loc
    VERSION_NAME=v19.18DBRU
  5. To add the 19.18 version into the Gold Image run the following command:
    emcli db_software_maintenance -importSoftwareImage -input_file="data:/home/oracle/fleet/ExportAPPS_1918.inp"
At this point the Gold Image will contain both 19.17 and 19.18 versions.