執行自動安裝

Azure DevOps Server 2022 |Azure DevOps Server 2020 |Azure DevOps Server 2019

透過自動安裝,您可以事先預設Azure DevOps Server實例的所有組態參數。 當您熟悉Azure DevOps Server組態程式,並將 Azure DevOps 部署到多部電腦環境時,tfsconfig 自動命令特別有用。

例如,許多大規模的企業系統都有數部指定用來建置的伺服器。 自動安裝可讓系統管理員在這些電腦上快速啟動 Team Build 安裝程式,而不需要個別監督每一個。 此外,由於每個組建伺服器的組態可能幾乎或完全相同,因此應該可以輕鬆地快速設定每部電腦的組態參數。

重要

本文說明tfsconfig 自動安裝命令的使用方式,以在 Azure DevOps Server 2019 上執行自動安裝。 雖然舊版 Team Foundation Server 的步驟類似, 但 tfsconfig 自動 命令的語法已變更。 如需詳細資訊,請從 TFSConfig 自動選取您想要的文章版本。

使用 自動 命令來執行下列類型的安裝:

  • 新的單一伺服器或多伺服器安裝
  • 升級
  • 生產前升級
  • 設定新的應用層
  • 複製現有的部署
  • 設定版本控制 Proxy 伺服器

如需 tfsconfig 自動 安裝命令語法使用方式的詳細資訊,請參閱 使用 TFSConfig 來管理 Azure DevOps 內部部署、自動安裝

Prerequisites

  1. 準備符合 系統需求的單一電腦。

  2. 如果您不打算使用 SQL Server Express,請設定支援的 SQL Server 版本。 當您為 Azure DevOps 內部部署設定SQL Server時,至少會安裝 Database Engine,並Full-Text和搜尋功能的語意擷取。

    建議您只針對個人或評估部署使用SQL Server Express。 Azure DevOps 內部部署的付費複本包含SQL Server Standard授權。 如需詳細資訊,請參閱Azure DevOps Server定價。 如果您使用包含的授權,則只能用於使用這些產品建立的資料庫。

  3. 您用來設定安裝的帳戶必須是SQL Server 中系統管理員伺服器角色的成員。

    注意

    在內部部署安裝 Azure DevOps 牽涉到一組需要高度許可權的作業。 這些作業包括建立資料庫、為服務帳戶布建登入等等。 技術上,所有必要的是:

    • serveradmin 角色的成員資格。
    • ALTER ANY LOGIN、CREATE ANY DATABASE 和 VIEW ANY DEFINITION 伺服器範圍許可權。
    • 對 master 資料庫的 CONTROL 權限。
      系統管理員伺服器角色中的成員資格會授與所有這些成員資格和許可權。 這是確保設定成功最簡單的方式。 如有必要,您可以在安裝之後撤銷這些成員資格和許可權。
  4. 若要支援 搜尋 延伸模組的安裝和設定,您必須提供使用者名稱和密碼。 安裝和設定 搜尋 支援程式碼、工作專案和 Wiki 搜尋功能。 如需詳細資訊,請參閱 設定搜尋

    注意

    搜尋也需要 Oracle Server JRE 8 (Update 60 或更高版本) 。 您可以接受 Server JRE 的 Oracle 二進位碼授權合約,然後選取 [ 設定],以下載並安裝或更新至最新版本。 請注意,這會將JAVA_HOME環境變數設定為指向 JAVA 安裝目錄,而且伺服器 JRE 不提供自動更新。

  5. 設定應用層時,您可以選擇網站設定。 檢閱 網站設定 以瞭解選擇和需求。

支援的安裝

自動安裝功能支援組態精靈支援的所有相同安裝類型,並包含相同組態參數的欄位。 在大部分情況下,自動安裝的每個組態類型名稱都會鏡像精靈中的名稱。

以下是自動設定類型的名稱和描述清單:

InstallType 描述
NewServerBasic 設定Azure DevOps Server的基本開發服務。 這包括Azure Boards (工作追蹤) Azure Repos (原始檔控制) 、Azure Pipelines (建置和發行) ,以及選擇性地搜尋。
NewServerAdvanced 設定基本的開發服務,並允許選擇性設定與Reporting Services整合。
升級 從支援的舊版升級Azure DevOps Server至目前版本。
PreProductionUpgrade 在生產前環境中,測試現有Azure DevOps Server部署的升級。 這通常是使用從生產備份還原的資料庫來完成。 此案例包含額外的步驟,以確保新的部署不會干擾生產部署。
ApplicationTierOnlyBasic 使用所提供組態資料庫的現有設定,設定新的應用層。 此選項可讓您使用現有的設定快速啟動並執行新的應用層。 如果您想要變更現有設定的能力,請改用進階 ApplicationTierOnlyAdvanced 類型。
ApplicationTierOnlyAdvanced 使用所有設定的完整控制權來設定新的應用層。 設定預設為所提供組態資料庫的現有值。 如果您想要保留所有現有的設定,請改用 ApplicationTierOnlyBasic 類型。
複製 設定新的Azure DevOps Server部署,這是現有部署的複製品。 這通常是使用從生產備份還原的資料庫來建立環境,其中可以測試組態變更、延伸模組和其他修改。 此案例包含額外的步驟,以確保新的部署不會干擾生產部署。
Proxy 設定版本控制 Proxy 服務。

