You are browsing a read-only backup copy of Wikitech. The live site can be found at wikitech.wikimedia.org

GitLab/Gitlab Runner: Difference between revisions

From Wikitech-static
Jump to navigation Jump to search
imported>Jelto
No edit summary
 
imported>Jelto
No edit summary
 
(13 intermediate revisions by 2 users not shown)
Line 1: Line 1:
GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.<ref>https://docs.gitlab.com/runner/</ref> For more information see the official [https://docs.gitlab.com/runner/ GitLab Runner documentation].
{{Sidebar
| style = background: white; padding:10px; padding-{{dir|{{pagelang}}|left|right}}:13px; margin:{{dir|{{pagelang}}|5px 12px 5px 0|5px 0 5px 12px}}; width: 350px;
| name = GitLab Runner
| title = GitLab Runner
| image = [[File:Gitlab-logo.svg.svg|center|250px]]
| headingstyle = font-size: 130%; padding: .5em;
| contentstyle = text-align: {{dir|{{pagelang}}|right|left}}; font-size: 14px; padding: .5em; line-height: 1.5;
| abovestyle = text-align: {{dir|{{pagelang}}|right|left}};
| content1 =
{{Special:PrefixIndex/{{FULLPAGENAME}}/ |hideredirects=1 |stripprefix=1}}
* External resources:
** [https://gitlab.wikimedia.org/admin/runners GitLab Runner Admin menu]
** [https://grafana.wikimedia.org/d/Chb-gC07k/gitlab-ci-overview?orgId=1 GitLab CI metrics]
}}


=== Current Gitlab Runner setup ([[phab:T287279|T287279]]) ===<!-- Additional information needed, feel free to edit -->
GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.<ref>https://docs.gitlab.com/runner/</ref> For more information see the official [https://docs.gitlab.com/runner/ GitLab Runner documentation].


In WMCS there is a project <code>gitlab-runners</code> to host a set of shared GitLab runners. Currently the runners are installed and configured with [[gerrit:plugins/gitiles/operations/gitlab-ansible/|Ansible playbook]]. To add runners, add the hosts to <code>[gitlab_runners]</code> section of 'hosts' file. Then run the Ansible Playbook for gitlab-runners. The command is wrapped in <code>[[gerrit:plugins/gitiles/operations/gitlab-ansible/+/refs/heads/master/install-gitlab-runner.sh|install-gitlab-runner.sh]]</code> script.<ref>https://phabricator.wikimedia.org/T285913
===== GitLab Runner types =====
GitLab offers different types of CI Runners. [[GitLab/Gitlab Runner/Shared Runners|Shared GitLab Runners]] are general purpos CI workers. This Runners execute jobs for a wide range of projects inside the <code>[https://gitlab.wikimedia.org/repos /repos]</code> group in GitLab. If access to this kind of Runners is needed, consider moving to the <code>[https://gitlab.wikimedia.org/repos /repos]</code> group and make yourself familiar with the details under [[GitLab/Gitlab Runner/Shared Runners|Shared GitLab Runners]].


https://phabricator.wikimedia.org/T287279</ref>
[[GitLab/Gitlab Runner/Trusted Runners|Trusted GitLab Runners]] offer a platform for CI jobs with additional security needs (like building production artifacts). This Runners live inside WMF infrastructure and access to this Runners is gated and restricted. Access has to be requested on project basis, so please take a look on [[GitLab/Gitlab Runner/Trusted Runners|Trusted GitLab Runners]] on how to get access.


There are efforts to move all of the installation and configuration to puppet: [[phab:T287279#7237735|T287279#7237735]].
It is planned to add CI support for all projects using [[GitLab/Gitlab Runner/Cloud Runners|Cloud Runners]]. This Runners are in design phase and access to this Runners will be announced.


=== Future Gitlab Runner setup ([[phab:T286958|T286958]]) ===
===== Evaluation and Design =====
This section contains the requirements and plan for a future Gitlab-Runner setup. The goal is to find a secure, scalable and easy to build and maintain setup for the GitLab Runner infrastructure.
Evaluation sub-pages on the right menu offer more insights into the design and security considerations.  


==== Compute Resources ====
<references />
GitLab Runner can run on various platforms, such as Kubernetes, Docker, OpenShift or just Linux VMs. Furthermore a wide range of compute platforms can be leveraged, such as WMCS, Ganetti, bare metal hosts or public clouds. So this section tries to compare the different options and collect advantages and disadvantages. Privacy considerations can be found in the next section.
 
===== Elastic demand =====
https://docs.gitlab.com/runner/configuration/autoscale.html
 
==== Privacy considerations ====
 
===== Whether these can safely run on a third-party platform =====
 
==== Monitoring of performance and usage ====
Gitlab-Runner export Prometheus metrics. This metrics should give insights in performance and usage. See [https://docs.gitlab.com/runner/monitoring/ Monitoring Gitlab Runner] documentation.
 
However the Gitlab Runner exporter does not support authorization or https. So depending on where the Runners are hosted, a https proxy with authorization is required.
 
<ref>https://docs.gitlab.com/runner/monitoring/#configuration-of-the-metrics-http-server</ref>

Latest revision as of 14:37, 4 February 2022

GitLab Runner is an application that works with GitLab CI/CD to run jobs in a pipeline.[1] For more information see the official GitLab Runner documentation.

GitLab Runner types

GitLab offers different types of CI Runners. Shared GitLab Runners are general purpos CI workers. This Runners execute jobs for a wide range of projects inside the /repos group in GitLab. If access to this kind of Runners is needed, consider moving to the /repos group and make yourself familiar with the details under Shared GitLab Runners.

Trusted GitLab Runners offer a platform for CI jobs with additional security needs (like building production artifacts). This Runners live inside WMF infrastructure and access to this Runners is gated and restricted. Access has to be requested on project basis, so please take a look on Trusted GitLab Runners on how to get access.

It is planned to add CI support for all projects using Cloud Runners. This Runners are in design phase and access to this Runners will be announced.

Evaluation and Design

Evaluation sub-pages on the right menu offer more insights into the design and security considerations.