For the complete documentation index, see llms.txt. This page is also available as Markdown.

Install a delegate on Google Cloud Run

Learn how to install and configure a Harness delegate on Google Cloud Run.

Harness Delegate is essential for connecting your infrastructure with the Harness platform, enabling seamless deployments. Harness Delegates typically run on VMs, Kubernetes clusters, or ECS Fargate, but Google Cloud Run presents a lightweight, cost-efficient, and scalable alternative.

This guide provides step-by-step instructions to configure a Harness Delegate on Google Cloud Run.

Prerequisites

  1. Ensure you have an active Harness account with the necessary permissions.

  2. A Google Cloud service account with appropriate IAM roles:

    roles/run.admin # - Cloud Run Admin
    roles/iam.serviceAccountUser # - Service Account User
    roles/artifactregistry.reader # - For pulling images from GAR

Harness Delegate on Google Cloud Run

To configure a delegate on Google Cloud Run:

  1. Login to Google Cloud Run, Select an existing project or create a new one as needed.

    • Check for Deploy container → Service as shown below:

      deploy-container
  2. To create a service, follow these steps:

    2.1. Add Container Image URL. You can select it from Artifact Registry or provide a Docker Hub Image URL.

    2.2. To configure a service, enter a name, select a region, choose a billing method (request-based or instance-based), and set up scaling. You can configure Auto Scaling by setting the minimum number of instances based on your requirements or switch to Manual Scaling.

     For now, we will opt for Manual Scaling and set the number of instances to 1.
    
     <figure><img src="../../../../.gitbook/assets/cloud-run-configure.png" alt=""><figcaption></figcaption></figure>

    2.3. Configure Ingress to control access to Cloud Run services. For now, select "All" to allow direct access from the internet.

  3. To edit container configuration, click Container(s), Volumes, Networking, Security section to expand the options and set the following details accordingly.

    • Container Port: 3460

    • Settings → Container Name: Set an appropriate name (this will be used as the container image name).

    • Resources → Memory: At least 2Gi, CPU: 1

  4. Click Add Health Checks, then configure the Startup Probe and Liveness Probe as follows:

    • Select Protocol: HTTP

    • Set Path: /api/health

    • Startup Probe: Set an initial delay of 120s

    • Liveness Probe: Set an initial delay of 0s (all other settings remain the same as Startup probe) as shown in image below.

    • Click Add to proceed.

  5. To configure Environment Variables, scroll up and select Variables & Secrets next to Settings.

These environment variables are the same as those in the delegate installation step available in the Harness UI, as shown below.

6. Click Create to complete the setup.

  1. To confirm the delegate is created and running, check its status in the Harness UI on Delegate page as shown in image below.

Last updated

Was this helpful?