deployment.xml reference
The deployment.xml configuration file applies to service package deployment.
- Commands to be run after a service package is deployed.
- Dependent packages.
- Environment variables accessible to the package.
The file must be called deployment.xml, and must be included in the service package.
Location
The file must be included at the parent level of the service package; it cannot be in a subdirectory. Only one file can be included for each service package.
Structure
- install
- uninstall
- packageDependencies
All values in the file are case-sensitive when the service is deployed on Linux®.
<Deployment packageVersioning="true">
<install>
<osTypes>
<osType name="X86_64" startCmd="install" timeout="100" successCodes="-1:10"/>
</osTypes>
</install>
<uninstall>
<osTypes>
<osType name="X86_64" startCmd="uninstall" timeout="34" successCodes="0"/>
</osTypes>
</uninstall>
<packageDependencies>
<package name="Common"/>
</packageDependencies>
</Deployment>
header section
Optional.| Attribute | Description | Default Value |
|---|---|---|
| packageName | Optional: Name assigned to the service package during deployment. | None |
| packageVersioning | Optional: Manages the .v# extension added to the directory name of a package, enabling the administrator to define deployment directories on a compute host. Valid values are:
You cannot update the packageVersioning flag once the package has been added to the RS. |
true |
install section
Optional. Use theinstall section to
configure commands to run after the package is uncompressed on a compute
host.attributes
| Attribute | Description | Default Value |
|---|---|---|
| name | Required: Operating system type name. Commonly used values:
For a complete list of valid values, refer to $EGO_CONFDIR/ego.shared. |
None |
| startCmd | Required: Command to run after the service package is copied to a compute host
and decompressed. 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: ./scripts/myscript Note: If you specify your own script, be aware that
the script is executed with umask 002. As a result, any directories and files created by the script
are set to the following permissions:
|
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, To specify a range of codes,
separate with a colon. For example, to specify all codes from 0 to 10, enter
If you specify success codes and the code returned is not among the specified successCodes, the system considers the install startCmd failed and deployment is aborted. |
Undefined. All return values indicate success. |
uninstall section
Optional. Use theuninstall 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.attributes
| Attribute | Description | Default Value |
|---|---|---|
| name | Required: Operating system type
name. Commonly used values:
For a complete list of valid values, refer to $EGO_CONFDIR/ego.shared. |
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 When removing a package from a compute host, if you specify the wrong execution user in the startcmd script, the system considers the uninstall startCmd to have failed, but the package is still removed. You must then manually clean up the working directory. |
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,
To specify a
range of codes, separate with a colon. For example, to
specify all codes from 0 to 10, enter
If you specify success codes and the code returned is not among the specified successCodes, the system considers that the uninstall startCmd failed. However, the package is still removed. |
Undefined. All return values indicate success. |
packageDependencies section
Optional. Use thepackageDependencies section to define packages (such as class
libraries) on which the service package depends.package attribute
| Attribute | Description | Default Value |
|---|---|---|
| name | Required: Name of the package that the service package depends on. | None |