gitlab-runner
digio/gitlab-runner/google
Terraform module for provisioning a GitLab CI Runner in a GCP project using the docker+machine executor.
GCP GitLab Runner A Terraform module for configuring a GCP-based GitLab CI Runner. This runner is configured to use the docker+machine executor which allows the infrastructure to be scaled up and down as demand requires. The minimum cost (during zero activity) is the cost of an f1-micro instance. The long-running runner instance runs under a gitlab-ci-runner service account. This account will be granted all required permissions to spawn worker instances on demand. The worker instances run under a gitlab-ci-worker service account. This account will need to be granted any privileges required to perform build and deploy activities. Usage See examples for more detail on how to configure this module.
| Name | Type | Description | Default |
|---|---|---|---|
| gcp_zone | string | The GCP zone to deploy the runner into. | required |
| gitlab_url | string | The URL of the GitLab server hosting the projects to be built. | required |
| gcp_project | string | The GCP project to deploy the runner into. | required |
| ci_token | string | The runner registration token obtained from GitLab. | required |
| ci_concurrency | number | The maximum number of worker instances to create. | 1 |
| ci_worker_disk_size | string | The size of the persistent disk in GB. | "10" |
| ci_worker_instance_type | string | The GCP instance type. This can be adjusted to meet the demands of builds jobs. | "n1-standard-1" |
| docker_privileged | string | Give extended privileges to container. | "false" |
| ci_worker_idle_time | number | The maximum idle time for workers before they are shutdown. | 300 |
| ci_worker_instance_tags | string | The GCP instance networking tags to apply. | "gitlab-ci-worker" |
| ci_runner_gitlab_untagged | string | Register the runner to also execute GitLab jobs that are untagged. | "true" |
| ci_runner_gitlab_tags | string | Register the runner to execute GitLab jobs with these tags. | "" |
| ci_runner_disk_size | string | The size of the persistent disk in GB. | "20" |
| ci_runner_gitlab_name | string | Register the runner in GitLab using this name. If empty the value "gcp-${var.gc | "" |
| ci_runner_instance_type | string | The instance type used for the runner. This shouldn't need to be changed because | "f1-micro" |
| gcp_resource_prefix | string | The prefix to apply to all GCP resource names (e.g. <prefix>-runner, <prefix>-wo | "gitlab-ci" |
ci_worker_service_account — The service account created for the worker instances.
Privileges/roles may need to be assigned to th