### Install Agent and Coordinator Example 2
Source: https://docs.incredibuild.com/win/latest/windows/silent_install.html
Example command for installing Coordinator and Agent with additional options for path, service ports, and helper ports.
```bash
{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
```
--------------------------------
### Install Agent and Coordinator Example 1
Source: https://docs.incredibuild.com/win/latest/windows/silent_install.html
Example command for installing both Agent and Coordinator components. Note: A license cannot be assigned to the Agent in the same command.
```bash
IBSetupConsole.exe /Install /Components=Coordinator,Agent /Coordinator={coord name}:31104 [General Options] /COORD:USERNAME={user name} /COORD:PASSWORD={password}
```
--------------------------------
### Install Coordinator Only Example
Source: https://docs.incredibuild.com/win/latest/windows/silent_install.html
Example command for installing only the Coordinator component with specified username and password.
```bash
{path}\ibsetup_console.exe /install /Components=Coordinator /COORD:USERNAME={user name} /COORD:PASSWORD={password}
```
--------------------------------
### Complete Incredibuild Dockerfile Example
Source: https://docs.incredibuild.com/lin/latest/linux/kubernetes.htm?TocPath=Executing+Builds%7C_____8
A full Dockerfile example demonstrating installation, agent startup, and build execution.
```dockerfile
#######################################################
# build-image.Dockerfile
#######################################################
FROM ubuntu:20.04
ARG DEBIAN_FRONTEND=noninteractive
ENV TZ=Etc/GMT
RUN apt-get update
RUN apt-get install -y gcc make git
#######################################################
# Install IB4Linux
#######################################################
ENV IB_VERSION=4.0
ENV IB_COORDINATOR=192.168.10.50
EXPOSE 8080
EXPOSE 8081
WORKDIR /root
ADD https://www.incredibuild.com/downloads/incredibuild_$IB_VERSION.run ./incredibuild.run
RUN chmod a+x ./incredibuild.run
RUN sudo ./incredibuild.run --action install --initiator enabled --coordinator-machine $IB_COORDINATOR --data-dir /etc/ --license-type SUVM
#######################################################
# Compilation step, including IB agent startup
#######################################################
CMD bash -c -x " \
/opt/incredibuild/management/set_agent_params.py max-initiator-cores 8; \
/opt/incredibuild/etc/init.d/incredibuild start; sleep 10; \
git clone https://github.com/gilnadel/Sample.git; \
cd Sample; \
ib_console -f -p gcc.xml --no-cgroups make -j 100 ALL; \ "
```
--------------------------------
### Linux Helper Startup Script (Native Install)
Source: https://docs.incredibuild.com/win/latest/windows/scaling_helpers_in_aws_ec2.html
This bash script installs Incredibuild directly on a Linux instance. It downloads the installer, makes it executable, installs necessary packages, and starts the Incredibuild service, connecting to the specified coordinator.
```bash
COORD="192.168.1.1"
cat << EOF > boot.txt
#! /bin/bash -x
curl -L https://incredibuild.com/downloads/incredibuild_4.12.0.run -o ./ibsetup.run
chmod a+x ./ibsetup.run
sudo apt-get install bzip2
sudo ./ibsetup.run --action install
--helper enabled --license-type SUVM
--data-dir /etc --coordinator-machine $COORD
sudo /opt/incredibuild/etc/init.d/incredibuild start
EOF
USERDATA=$(base64 -w 0 boot.txt)
```
--------------------------------
### API Request Example
Source: https://docs.incredibuild.com/mac/latest/mac/api_build_data.htm
Example of a GET request to the builds endpoint, including parameters for coordinator identification, versioning, and pagination.
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&nextPageToken="NjAw"
```
--------------------------------
### Run Build Cache Examples
Source: https://docs.incredibuild.com/lin/latest/linux/build_avoidance.htm
Examples of using ib_console with local and shared cache configurations.
```bash
ib_console --build-cache-local-shared --build-cache-basedir=/home/myuser/opencv make -j 40
```
```bash
ib_console --build-cache-local-shared --build-cache-service=http://192.54.11.9:8080 --build-cache-basedir=/home/myuser/opencv make -j 40
```
--------------------------------
### Example Build Process Configuration
Source: https://docs.incredibuild.com/lin/latest/linux/distribution_types_tools_processes.html?TocPath=Executing+Builds%7CCustomizing+Build+Executions+and+Adding+Custom+Tools+Using+the+ib_profile.xml+File%7C_____3
This example demonstrates how to configure different distribution types for a build script and its child processes.
```xml
```
--------------------------------
### Launch Incredibuild Container with Build Command
Source: https://docs.incredibuild.com/win/latest/windows/docker.html
This example demonstrates launching an Incredibuild container and immediately initializing a build process using MSBuild. Ensure the image name and build command are correct for your setup.
```bash
docker run --cpus 4
-e Coordinator= IncrediBuild1
-e CoordinatorPort=31104
-e BuildServicePort=31105
-e BuildHelperPort=31106
-it
-p 31105:31105/tcp
-p 31106-31109:31106-31109/tcp
incredibuild:9.4.6
MSBuild.exe MySolution.sln /t:rebuild /v:q
```
--------------------------------
### Install Docker
Source: https://docs.incredibuild.com/lin/latest/linux/helpers_with_many_cpu_cores.htm?TocPath=Installation+and+Upgrade%7C_____11
Install the Docker engine on the host machine.
```bash
sudo apt-get install docker-ce
```
--------------------------------
### Install Agent as Both Initiator and Helper
Source: https://docs.incredibuild.com/mac/latest/mac/installing_components.html
Installs an agent that functions as both an initiator and a helper. Specify the coordinator's machine details.
```bash
sudo /Volumes/Incredibuild/Incredibuild.app/Contents/MacOS/installbuilder.sh --action install --initiator enabled --helper enabled --data-dir /etc --coordinator-machine
```
--------------------------------
### Download Incredibuild Installation File
Source: https://docs.incredibuild.com/lin/latest/linux/helpers_with_many_cpu_cores.htm?TocPath=Installation+and+Upgrade%7C_____11
Fetch the Linux installation binary matching the Coordinator version.
```bash
curl -L https://incredibuild.com/downloads/incredibuild_4.18.1.run \
-o ./ib.run
```
--------------------------------
### Example Build Cache Statistics
Source: https://docs.incredibuild.com/lin/latest/linux/build_avoidance.htm?TocPath=Executing+Builds%7C_____3
An example of how to call the build cache statistics script with a specific build number.
```bash
/opt/incredibuild/management/show_build_cache_statistics.sh 45
```
--------------------------------
### Install Initiator Agent Only
Source: https://docs.incredibuild.com/mac/latest/mac/installing_components.html
Installs only the initiator agent. Requires the coordinator's IP address or DNS name.
```bash
sudo /Volumes/Incredibuild/Incredibuild.app/Contents/MacOS/installbuilder.sh --action install --initiator enabled --data-dir /etc --coordinator-machine
```
--------------------------------
### Install Build Cache Service
Source: https://docs.incredibuild.com/lin/latest/linux/build_avoidance.htm?TocPath=Executing+Builds%7C_____3
Install the Build Cache Service on a dedicated machine. Replace with the Incredibuild version and with the desired directory. Ensure is correctly set.
```bash
incredibuild-<>.run --action install --build-cache-service enabled --data-dir --coordinator-machine
```
--------------------------------
### Display Installer Help and Version
Source: https://docs.incredibuild.com/win/latest/windows/linux_installation.htm
Use the --help and --version flags to view usage information and the current installer version.
```bash
./ibsetup_v10_[build-number]_linux_x86_64.ubin --help
Usage:
ibsetup_v10_[build-number]_linux_x86_64.ubin [] | []
options:
-h, --help - show help
-v, --version - show version
operations:
ibsetup_v10_[build-number]_linux_x86_64.ubin install
ibsetup_v10_[build-number]_linux_x86_64.ubin upgrade
```
```bash
./ibsetup_v10_[build-number]_linux_x86_64.ubin --version
10.29.0
```
--------------------------------
### Match Processes Starting with 'soong' using Regex
Source: https://docs.incredibuild.com/lin/latest/linux/customize_builds_using_regex_ibprofile.html?TocPath=Executing+Builds%7CCustomizing+Build+Executions+and+Adding+Custom+Tools+Using+the+ib_profile.xml+File%7C_____5
This example uses the '^' regex to match any process whose filename starts with 'soong', applying the 'intercepted' distribution type.
```xml
```
--------------------------------
### Get Clusters with Valid API Key
Source: https://docs.incredibuild.com/win/latest/windows/build_cache_API.htm
Example of a successful GET request to retrieve cluster information when a valid API key is provided. This is the expected response for a healthy Incredibuild environment.
```json
[
{
"name": "ClusterA",
"nodes": [
{
"agentId": "AW9222_H_1_0",
"status": "online"
},
{
"agentId": "AW9222_H_1_1",
"status": "Online"
},
{
"agentId": "AW9222_H_1_2",
"status": "Online"
},
{
"agentId": "AW9222L10",
"status": "Online"
}
]
}
]
```
--------------------------------
### Specify Configuration File via Command Line
Source: https://docs.incredibuild.com/win/latest/windows/modify_settings_per_build.htm
This example shows how to use a configuration file by specifying its path directly in the build command. This method is useful when automatic detection is not desired or supported.
```bash
@..\configx64.rsp
```
--------------------------------
### Install Secondary Coordinator
Source: https://docs.incredibuild.com/lin/latest/linux/installing_components.html
Sets up a secondary coordinator instance that connects to the primary coordinator.
```bash
sudo ./incredibuild-.run --action install --secondary-coordinator enabled --data-dir --coordinator-machine
```
--------------------------------
### Handle Invalid Cluster Name Error (GET)
Source: https://docs.incredibuild.com/win/latest/windows/build_cache_API.htm
This example shows the response when a GET request is made with an invalid cluster name. It returns a 404 status code indicating that the specified cluster was not found.
```JSON
{
"statusCode": 404,
"timestamp": "2025-11-19T09:46:33.432Z",
"path": "/api/buildcache/clusters/InvalidCLuster/nodes?coordinatorId=155B2F53-0834-4C21-B367-5C3E13FCE685&version=1.5.0",
"message": "Invalid parameters",
"ibErrorCode": 9600
}
```
--------------------------------
### Install Initiator and Helper Agent Only
Source: https://docs.incredibuild.com/lin/latest/linux/installing_components.html
Configures a machine as an initiator and helper agent, connecting it to an existing primary coordinator.
```bash
sudo ./incredibuild-.run --action install --initiator enabled --helper enabled --data-dir --coordinator-machine
```
--------------------------------
### Dockerfile for Incredibuild Agent
Source: https://docs.incredibuild.com/win/latest/windows/docker.html
Example Dockerfile configuration to install the Incredibuild Agent component and connect it to a Coordinator.
```dockerfile
FROM mcr.microsoft.com/windows/server:ltsc2022
RUN mkdir C:\\Installers
#assumes your Incredibuild installer file is called ibsetup.exe
COPY ibsetup.exe . C:\\Installers\\
RUN C:\\Installers\\ibsetup.exe / # Run IncrediBuild console installer.
&& /install /
&& /installdir="C:\IncrediBuild\InstallDir" / # Set installation directory.
&& /components=agent / # Install Agent component only.
&& /coordinator=192.168.10.10:31104 / # Connect to the Coordinator in IP address 192.168.10.10, that is listening on port 31104.
&& /agent:serviceport=31105 / # Set BuildService port.
&& /agent:helperport=31106 # Set BuildHelper(s) port(s), according to the allocated CPUs for the container, which is automatically detected by the installer.
&& /agent:agentrole=Initiator # Install Agent component only.
&& /agent:initiatorType=floating # Ask for floating initiator license when connecting to the grid
RUN mkdir C:\\BuildTools
WORKDIR C:\\BuildTools
COPY C:\Path\To\Host\BuildToolsDirectory . # (import build tools and necessary binaries)
```
--------------------------------
### Retrieve Build History Data
Source: https://docs.incredibuild.com/lin/latest/linux/api_build_data.htm
Examples of GET requests to the Build History API with different filtering parameters.
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0
```
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&buildStartTimeFrom=2023-08-17T16:01:29.000Z
```
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&buildGroup=Default
```
--------------------------------
### Example Set Build Priority Request
Source: https://docs.incredibuild.com/win/latest/windows/api_assign_priority.htm
This is an example POST request to set the build priority for agents. Ensure your Coordinator IP Address, Port, and Coordinator ID are correctly specified.
```http
POST https://coordmachinename:8000/api/agents/setBuildPriority?coordinatorId=0F0ZY79D-3D7B-4DC6-2C2E-90D1DF0AD24E&version=1.5.0
```
--------------------------------
### Retrieve Build History Data
Source: https://docs.incredibuild.com/lin/latest/linux/api_build_data.htm?TocPath=API+Reference%7C_____4
Examples of GET requests to the Build History API with various filtering and pagination parameters.
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0
```
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&buildStartTimeFrom=2023-08-17T16:01:29.000Z
```
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&buildGroup=Default
```
```http
GET https://10.132.15.166:8000/api/builds?coordinatorId=12345&version=1.5.0&nextPageToken=""
```
--------------------------------
### Get Maximum Helper Cores
Source: https://docs.incredibuild.com/lin/latest/linux/cli.htm
Views the maximum number of local cores an agent can utilize when starting a new build. This setting affects build performance.
```bash
/opt/incredibuild/management/get_agent_params.py max-helper-cores
```
--------------------------------
### Run 3.x Installation with Flags
Source: https://docs.incredibuild.com/lin/latest/linux/upgrade.html
Execute the 3.x installation file with root permissions. Use the -P flag to pre-approve the EULA and the -T flag to opt-out of data collection.
```bash
sudo ./incredibuild_.ubin upgrade -P
```
--------------------------------
### Get Cluster Log Level
Source: https://docs.incredibuild.com/win/latest/windows/build_cache_API.htm
Example request and response for retrieving the current log level of a specific cluster. The response indicates the active log level setting.
```json
{
"level": "Intermediate"
}
```
--------------------------------
### Get Minimum Local Helper Cores
Source: https://docs.incredibuild.com/lin/latest/linux/cli.htm
Retrieves the minimum number of local cores required for an agent to start a new build. This ensures sufficient resources are available.
```bash
/opt/incredibuild/management/get_agent_params.py min-local-cores
```
--------------------------------
### Get Clusters with Invalid API Key
Source: https://docs.incredibuild.com/win/latest/windows/build_cache_API.htm
Example response when an invalid API key is provided for accessing cluster information. This error signifies that the provided key does not match any valid credentials.
```json
{
"statusCode": 401,
"timestamp": "2025-11-19T09:29:52.652Z",
"path": "/api/buildcache/clusters?coordinatorId={coordID}&version=1.5.0",
"message": "API key provided is invalid",
"ibErrorCode": 2006
}
```
--------------------------------
### Get Clusters with Missing API Key
Source: https://docs.incredibuild.com/win/latest/windows/build_cache_API.htm
Response example when attempting to access cluster information without providing the required API key. This indicates an authentication failure due to a missing credential.
```json
{
"statusCode": 401,
"timestamp": "2025-11-19T09:29:07.607Z",
"path": "/api/buildcache/clusters?coordinatorId={coordID}&version=1.5.0",
"message": "API key not provided",
"ibErrorCode": 1002
}
```
--------------------------------
### Run BuildConsole with /command
Source: https://docs.incredibuild.com/win/latest/windows/running_from_command_line.html
Use the /command switch to specify the original build command line you want to accelerate. Ensure build tools are installed on the initiating machine.
```bash
BuildConsole /command=" " [Options]
```
--------------------------------
### Execute Build with Remote Logging
Source: https://docs.incredibuild.com/lin/latest/linux/log_location.htm?TocPath=Executing+Builds%7C_____11
Example commands to configure the mount directory and trigger a build with a specific remote log path.
```bash
/opt/incredibuild/management/set_agent_params.py log-mount-directory /mnt/incredibuild
ib_console --log-remote-path sprint22/Build123 make -j 100
```
--------------------------------
### Install Primary Coordinator with Initiator and Helper Agents
Source: https://docs.incredibuild.com/lin/latest/linux/installing_components.html
Deploys a primary coordinator along with initiator and helper agent roles on a single machine.
```bash
sudo ./incredibuild-.run --action install --coordinator enabled --initiator enabled --helper enabled --data-dir --accept-eula true
```
--------------------------------
### CLI Installation Command
Source: https://docs.incredibuild.com/win/latest/windows/linux_installation.htm
Installs the Incredibuild Build Cache service on Linux using the standalone installer.
```APIDOC
## INSTALL ./ibsetup_v10_[build-number]_linux_x86_64.ubin install
### Description
Installs the Build Cache service on a Linux endpoint.
### Parameters
#### Options
- **-P, --accept-eula** (flag) - Optional - Agree to the EULA.
- **-A, --data-dir** (path) - Required - Directory for IB data.
- **-O, --incredibuild-manager-host** (string) - Required - IP or hostname of Incredibuild Manager.
- **-L, --incredibuild-manager-port** (port) - Optional - Port of Incredibuild Manager (Default: 8000).
- **-Q, --build-cache-max-size** (size) - Optional - Maximum cache size in GB (Default: 50).
- **-G, --build-cache-location** (path) - Optional - Directory for Build Cache (Default: /etc/incredibuild_build_cache/build_cache).
- **-S, --build-cache-service-port** (port) - Optional - Port of Build Cache Endpoint (Default: 51100).
```
--------------------------------
### Onboard to Azure Cloud (Windows)
Source: https://docs.incredibuild.com/cloud/cloud_cli.html
Use this command to onboard to Azure using the Incredibuild CLI on Windows. Provide your cloud user credentials, policy path, and Azure-specific details like Tenant ID and App ID.
```bash
ibc-cli-windows.exe -action=ONBOARD -os=windows -cloudUser= -cloudPass= -policy= -coordMachine= -coordPort= -coordUser= -coordPass= -vendor=AZURE -certificate= -privateKey= -azureTenant= -azureAppId= -azureSecret=
```
--------------------------------
### Repair Incredibuild Installation
Source: https://docs.incredibuild.com/win/latest/windows/silent_install.html
Repairs an existing Incredibuild installation.
```bash
IBSetupConsole.exe /repair
```
--------------------------------
### Example Set Build Priority Response
Source: https://docs.incredibuild.com/win/latest/windows/api_assign_priority.htm
The response indicates the status of the build priority update for each agent. 'OK' signifies a successful update.
```json
[
{
"agentName": "agent007",
"status": "OK"
},
{
"agentName": "agent006",
"status": "OK"
}
]
```
--------------------------------
### Installer Parameters
Source: https://docs.incredibuild.com/win/latest/windows/silent_install.html
Detailed explanation of the parameters available for the Incredibuild Automated Installer.
```APIDOC
## Parameters
### Flags
- **/install**: Defines the action as Installation. To uninstall, repair, or update, see the relevant sections.
- **/components**: Defines what components to install. Accepts `agent`, `coordinator`, or `agent,coordinator`.
- **/Coordinator**: The IP address or hostname of the associated Coordinator. Mandatory for installing an Agent and a Backup Coordinator. If the Coordinator uses a non-default port (31104), specify as `"Coordinator_Name:Port_No."`, e.g., `"192.100.00.01:12345"`.
- **/Coord:Backup**: Use this flag to indicate that the Coordinator being installed is a backup coordinator.
- **/help**: View usage information and full list of flags.
### General Options
- **/AddToPath={ON|OFF}**: Controls whether the Incredibuild installation folder is added to the system search path. Default: `ON`.
- **/InstallDir={Install dir path}**: Allows manual specification of the Incredibuild installation folder. Default: `C:\Program Files (x86)\Incredibuild`.
### Agent Options
- **/Agent:AutoSelectPorts={ON|OFF}**: Controls whether setup automatically selects TCP/IP ports for the Agent Service and Helper cores. If `ON`, manual port specification is overridden. **Limitation:** Requires manual opening of all required ports. Not compatible with `/Agent:OpenFirewall`.
- **/AGENT:BUILDCACHEENDPOINT=OFF**: When configured, the Build Cache service is not started automatically.
- **/AGENT:BUILDCACHECLUSTER={Cluster name}**: Specifies the Build Cache cluster. Cannot be combined with a remote server.
- **/AGENT:BUILDCACHELOCAL={ON|OFF}**: Controls whether to use local Build Cache. Not supported for 32-bit Windows.
- **/AGENT:BUILDCACHEREADONLY={ON|OFF}**: Controls whether to use Build Cache in read-only mode.
- **/AGENT:BUILDCACHEREMOTESERVER={server:port}**: Specifies the Build Cache remote server and port. Cannot be combined with a cluster.
- **/Agent:FILECACHE={Number in MBs}**: Allows manual specification of the maximum size of the Agent file cache folder in MBs. Default: `4096`.
- **/Agent:Group={Build Group name}**: Assigns an Agent to a Build Group during installation. If the group does not exist, it will be created. Default: `Default Build Group`.
- **/AGENT:HELPERASSIGNMENTPRIORITY**: Sets the Helper assignment priority. Lower values increase the likelihood of the helper being used. Default: `3`.
- **/Agent:HelperPort={Port no.}**: Allows manual specification of the Agent Helper port for communication between an Initiator and Helper cores. Effective only if `/Agent:AutoSelectPorts` is `OFF`. Default: `31106`.
- **/Agent:InstallAddins={ON|OFF}**: Controls whether to install Incredibuild Add-ins/Extensions in the Visual Studio IDE. Default: `ON`.
- **/Agent:OpenFirewall={ON|OFF}**: Controls whether setup opens Agent ports in the Windows Firewall. **Limitation:** Should not be used with `/Agent:AutoSelectPorts`. Default: `ON`.
- **/Agent:ServicePort={Port no.}**: Allows manual specification of the Incredibuild Agent Service port for communication with the Coordinator. Effective only if `/Agent:AutoSelectPorts` is `OFF`. Default: `31105`.
- **/Agent:AgentRole={Helper/Initiator/Helper,Initiator}**: Indicates the type of the Agent license.
- **/Agent:InitiatorType={Fixed/Floating/CI_Fixed/CI_Floating}**: Defines the license type of the Initiator. Default: `Fixed`.
- **/Agent:HelperType={Fixed/Floating}**: Defines the license type of the helper. Default: `Fixed`.
- **/Agent:HelperCores={#|%}**: Limits the number of cores used when the agent is helping build distribution. Can be a real number or a percentage.
- **/Agent:Description**: Sets a description for the agent.
```