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 withindescribeImage
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:- Export the Gold Image with the Export Gold Image command from the source Enterprise Manager Software Library to a staging location.
- Optionally copy the Gold Image to a location accessible by the destination Enterprise Manager agent.
- 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
- First you will need to create the
export_gldimg.prop
file with the following parameters:IMAGE_NAME
: Name of the image needs to be exportedIMAGE_ID
: ID of the image needs to be exportedNote:
IMAGE_NAME
orIMAGE_ID
are mandatoryVERSION_NAME
: Name of the image version needs to be exportedVERSION_ID
: ID of the image version needs to be exportedNote:
If no version details are passed, the version with state as current will be exported.Version_Name
orVersion_ID
are mandatoryDEST_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.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
- Once the
export_gldimg.prop
has been created run thedb_software_maintenance
EM CLI verb with theexportSoftwareImage
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
. - 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.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
- Once the
import_gldimg.prop
has been created run thedb_software_maintenance
EM CLI verb with theimportSoftwareImage
flag. See the following example:
Once completed, the Fleet Maintenance Gold Image has been successfully imported.emcli db_software_maintenance -importSoftwareImage -input_file=”data:<file_path>/import_gldimg.prop”
Export and import a Gold Image with two different version
- 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.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
- Once the
export_apps_1917.prop
has been created run thedb_software_maintenance
EM CLI verb with theexportSoftwareImage
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
. - Create the gold image from the
export_apps_1917.prop
file by running the following command:
This will create the Gold Image with a 19.17 version.emcli db_software_maintenance -importSoftwareImage -input_file="data:/home/oracle/fleet/export_apps_1917.prop"
- 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 exampleIMAGE_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).
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
- 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"