lab management - TFS2012 LabDefault.11 template deploy scripts fail with "Team Foundation Server could not complete the deployment task" -


i having security issues lab management , standard environments.

i have tfs2012 update 2 installed in domain "devdomain". have separate build/lab machine in "devdomain" on both build controller, build agents , test controller same collection "collectiona" installed.

automated builds work perfectly.

i have deployment target pcs in "devdomain" , in "testdomain" (more on later).

to take next level, want automatically deploy tfs build agent constructed software test rig machines; want have deployment script uninstall existing product, copy updated installer onto target pc , install it.

my first foray define standard environment in "devdomain" , deployment part of lab build working within same domain.

this worked. here did;

the automated build (using defaulttemplate.xaml process) creates msi file want use deployment, , powershell script want run orchestrate deployment. (the script attempts run msi via msiexec uninstall, copy new version locally run via msiexec install new copy). automated build happily makes both these artefacts , puts them in defined tfs drop share.

in order go have:

  • created new standard lab environment single machine (desktop client role)
    • the lab manager deployed agent pc
    • the agent running interactive , showing online.
  • created new build definition using labdefaulttemplate.11.xaml workflow.
    • referenced above lab in configuration
    • referenced latest output of automated build in config
    • specified build output powershell script (via $(buildlocation) macro.

this deploy tab of build specifies following script run on machine sin lab "desktop client" role:

cmd /c powershell.exe "$(buildlocation)\deployguitolabworkstation.ps1" "$(buildlocation)" 

this works.

note configuring test agents run interactive processes ultimate aim after deployment works drive coded ui tests on these labs.

the problems start when trying deploy machine in different domain make more realistic need define standard lab environment qa machines, in different domain; "testdomain".

the domain "testdomain" has trust relationship domain "devdomain". there no reciprocal trust between "devdomain" , "testdomain"

again test manager lab centre defined ok , deployed agent, , agent reported online test controller.

now when change lab build reference new standard environment (on "testdomain") deployment fails error;

exception message: team foundation server not complete deployment task machine '10.7.70.71', script 'cmd' , arguments '/c copy \\*buildmachine* \tfs_drop\...\deployguitoworkstation.ps1 c:\guideploy'. (type labdeploymentprocessexception) 

in order diagnose have modified lab deploy script be:

"cmd /c powershell whoami" 

and according logs process being run "nt authority\system" , not account lab environment specified test agent.

this explains script error; powershell on target pc cannot access tfs drop share, since account local machine account cant possibly grant permissions machine account of pc in "testdomain" share , ntfs folder on machine in "devdomain"

so how can grant permissions on "devdomain" share/filesystem "system" service account machine in "testdomain"?

or

how test agent (running local machine administrator) execute deployment script in own account context rather machine system context?

i stumped!


edit: seems test agent ui runs in account specify, when configure way leaves service "visual studio lab agent service" running local system, can manually change in services, more appropriate domain account , account reflected in ps "whoami" results.

i investigating using testdomain account service mirrors "devdomain" account can set share permissions appropriately.


this similar scenario tfs lab management deployment scripts since side-stepped using tests , test settings, , want resolution of deploy part thought worth asking question.

the above pete stensønes' solution works on conditions.

but scenario setup standard env on workgroup, tfs in domain. list steps reference: create local account on following server: local lab service account - tfslab

  1. tfs test controller server: create local tfslab account. configure tfslab lab service account in test controller configure console
  2. tfs test agent server: create local tfslab account , add tfslab local admin group. update visual studio test agent service , visual studio lab agent service run tfslab.
  3. tfs drop folder server: create local tfslab account. , add share read permission tfs drop folder.

Comments

Popular posts from this blog

jquery - How can I dynamically add a browser tab? -

node.js - Getting the socket id,user id pair of a logged in user(s) -

keyboard - C++ GetAsyncKeyState alternative -