重要

執行設定之前,您必須確定您有資料庫的目前備份,然後覆寫 'ConfirmBackup',讓 'ConfirmBackup=True'。 否則,將不會執行組態。

不支援的情節

自動安裝僅適用于內部部署案例。 自動安裝不支援下列案例:

  • 雖然設定精靈可以安裝指向 Azure 資料庫的建置和 Proxy 實例,但命令列不會實作這項功能, (沒有位置提供 Azure 雲端儲存體帳戶資訊) 。
  • 自動安裝適用于 Azure DevOps Server Express;不過,只有 'build' 和 'basic' ('SqlInstance=SqlExpress') 組態類型將會成功。 自動安裝將會封鎖無法在 Express SKU 上安裝的組態類型,例如 'spinstall、'spextensions'和 'proxy',而且會引發 'atonly' 和 'Standard' 組態類型的錯誤,因為 Azure DevOps Server Express 只與 SQL Express 相容。
  • 目前不支援跨機器重複使用自動組態檔,因為組態檔在特定預設參數值中使用機器名稱。 我們計畫在未來改善這項功能。 同時,使用者可以撰寫自己的腳本,以動態切換其組態檔中的電腦名稱稱,以符合其需求。

下載並安裝

  1. 透過下列其中一個通道下載Azure DevOps Server:

  2. 執行無訊息安裝。

     azuredevopsserver2019.1_rc1.exe /Silent
    

    或者,以無訊息方式安裝快速版本。

     devopsexpress2019_rc1.exe /Silent
    

    安裝程式會將檔案複製到您的電腦。

  3. 查看 C:\Program Files\Azure DevOps Server 2019 資料夾來確認安裝。

    已安裝的伺服器檔案資料夾

  4. 您可以選擇 [ 開始精靈],或使用自動安裝結束並設定來設定安裝。

此時,您已在電腦上安裝位,但未設定Azure DevOps Server。 若要執行自動設定,您需要建立 ini 檔案,然後使用該 ini 檔案設定電腦 (s) 。

建立 ini 檔案

/create命令選項會產生組態檔,然後您可以修改或執行 以設定伺服器實例。

若要啟動,請開啟命令提示字元以系統管理員身分執行,並變更為 /Tools 目錄

在這裡,我們會執行 /create 命令,並指定要建立之檔案的安裝和名稱類型。

C:\Program Files\Azure DevOps Server 2019\Tools>
tfsconfig unattend /create /type:NewServerBasic /unattendfile:basic.ini

完成時,在文字編輯器中開啟.ini檔案。 它看起來與接下來所列的類似。 自動產生的完整批註basic.ini檔案會指定執行下列工作:

  • Scenario=NewServerBasic
  • InstallSqlExpress=False
  • SqlInstance=MININT-O0VPFCK\SqlExpress
  • UseExistingEmptyDatabase=False
  • CreateConfigurationDatabase=True
  • StartTrial=False
  • DatabaseLabel=
  • ServiceAccountName=NT AUTHORITY\NETWORK SERVICE
  • LCID=1033
  • WebSiteVDirName=
  • SiteBindings=HTTP:*:80:
  • PublicUrl=http://minint-o0vpfck/
  • FileCacheFolder=C:\AzureDevOpsData\ApplicationTier_fileCache
  • SmtpEmailEnabled=False
  • EnableSshService=True
  • SshPort=22
  • ConfigureSearch=False
  • InstallSearchService=True
  • CreateInitialCollection=True
  • CollectionName=DefaultCollection
  • CollectionDescription=
  • UseExistingEmptyCollectionDatabase=False
[Configuration]
Activity=Microsoft.TeamFoundation.Admin.ServerConfigurationActivity

Assembly=Microsoft.TeamFoundation.Admin, Version=17.0.0.0, Culture=neutral, PublicKeyToken=b03f5f7f11d50a3a

; You can submit information about your Azure DevOps Server configuration and administration experience to Microsoft.
SendFeedback=True

; One of the following configuration Scenarios:
; 
; NewServerBasic:               Configure a new server with only the essential services.
; NewServerAdvanced:            Configure a new server with essential and other optional features.
; NewServerAzure:               Configure a new server with Azure SQL integration.
; ProductionUpgrade:            Upgrade an existing production server.
; PreProductionUpgrade:         Perform a pre-production upgrade using backed up production databases.
; ApplicationTierOnlyBasic:     Basic application tier-only configuration using existing settings.
; ApplicationTierOnlyAdvanced:  Application tier-only configuration that allows full setting customization.
; Clone:                        Create a new deployment from an existing deployment.
; 
Scenario=NewServerBasic

