静默安装

Incredibuild 静默安装下,您可以使用命令行安装 Incredibuild 组件。如果要在多台机器上安装 Incredibuild,或者不希望用户知道 Incredibuild 的安装,这种类型的安装将特别有用。

您可以使用 Incredibuild 设置向导生成一个 Automated Installer 文件,并使用下面指定的语法运行该文件。

从版本 10.2 及更高版本开始,您只能生成一个自动 Installer 文件来安装 Incredibuild Agents。如果您希望通过 Automated Installer 来安装 Coordinator,请点击此处下载 Installer。

正在生成 Silent Installer 文件

  1. 运行 Incredibuild 设置文件。

  2. Setup Options 页面,选择 Create Silent Installation File

  3. 点击 Save As 并指定所需的位置。

运行 Automated Installer

注意: 自动安装程序必须以管理员身份从 CMD 运行。

自动安装程序使用以下一般语法:

IBSetupConsole.exe /Install /Components={Component Name(s) - Comma Separated} /Coordinator={Coordinator IP Address/Hostname} [General Options] [Agent and Coordinator Options]

参数 描述 默认值
标记
/install 这个标志将行动定义为安装。要卸载、修复或更新,请参见以下章节。  
/components

定义您要安装哪些组件。可以是Agent、Coordinator 或 Agent 和 Coordinator 两个同时安装。

 
/Coordinator

相关 Coordinator 的 IP 地址或主机名。安装 Agent 和 Backup Coordinator 时必选。

如果 Coordinator 不使用默认端口号 (31104),则应将端口添加至 Coordinator 名称并将它们放到引号中,格式为:"Coordinator_Name:Port_No."。例如,"192.100.00.01:12345"。

 
/Coord:Backup 使用这个标志表示您要安装的 Coordinator 是一个备份 Coordinator。  
/help 查看使用信息和完整的标志列表  
通用选项
/AddToPath={ON|OFF} 控制是否将 Incredibuild 安装文件夹添加至系统搜索路径。 ON
/InstallDir={Install dir path} 允许手动指定 Incredibuild 安装文件夹。 C:\Program Files (x86)\Incredibuild

Agent 选项

/Agent:AutoSelectPorts={ON|OFF}

控制设置是否应为 Agent Service 和 Helper 内核自动选择第一个可用的 TCP/IP 端口。如果此选项为 ON,则将覆盖任何手动指定的端口。

限制性: 该选项要求您手动打开所有需要的端口 。当使用 /Agent:OpenFirewall 标志时,不支持使用 /Agent:AutoSelectPorts 标志。

OFF
/Agent:FILECACHE={Number in MBs} 允许手动指定 Agent 文件缓存文件夹的最大尺寸(以 MB 为单位)。 4096
/Agent:Group={Build Group name} 在安装过程中将 Agent 分配至 Build Group。如果您指定的名称不存在,将创建 Build Group。 默认 Build Group
/Agent:HelperPort={Port no.} 允许手动指定 Initiator 和 Helper 内核之间通信所需的 Agent Helper 端口。此手动指定仅在 /Agent:AutoSelectPorts 选项为 OFF 的情况下生效。 31106
/Agent:InstallAddins={ON|OFF} 控制安装程序是否也应在 Visual Studio IDE 中安装 Incredibuild Add-in/Extension。 ON
/Agent:OpenFirewall={ON|OFF}

控制设置是否应在 Windows Firewall 中打开 Agent 端口。

限制性: 此选项不应该与 /Agent:AutoSelectPorts 一起使用。在这种情况下,Incredibuild 并不知道哪些端口是需要的,您需要手动打开防火墙上所有需要的端口

ON
/Agent:ServicePort={Port no.} 允许手动指定与 Coordinator 通信所需的 Incredibuild Agent Service 端口。此手动指定仅在 /Agent:AutoSelectPorts 选项为 OFF 的情况下生效。 31105
/Agent:AgentRole={Helper/Initiator/Helper,Initiator}

表示 Agent 许可证的类型。

 

/Agent:InitiatorType={Fixed/Floating/CI_Fixed/CI_Floating}

定义启动器的许可类型。

Fixed

/Agent:HelperType={Fixed/Floating}

定义 helper 的许可类型。

Fixed

