Richard,
we didn't want to put CruiseControl anywhere near staging or production servers.
For LAN (ie. internal production servers) we have manually triggered Production Deploy CC tasks which stop IIS (sites and app-pools), copy the new site across and restart IIS stuff.
For DMZ deployments (ie. internet stuff, no AD-auth'd connections possible) we do as much of the build as we can internally and ZIP up the results, including a NAnt script which does the 'final steps'. There is an internal CC task which does all that and FTPs the ZIP out to the target servers. To complete the process requires manual intervention: logging in to the box remotely, unzipping and then running the NAnt to 'complete' deployment (stop/copy/start/whatever).
I'm not sure about GAC, but IIS seems controllable via .VBS files
' Connect to the WMI WebAdministration namespace.
Set oWebAdmin = GetObject("winmgmts:\\devserver.local\root\WebAdministration")
' Specify the application pool.
Set oAppPool = oWebAdmin.Get("ApplicationPool.Name='ProjectName'")
' Stop the application pool.
oAppPool.Stop
' now website; get the application website
Set objWebSite = GetObject("IIS://localhost/W3SVC/7") ' id of web site
' get the app pool object for the websites app pool id
Set objAppPool = GetObject("IIS://localhost/W3SVC/AppPools/ProjectName")
'stop the site
objWebSite.Stop()
' stop the app pool
objAppPool.Stop()
For services we use psexec.exe
via NAnt
<property name="Remote.Executor" value="${ToolsDir}\PSTools\psexec.exe" overwrite="false" />
<!-- installs a particular windows service remotely from the command line -->
<target name="installWindowsServiceRemote">
<echo message="${Service.Install.Action}ing ${Service.Name} on ${Deploy.TargetServer}..." />
<exec program="${Remote.Executor}">
<arg line="\\${Deploy.TargetServer} ${Deploy.TargetFolder}\${Service.Name} /${Service.Install.Action}" />
</exec>
</target>
Anyway there's probably dozens of ways to approach this - the internally-automated/external-manual-step-required setup works for us.