Using "clusrun" to deploy PowerShell, VC runtimes, or other goodies to your compute nodes

Normally, deploying applications to a large number of Windows machines requires substantial planning and infrastructure.  Microsoft ships enterprise-quality solutions for handling software deployments, such as Systems Management Server (SMS).  It is also possible to deploy software packages using Active Directory Group Policy.   Critical security updates can be handled using Windows Service Update Services (WSUS).  As your compute cluster infrastructure becomes larger and more complex, these solutions can and should be considered.  However, for the majority of test clusters and even some larger installations, there is a quicker way to get software to your compute nodes, if you can figure out how to do an unattended setup of the software from the command line.

Windows PowerShell is an excellent example of a program which can be deployed easily using a command-line setup.  If you download the PowerShell 1.0 x64 version (which is appropriate for Windows Compute Clusters), you will get an executable named something like "WindowsServer2003.WindowsXP-KB926139-x64-ENU.exe".   If you run:

   WindowsServer2003.WindowsXP-KB926139-x64-ENU.exe /?

you will get a dialog with a usage message.  The key thing to note is that this executable supports a "/quiet" flag which allows you to install without generating an interactive UI.  So to install PowerShell on all of your compute nodes automatically, you can simply copy the setup program above to a share that is accessible to the compute nodes (for example, on the head node "head", share name "share" and run:

C:\> clusrun \\head\share\WindowsServer2003.WindowsXP-KB926139-x64-ENU.exe /quiet

That's it!

Some applications require extra steps to get to the unattended install, so you have to do some digging.  For example, let's say you have an application built with SP1 of Visual Studio 2005.  This uses a newer version of the C Runtime and you'll have to get this on all of your compute nodes in order for your application to run.  Otherwise you'll get cryptic errors.  You can download the setup program for this update C Runtime, and you'll get something named "vcredist_x64.exe".  If you run "vcredist_x64.exe /?" you'll get the options that you'll need to perform an intermediate step before performing your remote deployment.  The key is to use the /T: and /C options:

C:\> vcredist_x64.exe /T:\\head\share\vcredist /C

This will create a directory \\head\share\vcredist with a single file in it named something like "VCREDI~2.EXE".  So there is a second indirection, but we are almost done!  Do:

C:\> \\head\share\vcredist\VCREDI~2.EXE /T:\\head\share\vcredist2 /C

This will extract the final setup files into \\head\share\vcredist2

Within this directory you will find a file named "vcredist.msi".  This is a Windows Installer Setup file.  It can be invoked via "msiexec" (the default program for the .msi extension.).  The trick to performing a quiet MSI install is to use the /qn option.  So the final command to get this VC Runtime version out to your compute nodes would look like this:

C:\> clusrun msiexec /qn /i \\head\share\vcredist2\vcredist.msi

Good luck!

Comments (0)

Skip to main content