Welcome to mirror list, hosted at ThFree Co, Russian Federation.

linux_saas_runner.md « saas « runners « ci « doc - gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: d95fc7010567bb4f241126532e777a17cfe829e7 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
---
stage: Verify
group: Runner
info: To determine the technical writer assigned to the Stage/Group associated with this page, see https://about.gitlab.com/handbook/product/ux/technical-writing/#assignments
---

# SaaS runners on Linux **(FREE SAAS)**

When you run jobs on SaaS runners on Linux, the runners are on auto-scaled ephemeral virtual machine (VM) instances.
The default region for the VMs is `us-east1`.

Each VM uses the Google Container-Optimized OS (COS) and the latest version of Docker Engine running the `docker+machine`
[executor](https://docs.gitlab.com/runner/executors/#docker-machine-executor).

## Machine types available for Linux (x86-64)

For the SaaS runners on Linux, GitLab offers a range of machine types for use.
For Free, Premium, and Ultimate plan customers, jobs on these instances consume the compute quota allocated to your namespace.

| Runner Tag                                    | vCPUs | Memory | Storage |
|-----------------------------------------------|-------|--------|---------|
| `saas-linux-small-amd64`                      | 2     | 8 GB   | 25 GB   |
| `saas-linux-medium-amd64` **(PREMIUM SAAS)**  | 4     | 16 GB  | 50 GB   |
| `saas-linux-large-amd64`  **(PREMIUM SAAS)**  | 8     | 32 GB  | 100 GB  |

The `small` machine type is set as default. If no [tag](../../yaml/index.md#tags) keyword in your `.gitlab-ci.yml` file is specified,
the jobs will run on this default runner.

All SaaS runners on Linux currently run on
[`n2d-standard`](https://cloud.google.com/compute/docs/general-purpose-machines#n2d_machines) gerneral-purpose compute from GCP.
The machine type and underlying processor type can change. Jobs optimized for a specific processor design could behave inconsistently.

## Container images

As runners on Linux are using the `docker+machine` [executor](https://docs.gitlab.com/runner/executors/#docker-machine-executor),
you can choose any container image by defining the [`image`](../../../ci/yaml/index.md#image) in your `.gitlab-ci.yml` file.

If no image is set, the default is `ruby:3.1`.

## Docker in Docker support

The runners are configured to run in `privileged` mode to support
[Docker in Docker](../../../ci/docker/using_docker_build.md#use-docker-in-docker)
to build Docker images natively or run multiple containers within your isolated job.

## Caching on SaaS runners

The SaaS runners share a [distributed cache](https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-runners-caching)
stored in a Google Cloud Storage (GCS) bucket. Cache contents not updated in the last 14 days are automatically
removed, based on the [object lifecycle management policy](https://cloud.google.com/storage/docs/lifecycle).
The maximum size of an uploaded cache artifact can be 5 GB after the cache becomes a compressed archive.

For more information about how caching works, see [Caching in GitLab CI/CD](../../caching/index.md).

## Example `.gitlab-ci.yml` file

To use a machine type other than `small`, add a `tags:` keyword to your job.
For example:

```yaml
job_small:
 script:
  - echo "this job runs on the default (small) Linux instance"

job_medium:
 tags:
  - saas-linux-medium-amd64
 script:
  - echo "this job runs on the medium Linux instance"

job_large:
 tags:
  - saas-linux-large-amd64
 script:
  - echo "this job runs on the large Linux instance"
```

## SaaS runners for GitLab community contributions

If you want to [contribute to GitLab](https://about.gitlab.com/community/contribute/), jobs will be picked up by the
`gitlab-shared-runners-manager-X.gitlab.com` fleet of runners, dedicated for GitLab projects and related community forks.

These runners are backed by the same machine type as our `small` runners.
Unlike the normal SaaS runners on Linux, each virtual machine is re-used up to 40 times.

As we want to encourage people to contribute, these runners are free of charge.

<!--- start_remove The following content will be removed on remove_date: '2023-08-22' -->

## Pre-clone script (removed)

This feature was [deprecated](https://gitlab.com/gitlab-org/gitlab/-/issues/391896) in GitLab 15.9
and [removed](https://gitlab.com/gitlab-org/gitlab-runner/-/issues/29405) in 16.0.
Use [`pre_get_sources_script`](../../../ci/yaml/index.md#hookspre_get_sources_script) instead.

<!--- end_remove -->