Administer > Content utilities > IDK commands > ISMTool interface commands

ISMTool interface commands

This section describes the ISMTool commands that interact with SA.

--upload

Upload the ISM contained in the ISMDIR to the software policy specified by
--opswpath
. If you specify a software policy that does not exist, it will be created automatically during the upload process. To specify which SA core to connect to, use either command-line arguments (such as --softwareRepository) or the environment variables listed in ISMTool Variables.

The --upload command prompts for an SA user name and password. Before the upload operation, this user must be granted permission with ismusertool. Also, this user must have write permission on the folder containing the software policy.

--noconfirm

Suppress confirmation prompts, which require a y or n reply. For example, the ISMTool has the following confirmation prompt:

Do you wish to proceed with upload? [y/n]:

If --noconfirm is set, the prompts are suppressed and the ISMTool behaves as if the answer is y. The --noconfirm option affects only the current invocation of the ISMTool.

--opswpath STRING

Specify the path of the software policy that will contain the uploaded ISM. Note that the path always contains forward slashes, even on Windows.

If you specify a software policy that does not exist, it will be created automatically during the upload process. If you specify a folder (a path not terminated by a policy), an error occurs because you cannot upload an ISM into a folder.

The ISMTool supports the construction of cross-platform ISMs. An example of such an ISM is the Network Time Protocol (NTP) daemon, which can be built from source on a variety of platforms. To make uploading of cross-platform ISMs easier, the ISMTool supports variable substitution within the --opswpath STRING. These variables represent the internal settings of the ISM. ISMTool Variables lists the variables recognized by the ISMTool.

ISMTool Variables

Variable

Example

${NAME}

ntp

${VERSION}

4.1.2

${APPRELEASE}

3

${CTLRELEASE}

7

${PLATFORM}

Redhat Linux 7.2

${OSTYPE}

Redhat Linux

${OSVERSION}

7.2

Unix example:

% ismtool --opswpath '/System Utilities/${NAME}/${VERSION}/${PLATFORM}' ntp

Possible expansion:

'/System Utilities/ntp/4.1.2/Redhat Linux 7.2'

Windows example:

% ismtool --opswpath "/System Utilities/${NAME}/${VERSION}/${PLATFORM}" ntp

Possible expansion:

"/System Utilities/ntp/4.1.2/Windows 2000"

--commandCenter HOST[:PORT]

For an upload to a folder, use the Opsware Command Center core component located at HOST[:PORT].

--dataAccessEngine HOST[:PORT]

For the upload, use the SA Data Access Engine located at HOST[:PORT].

--commandEngine HOST[:PORT]

For the upload, use the SA Command Engine located at HOST[:PORT].

--softwareRepository HOST[:PORT]

For the upload, use the SA Software Repository located at HOST[:PORT].

--description TEXT

Provide descriptive text for the ISM. During the upload, this text is copied to the description field on the software policy.

--addParam STRING

Add a parameter named STRING to the ISM. Usually, the commands --paramValue, --paramDesc, and --paramType are also specified. For example:

% ismtool --addParam NTP_SERVER \
	--paramValue 127.0.0.1 \
	--paramType 'String' \
	--paramDesc 'NTP server, default to loopback' ntp

% ismtool --addParam NTP_CONF_TEMPLATE \
	--paramValue /some/path/ntp.conf.template \
	--paramType 'Template' \
	--paramDesc 'Template for the /etc/ntp.conf file' ntp	

--paramValue TEXT

Set the default value for the parameter. The --addParam command must also be specified. If the parameter type is 'String' then the value is the string specified by TEXT. If the parameter type is 'Template' then TEXT is interpreted as a PATH to a configuration template file. The data in the template file is loaded as the default value. If the --paramValue and --paramType are not specified, then the default value is the empty string.

--paramType PARAMTYPE

Set the type of the parameter. The --addParam command must also be specified. The PARAMTYPE must be either 'String' or 'Template'. The default type is 'String'.

--paramDesc TEXT

Set the descriptive text for the parameter. The --addParam command must also be specified. The default value is an empty string.

--removeParam STRING

Remove the parameter named STRING.

--rebootOnInstall BOOL

Tag the application package with the SA package control flag reboot_on_install. If --rebootOnInstall is set to true, then the managed server will be rebooted after the package is installed. If the ISM has multiple application packages, the last package in the list is tagged.

--rebootOnUninstall BOOL

Tag the application package with the SA package control flag reboot_on_uninstall. If --rebootOnUninstall is set to true, then the managed server will be rebooted after the package is uninstalled. If the ISM has multiple application packages, the first package in the list is tagged.

--registerAppScripts BOOL (Windows only)

Register the ISM packaging scripts (installation hooks) with the application package.

