簡體   English   中英

TFS版本管理以部署到單獨的域

[英]TFS Release Management to deploy to a separate domain

我們在內部網絡上托管了TFS 2017內部安裝。 讓我們稱之為tfs.OurInternalDomain.com TFS應用程序及其構建控制器和代理都托管在我們的內部n / w上。 出於安全原因,我們的生產服務器托管在單獨的域(數據中​​心)上。

我正在嘗試使用TFS版本管理定義將內部N / w內的TFS Build工件[文件和文件夾]部署到生產服務器上。 我可以使用“復制文件”任務將文件復制到生產服務器上的文件夾中(該文件位於單獨的域中),並使用帶有$(AdminLogin)和$(Password)的單獨ID從我們的內部n / w文件夾中復制文件。 此用戶標識是生產服務器上的本地管理員。 TFS服務在我們的域上以單獨的ID運行。

這些是任務的變量:“從中復制文件”

Source=$(System.DefaultWorkingDirectory)/$(BuildDefinitionName)/$(BuildArtifactName)
Machines=$(ServerOneOnSeparateDomain)
Admin Login=$(AdminLogin) 
Password=$(Password)
Destination Folder=$(BuildDropLocation)

到現在為止還挺好。 下一個任務是在目標計算機上運行powershell腳本,這就是我們內部n / w上的構建代理無法執行powershell腳本的位置。 我同時使用-http和https協議。 下面是選擇http時的錯誤日志。

Executing the powershell script: D:\TFS2017Build\Agent1\tasks\PowerShellOnTargetMachines\1.0.41\PowerShellOnTargetMachines.ps1
Deployment started for machine: '<ServerOneOnSeparateDomain>.com:5985'
##[debug]Deployment logs for Deployment operation on <ServerOneOnSeparateDomain>:5985 
##[debug]Permission denied while trying to connect to the target machine <ServerOneOnSeparateDomain> on the port:5985 via power shell remoting. Please check the following link for instructions: https://go.microsoft.com/fwlink/?LinkID=390236System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server <ServerOneOnSeparateDomain> failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request.  

Possible causes are:
-The user name or password specified are invalid.
-Kerberos is used when no authentication method and no user name are specified.
-Kerberos accepts domain user names, but not local user names.
-The Service Principal Name (SPN) for the remote computer name and port does not exist.
-The client and remote computers are in different domains and there is no trust between the two domains.
After checking for the above issues, try the following:
-Check the Event Viewer for events related to authentication.
-Change the authentication method; add the destination computer to the WinRM TrustedHosts configuration setting or use HTTPS transport.
Note that computers in the TrustedHosts list might not be authenticated.

在生產服務器上執行winrm時,輸出如下:

winrm quickconfig
WinRM service is already running on this machine.
WinRM is already set up for remote management on this computer.

有沒有一種方法可以解決此問題,以使我們不會干擾將TFS應用程序,構建控制器和代理托管在InternalDomain上並能夠在單獨的域上執行Powershell腳本的現有TFS體系結構? 如果沒有,還有其他解決方法嗎?

我的最終目標是能夠通過內部n / w上托管的TFS將代碼部署到生產中。

如果需要,我可能會提供更多詳細信息。

根據這部分錯誤信息:

##[debug]Permission denied while trying to connect to the target machine <ServerOneOnSeparateDomain> on the port:5985 via power shell remoting. Please check the following link for instructions: https://go.microsoft.com/fwlink/?LinkID=390236System.Management.Automation.Remoting.PSRemotingTransportException: Connecting to remote server <ServerOneOnSeparateDomain> failed with the following error message : WinRM cannot process the request. The following error with errorcode 0x80090311 occurred while using Kerberos authentication: There are currently no logon servers available to service the logon request. 

權限被拒絕此處使用的帳戶必須具有通過Power Shell遠程連接進行連接的權限。

要在遠程計算機上建立PSSession或運行命令,用戶必須具有使用遠程計算機上的會話配置的權限。

默認情況下,只有計算機上Administrators組的成員才有權使用默認會話配置。 因此,只有Administrators組的成員才能遠程連接到計算機。

若要允許其他用戶連接到本地計算機,請向用戶授予對本地計算機上默認會話配置的“執行”權限。

以下命令打開一個屬性表,該屬性表使您可以更改本地計算機上默認Microsoft.PowerShell會話配置的安全描述符。

Set-PSSessionConfiguration Microsoft.PowerShell -ShowSecurityDescriptorUI

如果失敗,請嘗試將源添加到遠程計算機的TrustedHosts 您可以在這里http://technet.microsoft.com/en-us/library/hh847850.aspx閱讀。

如果要使用https,則需要配置WinRM來偵聽5986。

更多詳細信息,請參閱以下類似問題和教程:

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM