Skip to main content

Configuring runner pools for self-hosted builds

Abstract

Running Bitrise on self-hosted infrastructure requires setting up agent pools in your Bitrise Workspace. This reserves build agents for use in your self-hosted builds, and provides a token to authenticate the agent to Bitrise.

You can run Bitrise builds on hardware you control. We offer two different options:

Both options require setting up runner pools in your Bitrise Workspace. This reserves build runners for use in your self-hosted builds. Each reserved pool comes with a unique token: this token is required for both an AWS EC2 instance and the on-premise runner to be able to connect to your Bitrise Workspace and run builds of the apps owned by the Workspace. You can configure and run these builds from the Workflow Editor, as any other build.

To do so:

  1. Log in to Bitrise and hover over the left navigation bar.

  2. Make sure you have the right Workspace selected.

  3. Select Settings.

    workspace-settings-new.png
  4. On the left, select Self-hosted infrastructure.

  5. In the Runner pools section, click Add new.

    agent-pools-overview.png
  6. Type a name into the Name field then click Next.

    agent-token.png
  7. You will receive a token. Copy this token: you will need it for authentication.

  8. Open the app you need on Bitrise and click Workflows.

  9. Click Edit bitrise.yml to go the Workflow Editor, and select Stacks & Machines on the left navigation menu.

  10. Find your own stack in the stack selection dropdown menus: it will be called Self-hosted Runner: <Pool name>.

    stack-select.png

    For example, if you named your pool my-pool, the stack will be called Self-hosted Runner: my-pool.

  11. Click Save in the top right corner.

Now your builds will run using the reserved runner pools. You can run builds either on your own hardware or on AWS EC2 instances.