Skip to main content

By clicking Submit, you agree to the developerWorks terms of use.

The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

All information submitted is secure.

  • Close [x]

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerworks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

By clicking Submit, you agree to the developerWorks terms of use.

All information submitted is secure.

  • Close [x]

SmartCloud+ tip: Install software on Windows with TSAM and Cygwin

Try this method if Update Installer shortcuts aren't updating

Bhanu P Tholeti (btholeti@in.ibm.com), Systems Engineer and Architect, IBM
Bhanuprakash has worked in the software industry for the past eight years on various technologies and products such as application development over Pocket PCs, web-based applications, video streaming solutions, and products like Tivoli Workload Scheduler, WebSphere Data Interchange, Tivoli Service Automation Manager, and Tivoli Provisioning Manager. Being part of IBM SmartCloud Enterprise, he has gained rich knowledge of cloud infrastructures and hypervisors.
Sowjanya CK has worked in IBM for the past four+ years on various products. Involved in porting of Tivoli Provisioning Manager on to z/linux, Go Symphony plugin development, and SCEplus development.

Summary:  Discover the Windows® operating system native method of scheduling tasks that are employed in this alternative method of installing software (in this article, IBM® WebSphere® Application Server) using Cygwin scripts for Tivoli® Service Automation Manager products.

Date:  12 Sep 2012
Level:  Introductory PDF:  A4 and Letter (140 KB | 6 pages)Get Adobe® Reader®
Also available in:   Chinese  Japanese  Portuguese

Activity:  8920 views
Comments:  

This article describes a method for installing software on IBM SmartCloud Enterprise+ running on a Windows® operating system. The method shown here prevents a possible problem with shortcut updates on the Windows Start menu.

The problem

A problem that often happens during the traditional installation process is that the shortcuts for the Update Installer in the Windows Start menu are not updated, which leads to the installation process being aborted. However, when you try to install using the Windows command prompt, the installation proceeds without any errors. WebSphere Application Server (WAS) is used to demonstrate this alternative installation method.

To install WebSphere Application Server, use the Cygwin environment with SmartCloud-enabled Rapid Deployment Services (RDS) and simple package installer technology (SPIN). If you're unfamiliar with these technologies, a short refresher is provided at the conclusion of this article.


The solution

This method should help if you are developing scripts in Tivoli Provisioning Manager (TPM) and Tivoli Service Automation Manager (TSAM) products to perform software installations over Windows systems using Cygwin. It uses the Windows native method of scheduling tasks, which is supported in Cygwin.

Instead of invoking the command to install WebSphere Application Server directly through Cygwin (usually performed from a Tivoli Provisioning Manager workflow scriptlet that uses the command prompt from within Cygwin), schedule a task that invokes a batch file that contains the commands to install WebSphere Application Server.

After scheduling the task, you can run the task immediately. It will install WebSphere Application Server successfully.

To see how to exit the installation procedure, view the installation log in the following code snippet.

