DeployJob - createSoftwareDeployJob_3

DeployJob - createSoftwareDeployJob

Description :

This command creates a basic Software Deploy Job. See a similar command, createSoftwareDeployJob , to create a basic Software Deploy Job.

The argument groupId is the ID of the parent depot group containing the Deploy Job. Use a command like groupNameToId to determine this ID. The group ID used must be a job group, otherwise a group not found error will occur.

The argument objectKey provides the handle to the BLPackage to be deployed. Use the command getDBKeyByTypeStringGroupAndName to get this handle.

The argument modelType provides the type of software to be deployed. The following is a list of software installables that are valid depot objects:

  • AIX_PATCH_INSTALLABLE: AIX patch
  • AIX_PACKAGE_INSTALLABLE: AIX package
  • CUSTOM_SOFTWARE_INSTALLABLE
  • HP_PRODUCT_INSTALLABLE: HP-UX product
  • HP_BUNDLE_INSTALLABLE: HP-UX bundle
  • HP_PATCH_INSTALLABLE: HP-UX patch
  • HOTFIX_WINDOWS_INSTALLABLE: Windows HotFix
  • IIS_HOTFIX_WINDOWS_INSTALLABLE
  • INSTALLSHIELD_WINDOWS_INSTALLABLE: Windows InstallShield Package
  • MSI_WINDOWS_INSTALLABLE: Windows MSI Package
  • RPM_INSTALLABLE: Linux RPM
  • DEBIAN_PACKAGE_INSTALLABLE: Debian Package
  • SERVICEPACK_WINDOWS_INSTALLABLE: Windows Service Pack
  • SOLARIS_PATCH_INSTALLABLE: Solaris patch
  • SOLARIS_PACKAGE_INSTALLABLE: Solaris package
  • SOLARIS_PATCH_CLUSTER_INSTALLABLE

The argument singleUserMode specifies the user mode option and it accepts one of the following values:

  • 0: Use item defined user mode setting
  • 1: Ignore item defined user mode setting
  • 2: Use single-user mode without reboot
  • 3: Reboot into single-user mode
    The singleUserMode argument is valid on UNIX-style systems only. In addition, the argument isSUMEnabled has to be true for it to take effect.

The argument rebootMode specifies the reboot option and it accepts one of the following values:

  • 0 - Use item defined reboot setting
  • 1 - Ignore item defined reboot setting
  • 2 - Use item defined reboot setting and reboot at end of job
  • 3 - Ignore item defined reboot setting and reboot at end of job
  • 4 - Consolidate any "After item deployment" reboots until end of job

The isFollowSymlinks argument lets you specify whether or not you want to follow symlinks.

The argument overrideItemReconfigReboot specifies the reconfigure reboot option for items and it accepts one of the following values:

  • 0 - Use item defined reconfigure setting
  • 1 - Ignore item defined reconfigure setting

Return type : DBKey

Command Input :

Variable Name

Variable Type

Description

deployJobName

String

Name of this Deploy Job.

groupId

Integer

ID of the job group where this job is saved.

objectKey

DBKey

Handle to the software object for this Deploy Job.

modelType

String

The type of software being deployed.

serverName

String

Server where you want to run this job.

isSimulateEnabled

Boolean

True indicates the job should include a Simulate phase, during which a dry run is performed without actually deploying the package.

isCommitEnabled

Boolean

True indicates the job should include a Commit phase, during which the package is actually applied to the target server.

isStagedIndirect

Boolean

True indicates the package is delivered to a server functioning as a repeater. During the Commit phase, the package is actually applied to the target server.

logLevel

Integer

Specifies the level of logging to display for the job (0 - ERROR_ONLY, 1 - ERROR_AND_WARNING, 2 - ALL_INFO)

isResetOnFailure

Boolean

True indicates the job is automatically reset on failure. This argument should be set to true for a basic Deploy Job.

isRollbackAllowed

Boolean

True indicates that rollback files are left on the target for later use.

isRollbackOnFailure

Boolean

True indicates the job should automatically roll back on failure.

isRebootIfRequired

Boolean

True indicates the server should automatically reboot if necessary.

isCopyLockedFilesAfterReboot

Boolean

True indicates that locked files are copied after reboot; false indicates that locked files are treated as errors.

isSingleDeployModeEnabled

Boolean

True indicates the job should run in single deploy mode.

isSUMEnabled

Boolean

True indicates that single user mode is enabled, false otherwise.

singleUserMode

Integer

The setting of the single user mode.

rebootMode

Integer

The reboot options.

isMaxWaitTimeEnabled

Boolean

True indicates the Max. Wait Time in Deploy Queue option is enabled.

maxWaitTime

String

How long a job can wait in the deploy queue before it is declared failed. Expressed in seconds. Default is 30. This variable takes effect only when isMaxWaitTimeEnabled is set to true.

isMaxAgentConnectionTimeEnabled

Boolean

True indicates the Max. Agent Connection Time option is enabled. Default is false.

maxAgentConnectionTime

Integer