/Agent:HelperCores={#|%}

限制 agent 可用于协助工作负载分配的核心数量。可以用实际的核数或总核数的百分比来指定。

 

/Agent:Description

 

 

/Agent:SSLKey="{path to .key file}"

如果您正在使用 SSL,则为应用于 Agent 上的密钥路径。

不支持使用 UNC(例如 \\remote_machine\certs\coordinator.crt)从远程计算机导入文件。

 

/Agent:SSLCer="{path to .crt file}"

如果您正在使用 SSL,则为应用于 Agent 上的证书路径。

不支持使用 UNC(例如 \\remote_machine\certs\coordinator.crt)从远程计算机导入文件。

 

/Agent:BuildCache=on

向 Initiator Agent 分配 Build Cache 许可证。使用默认设置将 Agent 启用为 Build Cache 端点。

 

/Agent:BuildCacheServicePort={port number}

定义 Build Cache 端点端口的值。

51100

/Agent:DbLocation="{path}"

用于 Build Cache 的数据库。如果未指定,则默认数据库将在安装过程中自动安装在每个 Initiator 上。或者,您可以指定任何 Redis 数据库位置。如果数据库需要证书,可在 Agent Settings > Build Cache 中指定。

 

/Agent:CacheDirectoryLocation="{path}"

文件夹位置将包含 Build Cache 文件。如果文件夹需要证书,可在 Agent Settings > Build Cache 中指定。

 

/Agent:MaxFileCacheSize={#}

Build Cache 文件夹的最大大小。

 

Coordinator 选项

/coord:username={user name}

访问 Coordinator 的用户名。需要清洁的安装文件(不是修复)。用户名必须在 4-20 个字符之间,并且不能包含空格或特殊字符。

 

/coord:password={password}

访问 Coordinator的密码,需要清洁的安装文件(不是修复)。密码必须至少有 8 个字符,至少有一个大写字母和一个特殊字符。但是,密码不能包含字符 ^

 

/coord:OpenFirewall={ON|OFF} 控制设置是否应在 Windows Firewall 中打开 Coordinator 服务端口。 ON
/coord:DatabaseDir Coordinator 数据库目录。  
/coord:ServicePort={Port no.} 定义 Agent Communications 端口的值。 31104
/coord:IncredibuildManagerPort={Port no.} 定义 Incredibuild Manager 端口的值。 8000
/coord:messagetransport={Port no.}

定义 Message Transport 端口的值。

5672

/coord:CoordApiPort={Port no.} 定义 Coordinator Service 端口的值。 31100
/License:OpenFirewall={ON|OFF} 控制设置是否应在 Windows Firewall 中打开 Agent 端口。 ON
/License:ServicePort={Port no.} 允许手动指定许可服务端口。这是与许可证服务进行通信的必要条件。 50052
/coord:sslkey="{path to .key file}"

如果您正在使用 SSL,则为应用于 Coordinator 上的密钥路径。

 

/coord:sslcer="{path to .crt file}"

如果您正在使用 SSL,则为应用于 Coordinator 上的证书路径。

 

/accept_eula

安装或升级 Coordinator 时,此标志将自动接受最终用户许可协议 (EULA)。如果不添加此标志,系统会在命令行中提示您手动接受 EULA。

 

示例

仅限安装 Coordinator

{path}\ibsetup_console.exe /install /Components=Coordinator /COORD:USERNAME={user name} /COORD:PASSWORD={password}

安装 Agent 和 Coordinator

注意: 如果您使用同一命令安装 Agent 和 Coordinator,则不能在同一命令中为 Agent 分配许可证。

示例 1

IBSetupConsole.exe /Install /Components=Coordinator,Agent  /Coordinator={coord name}:31104 [General Options] /COORD:USERNAME={user name} /COORD:PASSWORD={password}

示例 2

{path}\ibsetup_console.exe /install /Components=Coordinator,Agent /ADDTOPATH=ON /COORD:USERNAME={user name} /COORD:PASSWORD={password} /AGENT:SERVICEPORT=25000 /AGENT:HELPERPORT=25001 /COORD:SERVICEPORT=25002

只安装 Agent

注意: 如果您在安装命令中分配一个许可证,请确保协调员中的许可证是可用的。

Helper Fixed

{path}\ibsetup_console.exe /install /Components=agent /Agent:AgentRole=Helper /Agent:HelperType=Fixed /Agent:HelperCores=4 /COORDINATOR={coord name}:31104

Helper Fixed 百分比

{path}\ibsetup_console.exe /install /Components=agent /Agent:AgentRole=Helper /Agent:HelperType=Fixed /Agent:HelperCores=25% /COORDINATOR={coord name}:31104

安装 Agent Helper Floating

{path}\ibsetup_console.exe /install /Components=agent /Agent:AgentRole=Helper /Agent:HelperType=Floating /Agent:HelperCores=4 /COORDINATOR={coord Name}:31104

仅安装 Agent 的 Initiator Fixed

{path}\ibsetup_console.exe /install /Components=agent /Agent:AgentRole=Initiator /Agent:InitiatorType=Fixed /COORDINATOR={coord name}:31104

卸载 Incredibuild,升级至新版本或修复现有安装

如要静默卸载 Incredibuild,升级至新软件版本或修复现有安装,可运行 Automated Installer 和相应的命令行选项:

如需卸载 Incredibuild:

IBSetupConsole.exe /uninstall

如需升级 Incredibuild:

IBSetupConsole.exe /update

您可以使用上面的一些 Agent 选项 标志来修改升级命令,但以下情况除外

  • /Agent:SSLCer

  • /Agent:SSLKey

  • /Agent:HelperType

  • /Agent:InitiatorType

  • /Agent:AgentRole

  • /Agent:BuildCache

如需修复 Incredibuild 安装:

IBSetupConsole.exe /repair