Skip to main content

Configuring agent 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 agent pools in your Bitrise Workspace. This reserves build agents 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.

Availability

Please note that for now, you won't find the Bitrise agents option among your Workspace settings if our team hasn't specifically enabled it for you. If you are interested in running Bitrise builds on your own infrastructure, contact us!

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 Bitrise agents.

  5. On the Bitrise agent pools page, click Add new agent pool.

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

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

    agent-token.png
  8. Open the app you need on Bitrise and click Workflows.

  9. Click Edit bitrise.yml to go the Workflow Editor, and go to the Stacks & Machines tab.

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

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

  11. Click Save in the top right corner.

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