Remote AutoSPInstaller Install from build server

Dec 2, 2012 at 11:06 AM
Edited Dec 5, 2012 at 9:48 AM

Problem: I am trying to automate my SharePoint 2010 build to be executed using MSBuild or Team City.  I have the build working when I run AutoSPInstaller from a WFE or App server.  I can't figure out how to run AutoSPInstaller from a build server and know when it's done.

Is this possible?  Any ideas. 

Background for my environment:

SP2010 SP1 with August 2012 CU slipstreamed using SQL Server 2012.  All VM's are on Windows 2008 R2.

1) AD(VM01),  2) SQL Server (2012) (VM02), 3) WFE (VM03), 4) App Server (VM04). 

thanks

paul

 

 

Coordinator
Dec 4, 2012 at 3:08 AM

Not sure I fully understand the question, but straight away I can tell you that there appear to be issues with slipstreaming starting from the August 2012 CU, and including the October 2012 CU. See here for more info:

http://spinsiders.com/brianlala/2012/11/20/slipstreaming-issues-beginning-with-sharepoint-august-2012-cu-and-a-fix/

Brian

Dec 5, 2012 at 9:47 AM
Edited Dec 5, 2012 at 9:52 AM

Hi Brian,

August 2012 CU for SP2012 is working for me and isn't my issue (well i'm ignoring the error per your changeset 96239).

My qu above is badly written and hopefully this adds more detail.

Background: I am trying to use TeamCity from Jetbrains to automate my DTAP environments (i.e. create a full fresh daily Continuous Integration (CI) environment, this will create my VM's on ESX using PowerCli, build my SQL Servers from scratch (including setting up Always on Availability Groups), then I'm using AutoSPInstaller to install my 6 VM SP2010 farm, I then to FS4SP (outstanding) and K2 (outstanding) & automate out the build of my SharePoint/environment assets).

AutoSPInstaller for a remote Parallel build needs to be run from 1 of the SP servers (either a WFE or App server).  The problem is that my build server is a TeamCity box and not 1 of the WFE/App servers.  I can run the AutoSPInstallerLaunch.bat or AutoSPInstallerMain.ps1 file with command line argument using wither "Invoke-Command" (pref) or psexec \\WFE1 "d:\sp\AutoSPInstallerMain.ps1 d:\sp\AutoSPInstallerInput.xml".  So this allows me to run the setup and it's fired from my build server and installed correctly. 

Problem:  Issue is I need to know when it's complete,  Also I need to know variables so I can do additional post AutoSPInstaller steps. 

Initial Hypothesis:  I don't know when to move to the next step in my build so I either pause for a predefined delayed time (not great as it may fail and I could run to early or leave way to big a gap) or I need to periodically ping SP2010 to see when it's been completed (not great as it may fail)

Resolution: For now I'm going to Pause for 120 minutes after I kick of AutoSPInstaller.

Dec 6, 2012 at 4:00 PM

How about writing a function in AutoSPInstallCustomFunctions.ps1 that tells you when the install is complete? It could be simple as creating a file called "done.txt" on the C: drive.  Add that function as the last item in AutoSPInstallMain.ps1.  This would also keep the PowerShell session open so you'd have access to the variables.  Just a thought.

Jan 18, 2013 at 2:15 PM

Thanks wahidsaleemi, I like your idea but decided to go for a PS http request that keeps requesting/pinging to see when my main SharePoint site is available and I know my install is complete.  Not terribly elegant but it works.