Quantcast
Channel: Team Foundation Server - General forum
Viewing all articles
Browse latest Browse all 6687

TFS LabDeploy Account Clarifications

$
0
0

Hello folks,

I'm in the process of automating my first build/deploy using visual studio 2012 and lab management. Here's a bit of a preface to my problem (and question) which ultimately revolves around the user/service accounts used in a LabDeploy activity.

I've got a 4 box Environment in lab management of which one of the machines is a SharePoint 2013 server and ideally as part of my build I would like to chain my developer teams deploy scripts to do all my hard work for me.

My methodology so far is a bit like this.

The Labdeploy build kicks off

It kicks off the base build that then reshuffles the drops folder such that we end up with a folder called /drops/etc./SPDeployables

The labbuild then reverts the 4 box environment to a clean snapshot then runs the post build deploy scripts. These scripts perform a robocopy that pulls the SPDeployables folder down to 3 folders on the SharePoint Server.

It then starts calling other power-shell scripts that roll out the SharePoint development artefacts (wsps etc). In the build log I'm getting a wonderful error stating that pretty much every SharePoint cmdlet is failing.

Here's an excerpt from the script

robocopy "$DropLocation\SPDeployables\SPWSPS" "C:\SPWSPS" /copy:D
robocopy "$DropLocation\SPDeployables\BDCModels" "C:\BDCModels" /copy:D
robocopy "$DropLocation\SPDeployables\Reports" "C:\Reports" /s /copy:D

Start-Sleep -Second 60 

& "C:\SPWSPS\test-DeployWsps.ps1"
& "C:\BCDModels\test-BdcModelsImport.ps1"
& "C:\BCDModels\InitialSearch.ps1"
& "C:\SPWSPS\test-createcontent.ps1"
& "C:\SPWSPS\test-createAuthoring.ps1"



Now I know the reason for this failure, it's because you need to be SPAdmin or equivalent farm admin on the farm you're trying to interact with via the SharePoint cmdlets.

My question at this point is who is the executing account that called the containing script? because it will be the account executing the child scripts? I'm at loathe to do something like switch the PowerShell session to SP-Admin because I more or less lose all tracing that occurs while the SharePoint deploy is occurring. (As far as I'm aware the build only gets logging back with accounts that are part of the lab-deploy process, so tfslab, the test agent account on the vm, or the build service account).

My possible suspects list is as follows.

  • TfsLab service account (which I sincerely hope is not the case because then I'm looking at a cross domain and my less than ideal PowerShell trick is my only solution)
  • The test agent on the SharePoint VM which is currently running as the domain admin (who against best practice I also made a Farm admin to test whether I could get some logging back from the build as it ran but had no effect on the process).

Ultimately I'm trying to get my head around who is executing what at which point during the who build deploy process.

Thanks for reading  (and any help you can give).



Viewing all articles
Browse latest Browse all 6687

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>