; Whether SQL Express will be installed as part of configuration
InstallSqlExpress=False

; Provide the configured SQL instance in the form of Server,  ServerName\InstanceName or Server,Port
SqlInstance=MININT-O0VPFCK\SqlExpress

; You can elect to create an existing set of empty databases (Tfs_<label>Configuration, Tfs_<label>Warehouse and Tfs_<label>Analysis)
UseExistingEmptyDatabase=False

; Determines whether a configuration database will get created
CreateConfigurationDatabase=True

; Database label controls the names of the configuration databases.  Database name will be Tfs_<label>Configuration, Tfs_<label>Warehouse and Tfs_<label>Analysis
DatabaseLabel=

StartTrial=False

; Boolean to determine whether the account is a built-in account
IsServiceAccountBuiltIn=True

; Account that the Azure DevOps web site will run as.  On a domain joined machine, this can be a domain account or NT Authority\Network Service.  On a workgroup machine, it can be a local account or NT Authority\Local Service
ServiceAccountName=NT AUTHORITY\NETWORK SERVICE

; The LCID to use for this Azure DevOps Server installation.
LCID=1033

; The host name portion of the web site URL.  This is typically the machine name but can be customized for more advanced scenarios such as HTTPS or NLB
UrlHostNameAlias=MININT-O0VPFCK

; The web site virtual directory name can be either empty or up to 8 alphanumeric characters.
WebSiteVDirName=

; 
; SiteBindings is a semi-colon separated list of bindings, each of which consists
; of 4 or 6 parts (4 for http, 6 for https):
; 
; [http|https]:[ipaddress]:[port]:[host]:[certificateStore]:[certificateThumprint|"generate"]
; 
; Examples:
; http:*:80:
; 
; A single http binding on port 80, for all unassigned IP addresses, with no host header
; 
; https:*:443:contoso.com:My:generate
; 
; A single https binding on port 443, for all unassigned IP addresses, having a host header 'contoso.com',
; including a generated self-signed certificate that will be stored in the Personal store
; on the local machine.
; 
; http:*:80:;http:*:8082:
; 
; Two bindings separated by a semi-colon
; 
; https:*:443:contoso.com:My:‎169CE0BCCECBD854321A61670413F8000A798F31
; 
; A single https binding on port 443 with a certificate thumbprint.
; Azure DevOps will look for the thumbprint in the Personal store for the local
; machine.
; 
SiteBindings=http:*:80:

; The Public URL is the primary URL that users specify to connect to the system and is the URL used in the text of e-mail alerts.
PublicUrl=http://minint-o0vpfck/

; The Windows file system folder used by Azure DevOps Server to cache data.
FileCacheFolder=C:\AzureDevOpsData\ApplicationTier\_fileCache

; Determines if Email notifications will be enabled.
SmtpEmailEnabled=False

; Determines if SSH service will be enabled.
EnableSshService=True

; The port used by the SSH service.
SshPort=22

; Configure Search in Azure DevOps deployment.
ConfigureSearch=False

; You can select to install new search service or use an existing search service
InstallSearchService=True

; Determines whether an initial collection will be created.  This can be disabled for advanced scenarios such as different SQL instances by using the create collection wizard in the administration console after configuring the server.
CreateInitialCollection=True

; The name of the collection
CollectionName=DefaultCollection

; The description for the collection
CollectionDescription=

UseExistingEmptyCollectionDatabase=False


執行組態

當您執行自動安裝時,程式會執行與設定精靈相同的驗證檢查,然後在電腦上設定指定的Azure DevOps Server實例。

您可以使用下列兩種方式之一來執行 /configure 命令。 第一個和建議選項會使用您在上一個步驟中建立的 ini 檔案。 第二個選項會指定要執行的安裝類型,然後指定要覆寫智慧型預設值的輸入。 每個選項互斥。 您無法同時指定檔案和類型。

/configure命令的兩種基本形式如下:

選項 1

tfsconfig unattend /configure /unattendfile:<file> [/inputs:<inputs>] [/verify] [/continue]

選項 2

tfsconfig unattend /configure /type:<type> [/inputs:<inputs>] [/verify] [/continue]

如需 tfsconfig 自動安裝 命令語法使用方式的相關資訊,請參閱 使用 TFSConfig 管理 Azure DevOps 內部部署自動安裝

注意

如果您選擇執行 /configure 命令,而不先建立 ini 組態檔來管理輸入,建議您先執行 /verify ,再繼續進行完整的設定。

安裝完成後,您可以在下列位置存取Azure DevOps Server:

http://<localhostname>:8080/tfs

或者,針對 Express Server,位於:

http://<localhostname>

下一步