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.
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.
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
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.
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.
Explore developerWorks Cloud
computing, where you will find valuable community discussions and learn
about new technical resources related to the cloud.
Stay current with developerWorks
technical events and webcasts focused on a variety of IBM products and IT
Attend a free developerWorks
briefing to get up to speed quickly on IBM products and tools as well as
IT industry trends.
Follow developerWorks on Twitter.
Watch developerWorks demos ranging from product installation and setup demos for beginners
to advanced functionality for experienced developers.
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
Sandbox learning how to implement service-oriented architecture efficiently.
Get involved in the developerWorks community. Connect with other developerWorks users while
exploring the developer-driven blogs, forums, groups, and wikis.
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.