Exporting consistent HP SA content for 3rd-party consumption

Whenever you need to exchange “payload” (that is, content) from one HP Server Automation core to another (lets say, from dev into testing, and testing into prod), HPSA includes a very handy utility to export and import. CBT or also known as DET (DCML Exchange Utility) is found in your HP Server Automation DVD.

In this blog, we will cover how to export a sample content out of HPSA so that it can be imported into another. A great reference to this utility is the SA Content Utilities Guide found with every installation DVD Media.  There is a plethora of options that can be used.

The content to be exported is displayed below in the HPSA Java GUI. It contains Software Policies, Scripts, and ZIP Packages (Sample HP OML Agent):

Configure the RDF filter

It is important to first define an RDF Filter from which the CBT utility can derive the content which should be exported. The sample RDF Filter below is used to export all items within a specific folder, without recursion:

<FolderFilter rdf:ID=”f1″>
<path>/EDC/Customers/GREENBOX/Operations Manager for Linux/9.01/Software</path>
<recursive rdf:resource=”&filter;No” />

Execute CBT Utility

Once your RDF filter is defined, you need to run the CBT command referencing:

  1. Package directory where you wish the contents to be stored on the local file system
  2. Arbitrary CBT flags (for example –clean identifies to empty the package directory before saving in it)
  3. Filter RDF file location
  4. Your CBT Core properties file (where credentials and how to access your core is stored)

The following command then exports the content bound by the RDF filter (note you must define JAVA_HOME environment path):

/opt/opsware/cbt/bin/cbt -e /opt/packages/GREENBOX-OML-LINUX-CLIENT –clean -f /opt/GREENBOX/filters/GREENBOX-OML-LINUX-CLIENT.rdf -cf /opt/dev_core.properties

Personally, I like placing such commands into a bash script so that I can re-use it many times versus remembering every flag/option every time I need to do a CBT.

Once executed, you will be presented with a summary result of what was exported, like this:

(100%) Export completed!  Elapsed Time: 22 seconds.
Saving export data, please wait …done.
The following objects were exported:
Customer: Customer Independent
Customer: Software Repository  Folder: /EDC/Customers/GREENBOX/Operations Manager for Linux/9.01/Software
Script: HP Operations Manager for Linux – OVO Agent One 8.60.501 for Linux Client
Script: HP Operations Manager for Linux- Install Operations Manager Agent for Linux Client
Software Policy: HP Operations Manager for Linux – OneAgent for Linux Client
Software Policy: HP Operations Manager for Linux – Operations Manager Agent for Linux Client
ZIP Archive: OneAgent_Linux-8.60.501.zip
ZIP Archive: linux_x64_ovopa.zip

Your payload will be stored in the package directory specified at cbt execution. In my example above, it would be /opt/GREENBOX/packages/GREENBOX-OML-LINUX-CLIENT.

You can then tar/gzip the package directory for distribution/import onto another core. We’ll cover on another blog how to Import CBT content into HPSA.


Written by

April 13, 2011
Comments 0

Speak Your Mind