9 Replies Latest reply on Jan 28, 2015 10:12 AM by Mohammed Ali Khan

    custom software deploy job

      Hi,

       

      I am having trouble using a deploy job (with blpackage which in turns contains a custom software object). What I am trying to do:

       

      1) Custom Software Object: Create a custom software object under depot by soft-linking to a zip file on a windows server (which has BLAgent installed).

       

      2) BLPackage: Create a blpackage by adding the custom software object created in (1) to the blpackage.

       

      3) DeployJob: Create and execute a deployjob which deploys the blpackage (custom software's .zip file) to a windows target server.

       

      The reason I am using a 'blpackage' is because later on we want to utilize the blpackage as a 'checklist' by adding additional tasks to it for deploy time.

       

      I am using BL8.3

      I have looked in to the BLCLI8.3 documentation and have gained a rudimentary understanding of the custom software object and I am much of an expert on blpackage so likely I am making a mistake in the way I set it all up.

       

      I would greatly appreciate if anybody can shed some light on the error and can recommend/provide a solution.

       

      NSH SCRIPT:

       

       

      blcred cred -acquire -profile defaultProfile -i /E/xxxxxx/scripts/user_admin.dat

      blcli_setoption serviceProfileName defaultProfile

      blcli_setoption roleName BLAdmins

      blcli_connect

       

      blcli_execute DepotSoftware addCustomSoftwareToDepotByGroupName "/Test/mo" "Windows" "Custom Software" "//xyz/c/test/aFile.zip" "moTestCustomSoftware" "desc" "" "" "" ""

      blcli_storeenv customSoftwareDBKey

       

      blcli_execute DepotGroup groupNameToId "/Test/mo"

      blcli_storeenv depotGroupID

       

      blcli_execute BlPackage createPackageFromDepotObject "moTestCustomSoftware" ${depotGroupID} true false false false false ${customSoftwareDBKey} 97

      blcli_storeenv blpackagedbkey

       

      blcli_execute JobGroup groupNameToId "/TESTJOBS/mo"

      blcli_storeenv jobGroupID

       

      blcli_execute DeployJob createDeployJob "moTestCustomSoftwareDeploy1" ${jobGroupID} ${blpackagedbkey} "xyz" true true false

      blcli_storeenv deployJobDBKey

       

      blcli_execute DeployJob executeJobAndWait ${deployJobDBKey}

      blcli_storeenv deployJobRunKey

       

       

      BSA JOB LOG:

       

      Job NameRun at Sep 29, 2014 10:43:20 AM
      Start Time29-Sep 2014 10:43:20 AM
      End Time29-Sep 2014 10:44:13 AM
      StatusCompleted with Errors
      ParticipantStepAttemptDateTypeMessage
      run level logSep 29 2014 10:43:20 AMInfoStarted running the job 'moTestCustomSoftwareDeploy1' with priority 'NORMAL' on application server 'app1_job1'(2,002,200)
      run level logSep 29 2014 10:43:24 AMInfoExecuting work item Deploy Dry Run Job (Pre-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  on application server: app1_job2
      run level logSep 29 2014 10:43:42 AMInfoExecuting work item Deploy Dry Run Job (Post-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  on application server: app1_job2
      run level logSep 29 2014 10:43:46 AMInfoExecuting work item Deploy Staging Job:moTestCustomSoftwareDeploy1; Server:xyz;  on application server: app1_job2
      run level logSep 29 2014 10:43:51 AMInfoExecuting work item Deploy Apply Job (Pre-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  on application server: app1_job2
      run level logSep 29 2014 10:44:11 AMInfoExecuting work item Deploy Apply Job (Post-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  on application server: app1_job2
      run level logSep 29 2014 10:44:13 AMErrorThe job 'moTestCustomSoftwareDeploy1' has failed
      xyzSimulate1Sep 29 2014 10:43:24 AMInfoDeploy Dry Run Job (Pre-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  PkgID:"17269f17-2c25-4bc5-987a-86b1b6e3f916-2118735.1"; UUID:6e500e24f2cc3c41961c55cd31a025fe
      xyzSimulate1Sep 29 2014 10:43:24 AMInfoStarted running the deploy step job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' on application server 'app1_job2'(2,002,300) against target server 'xyz'
      xyzSimulate1Sep 29 2014 10:43:27 AMInfoDeployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.
      xyzSimulate1Sep 29 2014 10:43:30 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe started
      xyzSimulate1Sep 29 2014 10:43:36 AMInfoMetabase initialization failed: 0x80040154
      xyzSimulate1Sep 29 2014 10:43:36 AMInfoBldeploy 6e500e24f2cc3c41961c55cd31a025fe started using file C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml with rollback directory C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe
      xyzSimulate1Sep 29 2014 10:43:36 AMInfoStarting dryRun
      xyzSimulate1Sep 29 2014 10:43:36 AMInfoDryrun succeeded
      xyzSimulate1Sep 29 2014 10:43:38 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe initialized, entering wait queue for processing
      xyzSimulate1Sep 29 2014 10:43:38 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe processing instructions
      xyzSimulate1Sep 29 2014 10:43:38 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe completed. exitCode = 0 (DryRun successful)
      xyzSimulate1Sep 29 2014 10:43:42 AMInfoThe job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' has succeeded on server xyz
      xyzStage1Sep 29 2014 10:43:46 AMInfoDeploy Staging Job:moTestCustomSoftwareDeploy1; Server:xyz;  PkgID:"17269f17-2c25-4bc5-987a-86b1b6e3f916-2118735.1"; UUID:6e500e24f2cc3c41961c55cd31a025fe
      xyzStage1Sep 29 2014 10:43:46 AMInfoStarted running the deploy step job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' on application server 'app1_job2'(2,002,300) against target server 'xyz'
      xyzStage1Sep 29 2014 10:43:46 AMInfoChecking size of '//bsaistfsrv.bna/e/FileServer/blpackages/17269f17-2c25-4bc5-987a-86b1b6e3f916'
      xyzStage1Sep 29 2014 10:43:46 AMInfoChecking size of '//bsaistfsrv.bna/e/FileServer/installables/2015438.1/aFile.zip'
      xyzStage1Sep 29 2014 10:43:47 AMInfoPackage on server bsaistfsrv.bna is 1480 bytes in size.
      xyzStage1Sep 29 2014 10:43:47 AMInfoStaging directory on server xyz has 8286752768 bytes available.
      xyzStage1Sep 29 2014 10:43:47 AMInfoThe job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' has succeeded on server xyz
      xyzCommit1Sep 29 2014 10:43:51 AMInfoDeploy Apply Job (Pre-Execute):moTestCustomSoftwareDeploy1; Server:xyz;  PkgID:"17269f17-2c25-4bc5-987a-86b1b6e3f916-2118735.1"; UUID:6e500e24f2cc3c41961c55cd31a025fe
      xyzCommit1Sep 29 2014 10:43:51 AMInfoStarted running the deploy step job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' on application server 'app1_job2'(2,002,300) against target server 'xyz'
      xyzCommit1Sep 29 2014 10:43:53 AMWarningUnrecognized option: -UnregAllCOM
      xyzCommit1Sep 29 2014 10:43:53 AMInfoDeployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.
      xyzCommit1Sep 29 2014 10:43:57 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe started
      xyzCommit1Sep 29 2014 10:44:03 AMInfoMetabase initialization failed: 0x80040154
      xyzCommit1Sep 29 2014 10:44:03 AMInfoBldeploy 6e500e24f2cc3c41961c55cd31a025fe started using file C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml with rollback directory C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe
      xyzCommit1Sep 29 2014 10:44:03 AMInfoStarting apply
      xyzCommit1Sep 29 2014 10:44:03 AMInfo Processing asset BLPACKAGE
      xyzCommit1Sep 29 2014 10:44:03 AMInfo Processing asset CUSTOMSOFTWARE
      xyzCommit1Sep 29 2014 10:44:03 AMInfo Executing command: "sh -c "if test -f /usr/bin/unzip;then UNZIP=/usr/bin/unzip; else UNZIP=unzip;fi; \$UNZIP -oq '2015438.1\aFile.zip' -d '2015438.1'" "2015438.1\aFile" (add install flags here)"
      xyzCommit1Sep 29 2014 10:44:03 AMInfo" [stdout: 1]  C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>chcp 1252  1>NUL     C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>sh -c ""if test -f /usr/bin/unzip;then UNZIP=/usr/bin/unzip; else UNZIP=unzip;fi; \$UNZIP -oq '2015438.1\aFile.zip' -d '2015438.1'""     C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>""2015438.1\aFile"" (add install flags here)   "
      xyzCommit1Sep 29 2014 10:44:03 AMWarning" [stderr: 1]'sh' is not recognized as an internal or external command,  operable program or batch file.  '2015438.1\aFile""' is not recognized as an internal or external command"  operable program or batch file. 

      "

      xyz,Commit,1,Sep 29 2014 10:44:03 AM,Error, Command returned non-zero exit code: 1

       

       

      xyz,Commit,1,Sep 29 2014 10:44:03 AM,Error, Apply failed: id = 1

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Info,Starting undo

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Info, Processing asset BLPACKAGE

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Info,Undo succeeded

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Warning,Deploy failed. Cleaning up staging area.

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Warning,Deploy failed. Cleaning up staging area.

       

       

      xyz,Commit,1,Sep 29 2014 10:44:04 AM,Info,Package 6e500e24f2cc3c41961c55cd31a025fe initialized" entering wait queue for processing"
      xyzCommit1Sep 29 2014 10:44:04 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe processing instructions
      xyzCommit1Sep 29 2014 10:44:04 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe auto-rollback on failure started
      xyzCommit1Sep 29 2014 10:44:07 AMInfoPackage 6e500e24f2cc3c41961c55cd31a025fe completed. exitCode = -4001 (Apply failed; auto-rollback successful)
      xyzCommit1Sep 29 2014 10:44:11 AMErrorAPPLY failed for server xyz. Exit code = -4001
      xyzCommit1Sep 29 2014 10:44:11 AMInfoThe job 'moTestCustomSoftwareDeploy1->moTestCustomSoftwareDeploy1' has failed on server xyz

       

       

      RSCD agent's transaction log:

       

      09/29/14 10:43:27.172 INFO     bldeploy - Bldeploy started for package: 6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:27.187 DEBUG    bldeploy - Bldeploy Arguments:

      09/29/14 10:43:27.187 DEBUG    bldeploy - C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe

      09/29/14 10:43:27.187 DEBUG    bldeploy - 6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:27.187 DEBUG    bldeploy - -N=/temp/stage/6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:27.187 DEBUG    bldeploy - -P=xyz

      09/29/14 10:43:27.187 DEBUG    bldeploy - -Q=params.txt

      09/29/14 10:43:27.187 DEBUG    bldeploy - -DryRun

      09/29/14 10:43:27.187 DEBUG    bldeploy - -Xr

      09/29/14 10:43:27.187 DEBUG    bldeploy - -V2

      09/29/14 10:43:27.187 DEBUG    bldeploy - -js0

      09/29/14 10:43:27.187 DEBUG    bldeploy - -jr0

      09/29/14 10:43:27.187 DEBUG    bldeploy - -jc0

      09/29/14 10:43:27.187 DEBUG    bldeploy - -StartNew

      09/29/14 10:43:27.187 DEBUG    bldeploy - C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe  - 8.0.0.359

      09/29/14 10:43:27.187 INFO     bldeploy - Deployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.

      09/29/14 10:43:27.187 DEBUG    bldeploy - Cleanup staging area on failure

      09/29/14 10:43:31.719 DEBUG    bldeploy - Utilizing configuration file: C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\6e500e24f2cc3c41961c55cd31a025fe.cfg

      09/29/14 10:43:31.719 DEBUG    bldeploy - Fresh start of deployment, deleting any pre-existing configuration file

      09/29/14 10:43:33.984 DEBUG    bldeploy - Could not open file "C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\params.txt" for reading

      09/29/14 10:43:33.984 DEBUG    bldeploy -

      DEPLOYNAME = 6e500e24f2cc3c41961c55cd31a025fe:

      DEPLOYPATH = C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe:

      FQHOST = xyz.Testbna.bna:

      HOST = xyz:

      HOSTIP = 10.151.2e.dd:

      NAMESPACE = xyz:

      ROLLBACKPATH = C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe:

      RSCDIR = C:\Program Files\BMC Software\BladeLogic\8.0\RSCD:

      WINDIR = C:\Windows:

      XMLFILEPATH = C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml:

      09/29/14 10:43:34.000 DEBUG    bldeploy - Full command line C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe 6e500e24f2cc3c41961c55cd31a025fe -N=/temp/stage/6e500e24f2cc3c41961c55cd31a025fe -P=xyz -Q=params.txt -DryRun -Xr -V2 -js0 -jr0 -jc0

      09/29/14 10:43:34.000 DEBUG    bldeploy -  Running as User: À

      09/29/14 10:43:34.000 DEBUG    bldeploy -  Privileges:

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeIncreaseQuotaPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeSecurityPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeTakeOwnershipPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeLoadDriverPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeSystemProfilePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeSystemtimePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeProfileSingleProcessPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeIncreaseBasePriorityPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeCreatePagefilePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeBackupPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeRestorePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeShutdownPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeDebugPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeSystemEnvironmentPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeChangeNotifyPrivilege - Enabled by default

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeRemoteShutdownPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeUndockPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeManageVolumePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeImpersonatePrivilege - Enabled by default

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeCreateGlobalPrivilege - Enabled by default

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeRelabelPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeIncreaseWorkingSetPrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeTimeZonePrivilege - Disabled

      09/29/14 10:43:34.000 DEBUG    bldeploy -   SeCreateSymbolicLinkPrivilege - Disabled

      09/29/14 10:43:34.641 DEBUG    bldeploy - Validating existence of wait lock C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\locks\reboot.lck

      09/29/14 10:43:34.641 DEBUG    bldeploy - Deployment running in multi-job mode

      09/29/14 10:43:36.016 DEBUG    bldeploy - Read lock acquired release write lock

      09/29/14 10:43:36.016 DEBUG    bldeploy - Acquired appropriate lock: C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\locks\reader\6e500e24f2cc3c41961c55cd31a025fe.lck

      09/29/14 10:43:36.688 DEBUG    bldeploy - Creating directory C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:36.719 INFO     bldeploy - Metabase initialization failed: 0x80040154

      09/29/14 10:43:36.719 INFO     bldeploy - Bldeploy 6e500e24f2cc3c41961c55cd31a025fe started using file C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml with rollback directory C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:36.719 INFO     bldeploy - Starting dryRun

      09/29/14 10:43:36.734 DEBUG    bldeploy - [][] Dryrun id =

      09/29/14 10:43:36.734 DEBUG    bldeploy - [1][] Dryrun id = 1

      09/29/14 10:43:36.734 INFO     bldeploy - Dryrun succeeded

      09/29/14 10:43:36.781 DEBUG    bldeploy - Dryrun does not delete staging nor rollback directories

      09/29/14 10:43:36.781 DEBUG    bldeploy - DeletePkg = 0 DeleteUndo = 0

      09/29/14 10:43:37.469 DEBUG    bldeploy - Bldeploy done - nRet = 3 (DryRun successful) exitCode = 0 (Deployment succeeded)

       

       

      09/29/14 10:43:53.735 INFO     bldeploy - Bldeploy started for package: 6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:53.735 DEBUG    bldeploy - Bldeploy Arguments:

      09/29/14 10:43:53.735 DEBUG    bldeploy - C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe

      09/29/14 10:43:53.735 DEBUG    bldeploy - 6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:53.735 DEBUG    bldeploy - -N=/temp/stage/6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:43:53.735 DEBUG    bldeploy - -P=xyz

      09/29/14 10:43:53.735 DEBUG    bldeploy - -Q=params.txt

      09/29/14 10:43:53.735 DEBUG    bldeploy - -V2

      09/29/14 10:43:53.735 DEBUG    bldeploy - -RegAllCOM

      09/29/14 10:43:53.735 DEBUG    bldeploy - -UnregAllCOM

      09/29/14 10:43:53.750 DEBUG    bldeploy - -TreatLockedAsErr

      09/29/14 10:43:53.750 DEBUG    bldeploy - -js0

      09/29/14 10:43:53.750 DEBUG    bldeploy - -jr0

      09/29/14 10:43:53.750 DEBUG    bldeploy - -jc0

      09/29/14 10:43:53.750 DEBUG    bldeploy - -StartNew

      09/29/14 10:43:53.750 DEBUG    bldeploy - C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe  - 8.0.0.359

      09/29/14 10:43:53.750 WARN     bldeploy - Unrecognized option: -UnregAllCOM

      09/29/14 10:43:53.750 INFO     bldeploy - Deployment job not in single-job mode. Reboot is not allowed. Any reboot requests by certain file operations will be ignored.

      09/29/14 10:43:53.750 DEBUG    bldeploy - Cleanup staging area on failure

      09/29/14 10:43:58.313 DEBUG    bldeploy - Utilizing configuration file: C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\6e500e24f2cc3c41961c55cd31a025fe.cfg

      09/29/14 10:43:58.313 DEBUG    bldeploy - Fresh start of deployment, deleting any pre-existing configuration file

      09/29/14 10:44:00.579 DEBUG    bldeploy - Could not open file "C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\params.txt" for reading

      09/29/14 10:44:00.579 DEBUG    bldeploy -

      DEPLOYNAME = 6e500e24f2cc3c41961c55cd31a025fe:

      DEPLOYPATH = C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe:

      FQHOST = xyz.Testbna.bna:

      HOST = xyz:

      HOSTIP = 10.151.250.16:

      NAMESPACE = xyz:

      ROLLBACKPATH = C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe:

      RSCDIR = C:\Program Files\BMC Software\BladeLogic\8.0\RSCD:

      WINDIR = C:\Windows:

      XMLFILEPATH = C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml:

      09/29/14 10:44:00.594 DEBUG    bldeploy - Full command line C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\sbin\bldeploy.exe 6e500e24f2cc3c41961c55cd31a025fe -N=/temp/stage/6e500e24f2cc3c41961c55cd31a025fe -P=xyz -Q=params.txt -V2 -RegAllCOM -UnregAllCOM -TreatLockedAsErr -js0 -jr0 -jc0

      09/29/14 10:44:00.594 DEBUG    bldeploy -  Running as User: À 

      09/29/14 10:44:00.610 DEBUG    bldeploy -  Privileges:

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeIncreaseQuotaPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeSecurityPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeTakeOwnershipPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeLoadDriverPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeSystemProfilePrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeSystemtimePrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeProfileSingleProcessPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeIncreaseBasePriorityPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeCreatePagefilePrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeBackupPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeRestorePrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeShutdownPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeDebugPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeSystemEnvironmentPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeChangeNotifyPrivilege - Enabled by default

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeRemoteShutdownPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeUndockPrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeManageVolumePrivilege - Disabled

      09/29/14 10:44:00.610 DEBUG    bldeploy -   SeImpersonatePrivilege - Enabled by default

      09/29/14 10:44:00.626 DEBUG    bldeploy -   SeCreateGlobalPrivilege - Enabled by default

      09/29/14 10:44:00.626 DEBUG    bldeploy -   SeRelabelPrivilege - Disabled

      09/29/14 10:44:00.626 DEBUG    bldeploy -   SeIncreaseWorkingSetPrivilege - Disabled

      09/29/14 10:44:00.626 DEBUG    bldeploy -   SeTimeZonePrivilege - Disabled

      09/29/14 10:44:00.626 DEBUG    bldeploy -   SeCreateSymbolicLinkPrivilege - Disabled

      09/29/14 10:44:01.251 DEBUG    bldeploy - Validating existence of wait lock C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\locks\reboot.lck

      09/29/14 10:44:01.251 DEBUG    bldeploy - Deployment running in multi-job mode

      09/29/14 10:44:02.626 DEBUG    bldeploy - Read lock acquired release write lock

      09/29/14 10:44:02.626 DEBUG    bldeploy - Acquired appropriate lock: C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\locks\reader\6e500e24f2cc3c41961c55cd31a025fe.lck

      09/29/14 10:44:03.298 INFO     bldeploy - Metabase initialization failed: 0x80040154

      09/29/14 10:44:03.313 INFO     bldeploy - Bldeploy 6e500e24f2cc3c41961c55cd31a025fe started using file C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploy.xml with rollback directory C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:44:03.313 INFO     bldeploy - Starting apply

      09/29/14 10:44:03.329 DEBUG    bldeploy - [][] Starting pre-apply for BLPACKAGE

      09/29/14 10:44:03.344 DEBUG    bldeploy - [][] Applying parent first id =

      09/29/14 10:44:03.344 INFO     bldeploy - [][] Processing asset BLPACKAGE

      09/29/14 10:44:03.376 DEBUG    bldeploy - [1][] Applying parent first id = 1

      09/29/14 10:44:03.376 INFO     bldeploy - [1][] Processing asset CUSTOMSOFTWARE

      09/29/14 10:44:03.391 INFO     bldeploy - [1][] Executing command: "sh -c "if test -f /usr/bin/unzip;then UNZIP=/usr/bin/unzip; else UNZIP=unzip;fi; \$UNZIP -oq '2015438.1\aFile.zip' -d '2015438.1'"

      "2015438.1\aFile" (add install flags here)"

      09/29/14 10:44:03.391 DEBUG    bldeploy - [1][] chdir to PkgDir: 'C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\'

      09/29/14 10:44:03.391 DEBUG    bldeploy - [1][] exeFullPath = (null), CmdLine = "C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe\bldeploycmd.bat", workingDir = NULL

      09/29/14 10:44:03.516 INFO     bldeploy - [1][] [stdout: 1]

       

       

      C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>chcp 1252  1>NUL

       

       

       

       

       

       

      C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>sh -c "if test -f /usr/bin/unzip;then UNZIP=/usr/bin/unzip; else UNZIP=unzip;fi; \$UNZIP -oq '2015438.1\aFile.zip' -d '2015438.1'"

       

       

       

       

       

       

      C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe>"2015438.1\aFile" (add install flags here)

       

       

       

       

      09/29/14 10:44:03.516 WARN     bldeploy - [1][] [stderr: 1] 'sh' is not recognized as an internal or external command,

       

       

      operable program or batch file.

       

       

      '"2015438.1\aFile"' is not recognized as an internal or external command,

       

       

      operable program or batch file.

       

       

       

       

      09/29/14 10:44:03.516 DEBUG    bldeploy - [1][] In RunProcess: exitCode = 1

      09/29/14 10:44:03.516 ERROR    bldeploy - [1][] Command returned non-zero exit code: 1

      09/29/14 10:44:03.516 DEBUG    bldeploy - [1][] chdir to PkgDir: 'C:\'

      09/29/14 10:44:03.532 ERROR    bldeploy - [1][] Apply failed: id = 1

      09/29/14 10:44:03.532 DEBUG    bldeploy - [1][] Apply failed -processing sub-list: id = 1

      09/29/14 10:44:03.532 DEBUG    bldeploy - [][] Package failed = BLPACKAGE

      09/29/14 10:44:03.532 DEBUG    bldeploy - Package items were processed

      09/29/14 10:44:04.282 INFO     bldeploy - Starting undo

      09/29/14 10:44:04.298 DEBUG    bldeploy - [][] Starting pre-applyUndo for BLPACKAGE

      09/29/14 10:44:04.298 DEBUG    bldeploy - [][] Undo: Applying id =

      09/29/14 10:44:04.298 INFO     bldeploy - [][] Processing asset BLPACKAGE

      09/29/14 10:44:04.313 DEBUG    bldeploy - No Package items were processed. Package was already completed or empty.

      09/29/14 10:44:04.313 INFO     bldeploy - Undo succeeded

      09/29/14 10:44:04.344 WARN     bldeploy - Deploy failed. Cleaning up staging area.

      09/29/14 10:44:04.360 WARN     bldeploy - Deploy failed. Cleaning up staging area.

      09/29/14 10:44:04.360 DEBUG    bldeploy - DeletePkg = 1 DeleteUndo = 1

      09/29/14 10:44:04.360 DEBUG    bldeploy - Deleted the folder: C:\Program Files\BMC Software\BladeLogic\8.0\RSCD\Transactions\6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:44:04.376 DEBUG    bldeploy - Deleted the folder: C:\temp\stage\6e500e24f2cc3c41961c55cd31a025fe

      09/29/14 10:44:05.016 DEBUG    bldeploy - Bldeploy done - nRet = 6 (Apply failed; auto-rollback successful) exitCode = -4001 (Deployment failed)

        • 1. Re: custom software deploy job

          From logs Looks like you will require to fix the install command of custom software. Can you modify install command

          such that it will work on Windows platform ?

           

           

          Executing command: "sh -c "if test -f /usr/bin/unzip;then UNZIP=/usr/bin/unzip; else UNZIP=unzip;fi; \$UNZIP -oq '2015438.1\aFile.zip' -d '2015438.1'" "2015438.1\aFile" (add install flags here)"

           

          09/29/14 10:44:03.516 WARN     bldeploy - [1][] [stderr: 1] 'sh' is not recognized as an internal or external command,

          • 2. Re: custom software deploy job

            Hi Swapnil,

             

            Thank you for the reply. That was my initial thought as well however I am not entering any install/uninstall command for the custom software:

             

            blcli_execute DepotSoftware addCustomSoftwareToDepotByGroupName "/Test/mo" "Windows" "Custom Software" "//xyz/c/test/aFile.zip" "moTestCustomSoftware" "desc" "" "" "" ""

             

            This follows the BLCLI documentation guide where the last four parameters (marked as blank in my case "") are responsible for setting up install/uinstall commands.

            • 3. Re: custom software deploy job

              If you just want to unzip file then you don't require Custom Software. Typically its used for software like Web Sphere etc and you will need an install/uninstall command and silent file.

               

              1. Create an empty BLPackage

              2. Add your zip file as File

              3. Import this Zipfile to BLpackage

              4. Add external command to unzip the package

              5. Finally create deploy job using this BLpackage

              • 4. Re: Re: custom software deploy job

                Hi Swapnil,

                 

                Thank you for the quick response.

                 

                Yes, I agree with you, however the reason we are using this approach is because (please correct me if my understanding is wrong):

                 

                1. We want to have a soft-link from the BSA to the actual code package (e.g. zip or tar file) instead of copying it into the BL repository.

                 

                2. The custom software itself will form part of our BLPackage during deploy time. In other words, during software deploy time, we plan on using BLPackage as a 'checklist' to automate quiet few processes. For example:

                - Shutdown Tomcat service

                - Deploy custom software to target

                - Run some scripts contained in the code package

                - Startup Tomcat service

                 

                If it helps to visualize:

                 

                <--- CUSTOM SOFTWARE PACKAGE contents --->

                soft_link_to_zip_or_tar

                <---------------------------------------->

                 

                <--- BLPACKAGE contents --->

                stop_tomcat_service

                deploy_custom_software

                unzip_or_untar_and_run_codepackage_scripts

                start_tomcat_service

                <-------------------------->

                 

                <--- DEPLOYJOB contents --->

                deploy_blpackage_to_selected_targetserver

                <-------------------------->

                • 5. Re: custom software deploy job

                  In Bladelogic there are three ways to distribute payload/installable etc ...

                  1.  File Server

                  2. Copy to Agent --> Copy content directly to Agent

                  3. Agent Mount --> Agent mounts the source and deploy the contents

                   

                   

                  You can use 2) or 3) option for storing it outside the Bladelogic File Server.

                   

                   

                  Looks like you expecting that job run time decide which jar/zip file to be deployed for same Application.

                  You can add Zip file (as File) dynamically using NSH script job. NSH Script job either take version of the file as parameter or you may put some logic to decide which version is most appropriate ...

                   

                  <--- BLPACKAGE contents --->

                  stop_tomcat_service

                  deploy_custom_software

                  Zip File

                  start_tomcat_service

                  <-------------------------->

                  • 6. Re: custom software deploy job
                    Monoj Padhy

                    Ali pls attach the job log instead of pasting in the thread. Use some standards to maintain the decorum of the forum. Also this will be more readable. I hope you understood what I mean. Some times lengthy post makes users irritated. use the functionality provided in the forum and attach anything that is in lengthy.

                    1 of 1 people found this helpful
                    • 7. Re: custom software deploy job
                      Barry McQuillan

                      You could just use a filedeployjob to deploy the .tar/.zip file and then execute a BLPackage.

                      https://docs.bmc.com/docs/display/bsacli85/FileDeployJob+-+setJobSourceFilePathList

                       

                      I would normally do something like:

                      1. Create a BLPackage that contains:

                      • stop tomcat
                      • install file.
                      • start tomcat

                      and has a property for FILENAME and FILEPATH

                       

                      2. Create a NSHScript to create and execute a filedeployjob then execute the BLPackage created in step 1.

                      The script would need to have a parameter for FILEPATH and FILENAME.

                      It will need to populate these parameters in the BLPackage.

                       

                      So workflow would be something like:

                      1. NSHScript executes
                      2. FileDeployJob executes - copying file to target server (either to a temp directory or directly to required location).
                      3. BLPackage executes
                        1. stops tomcat
                        2. runs whatever commands are required to deploy .tar/.zip
                        3. starts tomcat
                      4. Check all successful

                       

                      Doing it this way has a number of benefits, however the biggest one I find is that the "Process" (BLPackage) never changes.  This means minimal testing and change control is required once the initial testing is completed.

                      You are simply changing the payload each time.

                       

                      Also depending on how you build your package you could leverage it for any similar deployments.

                       

                       

                       

                      • 8. Re: custom software deploy job

                        I think you can use Softlinked software and use mv command as install command to move zip file to required location. 

                        e.g.  mv ??SOURCE?? /opt/bmc/rscd_stage

                        • 9. Re: custom software deploy job

                          Thanks Swapnil,

                           

                          Yes based on your syntax, I was able to model the 'cp' command I was working on.