By default, ISM packaging scripts are encoded in the application MSI to run at pre-installation, post-installation, pre-uninstallation, and post-uninstallation. When --registerAppScripts is specified, the ISM packaging scripts are instead registered as SA package control scripts during the upload. The package control scripts are registered in the Model Repository and are viewable from theHPE Server Automation Client.

The --registerAppScripts command is required if the ISM packaging scripts contain actions that conflict with the application MSI installation. For example, a conflict could occur if a post-install script contains a call to msiexec.exe. Since the Microsoft Installer does not allow concurrent installs, a script containing a call to msiexec.exe will not complete successfully. By registering the ISM packaging scripts as SA package control scripts, the scripts are called outside of the MSI installation and uninstallation.

--endOnPreIScriptFail BOOL (Windows only)

Register to end subsequent installs with the application package.

If --endOnPreIScriptFail and --registerAppScripts are both set to true, then the installation will abort if the ISM pre-install script returns a non-zero exit code.

--endOnPstIScriptFail BOOL (Windows only)

Register to end subsequent installs with the application package.

If --endOnPstIScriptFail and --registerAppScripts are both set to true, then the installation will abort if the ISM post-install script returns a non-zero exit code.

--endOnPreUScriptFail BOOL (Windows only)

Register to end subsequent uninstalls with the application package.

If --endOnPreUScriptFail and --registerAppScripts are both set to true, then the uninstall will abort if the ISM pre-uninstall script returns a non-zero exit code.

--endOnPstUScriptFail BOOL (Windows only)

Register to end uninstalls with the application package.

If --endOnPstUScriptFail and --registerAppScripts are both set to true, then the uninstall will abort if the ISM post-uninstall script returns a non-zero exit code.

--addPassthruPkg {PathToPkg} --pkgType {PkgType} ISMNAME

Specifies that the package identified by {PathToPkg} should be treated as a passthru package. The supported package type {PkgType} depends on the platform, as shown by Supported Package Types for Passthru Option.

{PathToPkg} can be either a full or relative path to the package, but the package must exist at the time the --addPassthruPkg option is specified. {PathToPkg} cannot specify a package in the current ISM's directory structure. For example, the control package, the application package, or a package in the bar directory cannot be specified as a passthru package.

Note that by default, the upload operation does not add the passthru package (specified by --addPassthruPkg) to the software policy. To add the passthru package, you must specify the --attachPkg option.

If you upload a Solaris passthru package, the response file is not uploaded. You must manually upload the response file.

The following table lists the allowed values of {PkgType} (package type) for each platform.

Supported Package Types for Passthru Option

Platform (OS)

Allowed Value for {Pkgtype}

AIX

lpp
rpm
zip

HP-UX

depot
zip

Linux

rpm
zip

SunOS

rpm
solcluster
solpatch
solpkg
ips
zip

Windows

hotfix
msi
sp
zip

The following example shows how to add a passthru package to an ISM and specify the package for addition to the software policy:

% ismtool --addPassthruPkg /tmp/bos.rte.libs.5.1.0.50.U --pkgType lpp ISMNAME
Inspecting specified package: ...
bos.rte.libs.5.1.0.50.U (lpp)
bos.rte.libs-5.1.0.50 (update fileset)
IY42527 (apar)
Done.
% ismtool --attachPkg bos.rte.libs-5.1.0.50 --attachValue true ISMNAME

--removePassthruPkg {PassthruPkgFileName} ISMNAME

Specify that an already registered passthru package is no longer a passthru package.

ISMTool will do the following:

  1. Delete {PassthruPkgFileName} from the ISMs directory structure.
  2. Record in ism.conf that {PassthruPkgFileName} is no longer a passthru package.
  3. During the next upload and all subsequent uploads, if the package is added to the
    --opswpath software policy, it will be removed.

Note that an ISM remembers all packages that have been removed as a passthru package. If a package was added to the software policy via the SA Client or a previous upload operation, the package will be removed from the policy on the next upload operation.

--attachPkg {PkgName} --attachValue BOOLEAN ISMNAME

Specify whether a package managed by an ISM should be added to the software policy identified by --opswpath.

By default, when control or application packages are built, these types of packages are marked for addition to the software policy. However passthru packages and inner packages are not marked for addition until the --attachPkg option is specified.

{PkgName} is the name of the package as listed by the --showPkgs command. If
--attachValue is true, a package is marked for addition to the softare policy. If
--attachValue is false, a package will be uploaded into the Software Repository but it will not be added to the software policy. If --attachValue is false and the package already resides in the software policy, the package is marked for removal from the policy. A package is added or removed during an --upload operation. The following table lists the package types that can be added to a softare policy.

Package Type Properties

Package type

Can this package type contain scripts?

Can this package type be added to a software policy?

AIX LPP

No

No

AIX Base Fileset

Yes

Yes