The maximum time (in seconds) to try to establish a connection to an agent. This variable takes effect only if isMaxAgentConnectionTimeEnabled is set to true. Default is 60.

isFollowSymlinks

Boolean

True indicates that the Deploy Job should follow symlinks on remote repositories, and copy source files if copying at staging. (To specify copying at staging, set urlTypeName to AGENT_COPY_AT_STAGING in whatever DepotSoftware command you are using to create the software object.) Default is false.

useReconfigRebootAtEndOfJob

Boolean

True if the final reboot on a Solaris system should use a reconfiguration reboot. This value will be ignored unless the reboot option is set >=2. Default is false.

overrideItemReconfigReboot

Integer

This argument indicates whether or not an item based reconfigure reboot on Solaris is allowed. Default is 0 (use item based reconfigure setting). If you set this argument to 1 (ignore item defined reconfigure setting), then the items that request a reconfigure reboot will only do a reboot.

Example

In the following example, a basic Deploy Job includes a Simulate phase, which runs first, followed by a Commit phase. This job specifies a server group as its target.

Script


# 

# script constants 

#logging level 

ERROR_ONLY=0 

ERROR_AND_WARNING=1 

ALL_INFO=2 




JOB_GROUP_NAME=/deploys 

TARGET_SERVER=scavmnode30 

TARGET_GROUP="/east/windows servers" 

DEPLOY_JOB_NAME="deploy base files" 


SOFTWARE_TYPE=HOTFIX_WINDOWS_INSTALLABLE 


SIMULATE=true 

COMMIT=true 

INDIRECT=false 


LOG_LEVEL=$ERROR_AND_WARNING 

EXECUTE_BY_PHASE=true 

RESET_ON_FAILURE=false 

ALLOW_ROLLBACK=true 

ROLLBACK_ON_FAILURE=true 

REBOOT_IF_REQUIRED=true 

COPY_LOCKED_FILES=true 

SINGLE_DEPLOY_MODE=true 

ENABLE_SINGLE_USER_MODE=true 

SINGLE_USER_MODE=3 

REBOOT_MODE=2 

ENABLE_DEPLOY_QUEUE_TIME_OUT=true 

DEPLOY_QUEUE_TIME_OUT=30 

ENABLE_AGENT_CONN_TIME_OUT=true 

AGENT_CONN_TIME_OUT=60 

FOLLOW_SYMLINKS=true 

IS_RECONFIGURE_REBOOT_AT_JOB_LEVEL=true 

ITEM_RECONFIGURE_REBOOT=0 


BASIC_DEPLOY_OPTS="$SIMULATE $COMMIT $INDIRECT" 

ADVANCED_OPTS="$LOG_LEVEL" 

ADVANCED_OPTS="${ADVANCED_OPTS} $RESET_ON_FAILURE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ALLOW_ROLLBACK" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ROLLBACK_ON_FAILURE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $REBOOT_IF_REQUIRED" 

ADVANCED_OPTS="${ADVANCED_OPTS} $COPY_LOCKED_FILES" 

ADVANCED_OPTS="${ADVANCED_OPTS} $SINGLE_DEPLOY_MODE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ENABLE_SINGLE_USER_MODE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $SINGLE_USER_MODE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $REBOOT_MODE" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ENABLE_DEPLOY_QUEUE_TIME_OUT" 

ADVANCED_OPTS="${ADVANCED_OPTS} $DEPLOY_QUEUE_TIME_OUT" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ENABLE_AGENT_CONN_TIME_OUT" 

ADVANCED_OPTS="${ADVANCED_OPTS} $AGENT_CONN_TIME_OUT" 

ADVANCED_OPTS="${ADVANCED_OPTS} $FOLLOW_SYMLINKS" 

ADVANCED_OPTS="${ADVANCED_OPTS} $IS_RECONFIGURE_REBOOT_AT_JOB_LEVEL" 

ADVANCED_OPTS="${ADVANCED_OPTS} $ITEM_RECONFIGURE_REBOOT" 


DEPLOY_OPTS="${BASIC_DEPLOY_OPTS} ${ADVANCED_OPTS}" 


SOFTWARE_KEY=`blcli DepotObject  [getDBKeyByTypeStringGroupAndName|DepotObject - getDBKeyByTypeStringGroupAndName] $SOFTWARE_TYPE /Depot "WindowsXP-KB920683.exe"` 

GROUP_ID=`blcli JobGroup  [groupNameToId|JobGroup - groupNameToId] "${JOB_GROUP_NAME}"` 

DEPLOY_JOB_KEY=`blcli DeployJob  [createSoftwareDeployJob|DeployJob - createSoftwareDeployJob_2] "${DEPLOY_JOB_NAME}" $GROUP_ID $SOFTWARE_KEY $SOFTWARE_TYPE $TARGET_SERVER $DEPLOY_OPTS` 

DEPLOY_JOB_KEY=`blcli Job  [addTargetGroup|Job - addTargetGroup] $DEPLOY_JOB_KEY "${TARGET_GROUP}"` 



Was this page helpful? Yes No Submitting... Thank you

Comments