Clustering ColdFusion in a Windows Environment

by @jehiah on 2004-09-09 00:24
Filed under: All, ColdFusion

One of the problems with clustering ColdFusion in a windows environment is storing the coldfusion files(and web files) in a central location that can be accessed from the webserver, and all the coldfusion nodes. On a linux system coldfusion will hapily read files from a NFS mount, or you can rsync files. Neither of these options are simple on windows, however one viable solution is to create a system level drive mapping to a windows file share.

It should be noted that simply logging in and mapping a drive on the coldfusion node will not work, as that is a user level drive mapping, and coldfusion will not see it because it runs on the system level. The following methodology will add a mapping which runs at startup at the system level, and even though you will not see it when logged in as a regular user... ColdFusion will see it.

Configuring System Level Share Mapping

  1. Start -> run -> MMC
  2. Console -> Add/Remove Snap In -> Add -> Group Policy -> Ok -> Finish
  3. Computer-Configuration -> Windows Settings -> Scripts -> Startup -> Show Folder
  4. Save the following as C:WINNTsystem32GroupPolicyMachineScriptsStartupMap Drive.vbs

    Set objNetwork = Wscript.CreateObject("WScript.Network")
    objNetwork.MapNetworkDrive "j:", "{fileserver}{sharename}"
    

    replacing {fileserver} with the servername of the server with the share, and {sharename} with the actual name of the share as appropriate 4. Computer-Configuration -> Windows Settings -> Scripts -> Startup -> Add ->Browse->Map Drive.vbs 5. Restart the computer, for the change to take effect

You may need to make the data share either full write access to the guest user, system user, or a domain account for the remote computer (ie: domaincomputer$)

NFS Shares ?

After installing Windows Services for Unix (3.5) and sharing a folder as a [NTFS][] share, you can mount the NFS share using the same script above. You will need to have Windows Services for Unix installed on both the server with the share, and the server acting as a ntfs client.

Subscribe via RSS ı Email
© 2017 - Jehiah Czebotar