deployment.xml

The configuration file deployment.xml defines commands to be run after a service package is deployed. The file must be called deployment.xml, and must be included in the service package.

Location

The file must be included at the top level of the service package—it cannot be in a subdirectory. There can only be one file per service package.

Structure

deployment.xml has the following sections:
  • install

  • uninstall

Important:

All values in the deployment.xml file are case-sensitive when the service is deployed on Linux.

Example

<Deployment>
    <install>
        <osTypes>
            <osType name="NTX86" startCmd="setup" timeout="600" successCodes="0,1,2"/>
           <osType name="LINUX86" startCmd="install" timeout="100" successCodes="-1:10"/>
        </osTypes>
    </install>
    <uninstall>
        <osTypes>
            <osType name="NTX86" startCmd="setup -u" timeout="30" successCodes=0/>
            <osType name="LINUX86" startCmd="uninstall" timeout="34" successCodes="0"/>
        </osTypes>
    </uninstall>
</Deployment>

install section

Optional. Use the install section to configure commands to run after the package is uncompressed on a compute host.

osType attributes


Attribute

Description

Default Value

name

Required.

Operating system type name. The name must match the osType indicated in the application profile, Service section.

Default values:
  • NTX86—For a Windows-based environment

  • LINUX86—For a Linux-based environment

None

startCmd

Required.

Command to run after the service package is copied on to a compute host and uncompressed.

Specify a path relative to the service package installation directory.

For example, if your package contained a subdirectory called scripts with the command you want to invoke called myscript, specify:

Windows

.\scripts\myscript

Note:

To run a Windows .bat script, you need to specify a special syntax. For example:

<osType name=NTX86" startCmd="cmd /c cmd /c install.bat" timeout="600" successCodes="0,1,2"/>

Linux

./scripts/myscript

None

timeout

Time that the startCmd is allowed to run before being terminated. Use this attribute to catch a runaway process.

The time is counted from the moment the command specified in StartCmd is called.

600 seconds

successCodes

Return codes that indicate successful execution of the startCmd. Specify integers.

To specify a list of codes, separate with commas. For example,

successCodes=”0,1”
.

To specify a range of codes, separate with a colon. For example, to specify all codes from 0 to 10, enter

successCodes=”0:10”
.

Note that if you specify success codes and the code returned is not amongst the specified successCodes, the system considers that the install startCmd failed and deployment is aborted.

Undefined. All return values indicate success.


uninstall section

Optional. Use the uninstall section to configure commands to run if the startCmd specified in the install section fails, or before the package is removed from a compute host.

osType attributes


Attribute

Description

Default Value

name

Required.

Operating system type name. The name must match the osType indicated in the application profile, service section.

Default values:
  • NTX86—For a Windows-based environment

  • LINUX86—For a Linux-based environment

None

startCmd

Required.

Command to run if the startCmd specified in the install section fails, or before the package is removed from a compute host.

For example, if your package contained a subdirectory called scripts with the command you want to invoke called myscript, specify:

.\scripts\myscript

Linux

./scripts/myscript

None

timeout

Time that the startCmd is allowed to run before being terminated. Use this attribute to catch a runaway process.

The time is counted from the moment the command specified in StartCmd is called.

600 seconds

successCodes

Codes, which when returned, indicate successful execution of the startCmd.

To specify a list of codes, separate with commas. For example,

successCodes="0,1"
.

To specify a range of codes, separate with a colon. For example, to specify all codes from 0 to 10, enter

successCodes="0:10"
.

Note that if you specify success codes and the code returned is not amongst the specified successCodes, the system considers that the uninstall startCmd failed. However, the package is still removed.

Undefined. All return values indicate success.