Provisioning runners in Google Cloud
DETAILS: Tier: Free, Premium, Ultimate Offering: GitLab.com Status: Beta
- Introduced in GitLab 16.10 with a flag named
google_cloud_support_feature_flag
. This feature is in beta.- Enabled on GitLab.com in GitLab 17.1. Feature flag
google_cloud_support_feature_flag
removed.
This feature is in beta.
Creating a runner provisioned in Google Cloud
Prerequisites:
- You must have billing enabled for your Google Cloud project.
- You must have a working
gcloud
CLI tool that is authenticated with the Owner IAM role on the Google Cloud project. - You must have the Terraform CLI tool installed.
You can create a project or group runner for GitLab.com and provision it on your Google Cloud project. When you create a runner, the GitLab UI provides on-screen instructions and scripts to automatically provision the runner in a Google Cloud project that you own.
After you create a runner, it is assigned a runner authentication token that a Terraform script uses to register it. The runner uses the token to authenticate with GitLab when picking up jobs from the job queue.
After the runners are provisioned, an autoscaling fleet of runners is available to execute your CI/CD jobs in Google Cloud. A runner manager automatically creates temporary runners.
Create a group runner
Prerequisites:
- You must have the Owner role for the group.
To create a group runner and provision it on Google Cloud:
-
On the left sidebar, select Search or go to and find your group.
-
Select Build > Runners.
-
Select New group runner.
-
In the Tags section, in the Tags field, enter the job tags to specify jobs the runner can run. If there are no job tags for this runner, select Run untagged.
-
Optional. In the Runner description field, add a runner description that displays in GitLab.
-
Optional. In the Configuration section, add additional configurations.
-
Select Create runner.
-
In the Platform section, select Google Cloud.
-
To specify the environment in Google Cloud where runners execute jobs, in Step 1: Specify environment, complete the form.
-
In Step 2: Set up GitLab Runner, select Setup instructions. In the dialog:
- Step 1: Configure Google Cloud project must be executed once per Google Cloud project, to ensure it meets the prerequisites for the required services, service account, and permissions.
- Step 2: Install and register GitLab Runner displays the Terraform script that uses the GitLab Runner Infrastructure Toolkit (GRIT) to provision the infrastructure on the Google Cloud project to execute your runner manager.
After you execute the scripts, a runner manager connects with the runner authentication token. The runner manager might take up to one minute to show as online and start receiving jobs.
Create a project runner
Prerequisites:
- You must have the Maintainer role for the project.
To create a project runner and provision it on Google Cloud:
-
On the left sidebar, select Search or go to and find your project.
-
Select Settings > CI/CD.
-
Expand the Runners section.
-
Select New project runner.
-
In the Tags section, in the Tags field, enter the job tags to specify jobs the runner can run. If there are no job tags for this runner, select Run untagged.
-
Optional. In the Runner description field, add a description for the runner that displays in GitLab.
-
Optional. In the Configuration section, add additional configurations.
-
Select Create runner.
-
In the Platform section, select Google Cloud.
-
To specify the environment in Google Cloud where runners execute jobs, in Step 1: Specify environment, complete the form.
-
In Step 2: Set up GitLab Runner, select Setup instructions. In the dialog:
- Step 1: Configure Google Cloud project must be executed once per Google Cloud project, to ensure it meets the prerequisites for the required services, service account, and permissions.
- Step 2: Install and register GitLab Runner displays the Terraform script that uses the GitLab Runner Infrastructure Toolkit (GRIT) to provision the infrastructure on the Google Cloud project to execute your runner manager.
After you execute the scripts, a runner manager connects with the runner authentication token. The runner manager might take up to one minute to show as online and start receiving jobs.