gitlab-runners
AckeeCZ/gitlab-runners/gcp
Terraform module for GitLab CI runners deployed at GCP with focus on Node.js builds
Ackee Node.js Optimized Gitlab CI Runners 🦄 Terraform module for GitLab CI runners deployed at GCP with focus on Node.js builds. Why 🦄? Autoscaling by working hours Preemptible instances Distributed cache using GCS (Google Cloud Storage) Registry as a pull through cache for: docker (Docker registry) npm (Verdaccio) NAT or Public IP setup Highly customizable in general First setup After specifying gitlab_url, runner_token, project and optionally some other variables, run terraform. Initialization of the controller will take a while and then the infrastructure is ready (signalized with a newly registered runner in GitLab Runners Admin Area). It is then recommended to adjust the HW requirements (instance types), to balance between quick builds and willingness to pay for them. Our setup can be
| Name | Type | Description | Default |
|---|---|---|---|
| project | string | GCP project for cloud runners | required |
| gitlab_url | string | GitLab URL where cloud runners are intended to be used | required |
| runner_token | string | Registration token for runner obtained in GitLab | required |
| zone | string | Zone for GCE instances | "europe-west1-c" |
| controller_image | string | Image for controller | "ubuntu-os-cloud/ubuntu-2004-lts" |
| runner_concurrency | number | The maximum number of summoned instances. | 12 |
| runner_idle_time | number | The maximum idle time for summoned instances before they went down | 60 |
| controller_gitlab_untagged | string | Register the runner to also execute GitLab jobs that are untagged. | "true" |
| runner_instance_tags | string | The GCP instance networking tags to apply | "gitlab-runner" |
| runner_mount_volumes | list(string) | Docker volume mounts | [
"/cache",
"/builds:/builds",
"/v |
| enable_cloud_nat | bool | Use Cloud NAT instance instead of public IP addreses | false |
| controller_disk_type | string | GCP disk type for controller | "pd-balanced" |
| worker_image | string | Image for provisioned VMs | "ubuntu-os-cloud/global/images/family/ub |
| network | string | GCP network for use | "default" |
| controller_gitlab_name | string | Name of registered runner in GitLab | "GCP runner" |
| runner_disk_size | string | The size of the persistent disk in GB for summoned instances (higher number than | "200" |
| runner_idle_count_working_hours | number | Always up instances during working hours | 4 |
| controller_instance_type | string | Instance type for controller, speed & power is not needed here | "e2-small" |
| docker_machine_version | string | Version of docker machine for runners | "v0.16.2" |
| controller_gitlab_tags | string | List of runner's tags delimited with , | "cloud" |
| runner_instance_type | string | Runner instance type. Adjust it for build needs | "n2d-standard-2" |
| runner_cache_location | string | GCS bucket location for runner cache | "EUROPE-WEST1" |
| runner_idle_time_working_hours | number | The maximum idle time for summoned instances before they went down during workin | 600 |
runners_service_account