scriptlet(bitNess,SoftwareInstallableFileName,spinDirCygwin,JAVA_HOME,decryptedPassword)
 language=bash target=DCMQuery(/Server[@id=$DeviceID]) timeout=6000 <<EOS

     cd $spinDirCygwin
     #unzip WAS-V70-BASE-V10.zip
     unzip $SoftwareInstallableFileName

     installableFileWithOutExt=`echo $SoftwareInstallableFileName | sed 's/.zip//g'`     

     
     mv $spinDirCygwin/*UPDI*
        $spinDirCygwin/$installableFileWithOutExt/spinPackage/software/was/v7/maint/
     if [ $bitNess == "64-bit" ];  then
          mv $spinDirCygwin/C1G2JML.zip
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/nd/
          mv $spinDirCygwin/*.pak
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/maint/
          mv $spinDirCygwin/*UPDI*
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/maint/
     else
          mv $spinDirCygwin/C1G2GML.zip
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/nd/
          mv $spinDirCygwin/*.pak
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/maint/
          mv $spinDirCygwin/*UPDI*
		   $spinDirCygwin/$installableFileWithOutExt/
		    spinPackage/software/was/v7/maint/
     fi

     cd $spinDirCygwin/$installableFileWithOutExt/spinPackage


     echo "set PATH=$JAVA_HOME\bin;%PATH% " > install.bat
     echo " cd C:\spin\\$installableFileWithOutExt\spinPackage\ " >> install.bat
     echo " cmd /c sce-was-v7-base-install.bat " >> install.bat

     echo "set PATH=$JAVA_HOME\bin;%PATH% " > installdmgr.bat
     echo " cmd /c sce-was-v7-dmgr.bat " >> installdmgr.bat

     echo "set PATH=$JAVA_HOME\bin;%PATH% " > installmanager.bat
     echo " cmd /c sce-was-v7-managed.bat localhost  " >> installmanager.bat

     chmod -R 755 $spinDirCygwin

     schtasks /create /tn "WASInstallSch" /tr
      "C:\spin\\$installableFileWithOutExt\spinPackage\install.bat"
      /sc daily /ru Administrator /rp $decryptedPassword
     schtasks /run /tn "WASInstallSch"     

     
     EOS

The following commands schedule a cron job and run immediately, then delete the job after executing.

To schedule to run the job daily at the current time:

schtasks /create /tn "Test Cron Job" /tr "C:\test.bat" /sc daily /ru
administrator /rp passwd

To run the job immediately:

schtasks /run /tn "Test Cron Job"

To delete the job:

schtasks /delete /tn "Test Cron Job" /f 

To read the last result field (if you get a "0," install is a success):

schtasks /query /fo LIST /v


In conclusion

This method of invoking the installation can be performed for any software installation that demonstrates any of these potential issues while you're trying to get them installed using an SSH connection through Cygwin software.

Technologies in this article

The free and open source Cygwin is a UNIX®-like environment and command-line interface for Windows that provides native integration of Windows-based applications, data, and other system resources with applications, software tools, and data of the UNIX-like environment. You can do things like launch Windows applications from the Cygwin environment and use Cygwin tools and applications within the Windows operating context.

Cygwin consists of:

  • A dynamic-link library (DLL) as an API compatibility layer that provides a substantial part of POSIX API functionality.
  • Software tools and applications that provide a UNIX-like look and feel.

IBM's Rapid Deployment Services is an integrated set of services designed to aid in complex, multiproduct deployments; it uses an automated, pattern-driven approach and comprehensive testing and validation to help reduce deployment time, error rates, and the need for specialized skills.


Resources

Learn

Get products and technologies

  • Evaluate IBM products in the way that suits you best: Download a product trial, try a product online, use a product in a cloud environment, or spend a few hours in the SOA Sandbox learning how to implement service-oriented architecture efficiently.

Discuss

  • Get involved in the developerWorks community. Connect with other developerWorks users while exploring the developer-driven blogs, forums, groups, and wikis.

About the authors

Bhanuprakash has worked in the software industry for the past eight years on various technologies and products such as application development over Pocket PCs, web-based applications, video streaming solutions, and products like Tivoli Workload Scheduler, WebSphere Data Interchange, Tivoli Service Automation Manager, and Tivoli Provisioning Manager. Being part of IBM SmartCloud Enterprise, he has gained rich knowledge of cloud infrastructures and hypervisors.

Sowjanya CK has worked in IBM for the past four+ years on various products. Involved in porting of Tivoli Provisioning Manager on to z/linux, Go Symphony plugin development, and SCEplus development.

Report abuse help

Report abuse

Thank you. This entry has been flagged for moderator attention.


Report abuse help

Report abuse

Report abuse submission failed. Please try again later.


developerWorks: Sign in


Need an IBM ID?
Forgot your IBM ID?


Forgot your password?
Change your password

By clicking Submit, you agree to the developerWorks terms of use.

 


The first time you sign into developerWorks, a profile is created for you. Select information in your profile (name, country/region, and company) is displayed to the public and will accompany any content you post. You may update your IBM account at any time.

Choose your display name

The first time you sign in to developerWorks, a profile is created for you, so you need to choose a display name. Your display name accompanies the content you post on developerWorks.

Please choose a display name between 3-31 characters. Your display name must be unique in the developerWorks community and should not be your email address for privacy reasons.

(Must be between 3 – 31 characters.)

By clicking Submit, you agree to the developerWorks terms of use.

 


Rate this article

Comments

static.content.url=http://www.ibm.com/developerworks/js/artrating/
SITE_ID=1
Zone=Cloud computing, Tivoli
ArticleID=834629
ArticleTitle=SmartCloud+ tip: Install software on Windows with TSAM and Cygwin
publish-date=09122012