Skip to main content

Bitrise ビルドをオンプレミスで実行する

概要

You can run Bitrise builds on your own hardware or virtual environment by installing the Bitrise agent and connect it to your Bitrise Workspace. You can install the agent on both macOS and Linux.

You can run Bitrise builds on self-hosted infrastructure - that is, that hardware or virtualized environments that you control - while taking advantage of every feature the Bitrise website offers. To do so, you just need to install the Bitrise agent on your own infrastructure and connect it to your Workspace. Once that is done, you can run builds from your Bitrise account, using the Bitrise UI as usual.

bitrise-runner-diagram.png

When to use the on-premise runner

If you need to run Bitrise builds on infrastructure that you control, Bitrise offers two options: using AWS EC2 instances, or the on-premise runner option.

We only recommend using the on-premise runner if you have the necessary machines or use a cloud provider other than AWS for your infrastructure needs. The on-premise runner is NOT plug and play: you need to make sure all necessary tools and services are installed on your machines.

If you do have an AWS account for managing your infrastructure, we recommend checking our AWS offering.

Setting up Bitrise on-premise

これを行うには、Bitrise エージェントを次のサイトから入手する必要があります。 自作 次に、2 つの Bitrise サービス エンドポイントにアクセスできるようにネットワークを構成します。

ツールとサービス

この方法で Bitrise エージェントを使用する場合は、必要なツールがすべてマシンにインストールされていることを確認する必要があることに注意してください。現時点では、このオンプレミス ソリューション用のプレインストール ツールは提供されていません。

マックOS

Linux

  1. Bitrise エージェント プールを構成します。 ワークスペースの設定 bitrise.io のページ: セルフホスト型ビルド用のエージェント プールの構成

    必ずプロセスからトークンを取得してください。

  2. をフェッチします bitrise-den-agent Homebrew の公式。

    brew tap bitrise-io/den-agent
  3. 最新バージョンをインストールします。

    brew install bitrise-den-agent

    特定のバージョンのインストール

    次のコマンドのバージョン番号を修正して、特定のバージョンをインストールすることもできます。

    brew install [email protected]
  4. 次の 2 つのサービスにアクセスできるようにネットワークを構成します。

    • https://den.services.bitrise.io

    • https://build-log.services.bitrise.io

    エージェントは、ビルドを実行し、Bitrise Web サイトと通信するために、これらの両方にアクセスできる必要があります。

  5. Generate a service daemon template.

    You need the runner pool token to finish the process.

    brew create-daemon --bitrise-agent-intro-secret=YOUR_AGENT_POOL_TOKEN
  6. マシン上のエージェントを Bitrise ワークスペースに接続します。

    sudo mkdir -p ~/Library/LaunchDaemons 
    sudo chown root:wheel ~/Library/LaunchDaemons 
    sudo cp /opt/homebrew/io.bitrise.self-hosted-agent.plist ~/Library/LaunchDaemons 
    sudo chown root:wheel ~/Library/LaunchDaemons/io.bitrise.self-hosted-agent.plist 
    sudo launchctl load -w ~/Library/LaunchDaemons/io.bitrise.self-hosted-agent.plist
  1. Bitrise エージェント プールを構成します。 ワークスペースの設定 bitrise.io のページ: セルフホスト型ビルド用のエージェント プールの構成

    必ずプロセスからトークンを取得してください。

  2. GPG 公開キーを追加します。

    curl -fsSL https://bitrise-den-agent-deb.s3.amazonaws.com/DEB-GPG-KEY-bitrise.pub | 
    sudo gpg --dearmor -o /usr/share/keyrings/DEB-GPG-KEY-bitrise.gpg
  3. Bitrise DEN エージェント deb パッケージ リポジトリを追加します。

    echo 'deb [arch=amd64 signed-by=/usr/share/keyrings/DEB-GPG-KEY-bitrise.gpg] https://bitrise-den-agent-deb.s3.amazonaws.com stable main' | 
    sudo tee /etc/apt/sources.list.d/den-agent-deb.list
  4. エージェントをインストールし、マシン上の Bitrise ワークスペースに接続します。

    プロセスを完了するには、エージェント プール トークンが必要です。

    sudo apt update
    sudo apt install bitrise-den-agent
    sudo /usr/bin/bitrise-den-agent-configure.sh YOUR_AGENT_POOL_TOKEN