Skip to main content

Harness Central Build Farm Setup

Harness Central Build Farm Setup configures the core components required for Harness CI — build infrastructure, container registry, and source code manager. A centralized build farm reduces Kubernetes cluster ownership costs and simplifies operations by consolidating CI workloads into a single, autoscaling cluster.

Prerequisites

  • HSF is deployed and post-deployment configuration is complete.
  • You know which build infrastructure type you want to use
  • If using self-hosted Kubernetes infrastructure: a delegate is already deployed with access to your Kubernetes cluster.
  • If using Harness Cloud with enterprise: a Secure Connect proxy is configured.
  • You have been added to the HSF Users or HSF Admins group.

Inputs

InputDescriptionNotes
Build infrastructure typeSelf-hosted Kubernetes, Harness Cloud, or bothSee Step 1 below
Container registry URLThe URL of your container registrye.g. registry.example.com
Source code managerYour SCM type and URLe.g. GitHub, GitLab, Bitbucket
Validation repositoryA repo Harness can use to test the SCM connectionMust be accessible by the connector

Steps

1. Choose your infrastructure

Before executing the workflow, decide which build infrastructure type your team will use:

OptionWhen to use
Harness CloudYou want Harness to manage build infrastructure. No Kubernetes connector is created.
Self-hosted KubernetesYou want builds to run on your own cluster. A delegate with cluster access must already be deployed.
BothYou want to support both options and choose per pipeline.
note

If you select Harness Cloud, the workflow will not create a Kubernetes connector for the build farm — cloud infrastructure is managed by Harness directly and requires no connector.

warning

If you are using enterprise with Harness Cloud, you will need a Secure Connect proxy configured before running this workflow. If you are using enterprise with self-hosted infrastructure, your delegate must already be deployed and have access to your cluster.

2. Execute the workflow

Fill in the inputs above. Once submitted, HSF will provision the harness-central-build-farm-setup IaCM workspace in the Solutions Factory project.

What gets created

ResourceDetails
Code repository connectorConnects Harness to your SCM
Artifact manager connectorConnects Harness to your container registry
Build infrastructure connectorConnects to your Kubernetes cluster (self-hosted only)
Secret: build_farm_container_registry_passwordContainer registry password
Secret: build_farm_container_registry_usernameContainer registry username
Secret: build_farm_scm_passwordSCM password
Secret: build_farm_scm_usernameSCM username
IaCM workspaceharness-central-build-farm-setup in Solutions Factory project
note

Credentials are stored as Harness secrets rather than hardcoded into the workspace state. This means they can be rotated independently without affecting the workspace configuration.

Expected output

After the workflow completes:

  • Connectors are visible under Solutions FactoryProject SettingsConnectors.S
  • Secrets are visible under Solutions FactoryProject SettingsSecrets.
  • The harness-central-build-farm-setup workspace appears in IaCMWorkspaces.
  • An IDP catalog entry for the workspace is registered automatically.

Post setup

Once the build farm is provisioned, update HSF to use it as the execution infrastructure for Solutions Factory pipelines:

Update the Harness Pilot Light workspace:

  1. Navigate to IaCMWorkspacesHarness Pilot Light.
  2. Under VariablesOpenTofu Variables, change kubernetes_connector from skipped to account.buildfarm_infrastructure.
  3. Save the variable.
  4. Run Manage Pilot Light to apply the change.

Update the Harness Solutions Factory workspace:

  1. Navigate to IaCMWorkspacesHarness Solutions Factory.
  2. Under VariablesOpenTofu Variables, change kubernetes_connector from skipped to account.buildfarm_infrastructure.
  3. Save the variable.
  4. Run Deploy Solutions Factory to apply the change.

After both updates, all Solutions Factory pipelines will execute using your build infrastructure.

Making changes

To update the build farm configuration after provisioning — for example, to change the container registry URL or swap your SCM — navigate to IaCMWorkspacesharness-central-build-farm-setup, update the relevant variable, and re-execute the workspace. The change will go through the approval flow before being applied.