AIX Update Fileset

Yes

Yes

AIX APAR

No

Yes

HP-UX Depot

No

No

HP-UX Fileset

Yes

Yes

HP-UX Patch Fileset

No

No

HP-UX Product

No

Yes

HP-UX Patch Product

No

Yes

IPS Package

No

Yes

RPM

Yes

Yes

Solaris Package

No

No

Solaris Package Instance

Yes

Yes

Solaris Patch

Yes

Yes

Solaris Patch Cluster

No

Yes

Windows Hotfix

Yes

Yes

Windows MSI

Yes

Yes

Windows Service Pack

Yes

Yes

Windows ZIP File

Yes

Yes

--orderPkg {PkgName} --orderPos {OrderPos} ISMNAME

Change the install order of attached packages managed by the ISM.

{OrderPos} is an integer that specifies the new install order for the package identified by {PkgName}. {OrderPos} is 1 (not 0) or the first package to be installed. To display the install order, use the ismtool --showOrder command.

The following example shows how to display and change the install order:

% ismtool --showOrder ISMNAME
[1] test-ism-1.0.0-1.rpm
[2] test-1.0.0-1.rpm
[3] bos.rte.libs-5.1.0.50
[4] IY42527
% ismtool --orderPkg IY42527 --orderPos 1 ISMNAME
[1] IY42527
[2] test-ism-1.0.0-1.rpm
[3] test-1.0.0-1.rpm
[4] bos.rte.libs-5.1.0.50

--addPathProp {PathProp} --propValue {PropValue} ISMNAME

Specific a value for a property (meta data) of the software policy.

To display the current values, use the --showPathProps command. The following table lists the allowed values and types for the --addPathProp command.

Allowed values for {PathProp}

{PathProp} Allowed Value

{PropValue} Type

Example

description

TEXT

‘This does something important’

Deprecated:
notes

TEXT

‘And so does this’

Deprecated:
allowservers

BOOLEAN

false

The following example commands show how to set the description property:

% ismtool --addPathProp description --propValue 'This policy does something'
ISMNAME
% ismtool --showPathProps ISMNAME
description: This policy does something

--editPkg {PkgName} --addPkgProp {PkgProp} --propValue {PropValue} ISMNAME

Specify a value for a given package meta data property.

{PkgName} identifies the package to update; it can be any of the package names listed using the --showPkgs command. The following table lists the allowed values for {PkgProp}.

Allowed values for {PkgProp}

{PkgProp} allowed value

Description

{PropValue} type

deprecated

Deprecated status for package

BOOLEAN

description

Description for package

TEXT

endonpreiscriptfail

Remediation ends on pre- install script failure

BOOLEAN

endonpreuscriptfail

Remediation ends on pre- uninstall script failure

BOOLEAN

endonpstiscriptfail

Remediation ends on post-install script failure

BOOLEAN

endonpstuscriptfail

Remediation ends on post- uninstall script failure

BOOLEAN

installflags

Install flags for package

TEXT

notes

Notes for the package

TEXT

rebootoninstall

Package requires a reboot after install

BOOLEAN

rebootonuninstall

Package requires a reboot after uninstall

BOOLEAN

uninstallflags

Uninstall flags for package

TEXT

The endonXXXscriptfail values are set only if a pre/post install/uninstall script has been defined for a package. These scripts reside in the ISMNAME/pad subdirectory.

Note that not all package types support all the {PkgProp} values listed in the preceding table. The supported {PkgProp} values for each package type can be seen by viewing the package property details in the SA Client. In addition, the following table lists {PkgProp} values supported by specific package types.

{PkgProp} Allowed Values by Package Type

{PkgProp} allowed value

Package Type

Description

{PropValue}

upgradeable

RPM

Package is upgradeable

BOOLEAN

productname

Windows MSI

MSI product name

STRING

productversion

Windows MSI

MSI version number

STRING

servicepacklevel

Windows OS Service Pack

Service Pack version number

INTEGER

installdir

Windows ZIP

Installation directory

STRING

postinstallscriptfilename

Windows ZIP

Post install script filename

STRING

postinstallscriptfilenamefail

Windows ZIP

Remediation ends on post install script failure

BOOLEAN

preuninstallscriptfilename

Windows ZIP

Pre uninstall script filename

STRING

preuninstallscriptfilenamefail

Windows ZIP

Remediation ends on pre uninstall script failure

BOOLEAN

The productversion, productname, and servicepacklevel must be set before performing an --upload operation. The productname and productversion cannot be changed after an --upload operation. If you modify the productname or productversion and then perform another --upload operation, the modified values will not be applied.

The following example shows how to specify the description of a package:

% ismtool --editPkg bos.rte.libs.5.1.0.50 --addPkgProp description --propValue 'This is a fileset' ISMNAME