Verificando autenticación…

Skip to main content

GitLab Runners

Gitlab Runner is an application that works with GitLab CI/CD to execute jobs in a CI/CD pipeline1.

When developers push code to GitLab, they can define automated tasks in a .gitlab-ci.yml file. These tasks can include running tests, compiling applications, or deploying code. GitLab Runner is the application (which can be in a container, a virtual machine, or a physical server) that executes these tasks.

tip

As ANDES, we provide the Gitlab Runners and manage the infrastructure where these CI/CD jobs run. The CoreOps team provides and maintains some runners for specific cases.

GitLab Runner Tags

GitLab Runner tags are identifiers used to control which specific runners can execute certain tasks in a CI/CD pipeline.

A runner must have all the tags defined in the job's YAML configuration to be able to execute it.

Key concepts:

  • Task selection logic: For a task to be picked up by a runner, the runner must possess every one of the tags listed in the tags section of the .gitlab-ci.yml file.
    tip

    It works as an "AND" condition, not "OR".

  • Purpose: Tags allow differentiating runners based on their capabilities, environments, or platforms (for example, docker, macos, windows, gpu, testing-environment, ci, cd, among others).
  • Untagged tasks: Runners can be configured to execute tasks that do not have tags (untagged jobs).
    tip

    LATAM runners are not configured to execute untagged tasks.

  • GitLab CI/CD tags vs. Git tags: GitLab CI/CD tags are distinct from Git tags, which are used to mark specific points in the repository history (like releases).

Types of Runners in GitLab

There are 2 types of Runners in GitLab:

  • Shared Runners: These are Runners available to all projects within a GitLab instance.
    danger

    At LATAM Airlines, it was defined that Shared Runners should not be used, so they do not have access to any organization resources.

  • Dedicated Runners: These are self-managed Runners available in specific projects or groups, identified with custom tags for their use.

Runners in ANDES

  • All are dedicated runners.

  • Each runner uses a specific Google Service Account (SA2).

    • These service accounts allow interaction with different GCP3 resources through Workload Identity Federation (Workload Identity Federation).
    • For a runner to access resources in a specific GCP project, you must assign the appropriate role to the corresponding service account in the project.
      • Roles to incorporate:
        • Base Role: iam.serviceaccounts.actAs
        • Roles to deploy:
          • Cloud Run: Cloud Run Admin (roles/run.admin)
          • Cloud Function: Cloud Functions Admin (roles/cloudfunctions.admin)
          • GKE:
            • Kubernetes Engine Admin (roles/container.admin)
            • Kubernetes Engine Cluster Admin (roles/container.clusterAdmin)
          • Storage:
            • Storage Admin (roles/storage.admin)
            • Storage Object Admin (roles/storage.objectAdmin)
      • For more information on available roles in GCP, consult the documentation on roles and permissions in GCP.
  • Each runner is identified with one or more tags.

Details of all existing runners

There are different versions of runners available in different groups of https://gitlab.com/latamairlines/

Runners by business domain

All these runners run on Kubernetes. This version of the Runner is versatile and allows the execution of multiple jobs through pods that can run in parallel. This type of runner is compatible with most CI/CD task execution requirements at LATAM.

Here will be executed:

  • Tasks for compilation and artifact building
  • Tasks for executing database migrations
  • Tasks for executing scheduled processes
  • Container-compatible Test Tasks
  • Validation Tasks
  • Result Printing Tasks
  • Gate type Tasks

Below are the tags corresponding to each business unit:

Sub-Group in GitlabRunner TagGCP Service Account
latamairlines/configlatam-0_configgcp-sa-0-config@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/0-ltmlatam-0_ltm
latamairlines/cyselatam-cysegcp-sa-cyse@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/datalatam-datagcp-sa-data@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/lycalatam-lycagcp-sa-lyca@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/operlatam-opergcp-sa-oper@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/paxclatam-paxcgcp-sa-paxc@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/shselatam-shsegcp-sa-shse@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
latamairlines/techlatam-techgcp-sa-tech@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
tip

Runners with tag latam-emx-kubernetes available for the group latamairlines/oper/emx and its subgroups, are managed directly by the eMantto Platform Team.

Runners for dind4

In case jobs need to be executed that require the use of runners with Docker-in-Docker, the following tag must be used:

Group in GitlabRunner TagGCP Service Account
latamairlineslatam-dockergcp-sa-latamairlines@sp-te-cloudbees-prod-f4q0.iam.gserviceaccount.com
important

This runner is located at the organization level and is shared by all business units.

Runners by at-core domain

These runners all contain the andes tag and are created by at-core domain in the following structure:

  • ci-amd64: Continuous integration tasks, on AMD64 architecture. 3 sizes are created:
    • small
    • medium
    • large
  • cd: Continuous delivery tasks. Created in 1 size, but separating pre-productive and productive environments:
    • preprod For deployments in all pre-productive environments.
    • prod: For deployments in production.
Runner NameSub-Group in GitlabRunner TagsGCP Service AccountDescription
andes-cd-medium-preprodlatamairlines/andesandes, cd, medium, preprodrun-andes-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in ANDES
andes-cd-medium-prodlatamairlines/andesandes, cd, medium, prodrun-andes-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in ANDES
andes-ci-largelatamairlines/andesandes, ci-amd64, large, prodrun-andes-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for prod integration in ANDES
andes-ci-mediumlatamairlines/andesandes, ci-amd64, medium, prodrun-andes-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod integration in ANDES
andes-ci-smalllatamairlines/andesandes, ci-amd64, prod, smallrun-andes-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for prod integration in ANDES
andes-components-cd-medium-preprodlatamairlines/config/andesandes, platforms, medium, cd, preprodrun-comp-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in ANDES components
andes-components-cd-medium-prodlatamairlines/config/andesandes, platforms, medium, cd, prodrun-comp-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in ANDES components
andes-components-ci-largelatamairlines/config/andesandes, platforms, large, ci-amd64run-comp-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in ANDES components
andes-components-ci-mediumlatamairlines/config/andesandes, platforms, medium, ci-amd64run-comp-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in ANDES components
andes-components-ci-smalllatamairlines/config/andesandes, platforms, small, ci-amd64run-comp-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in ANDES components
andes-ebusiness-cd-medium-preprodlatamairlines/paxc/ebzandes, ebusiness, medium, cd, preprodrun-ebiz-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in ebusiness
andes-ebusiness-cd-medium-prodlatamairlines/paxc/ebzandes, ebusiness, medium, cd, prodrun-ebiz-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in ebusiness
andes-ebusiness-ci-largelatamairlines/paxc/ebzandes, ebusiness, large, ci-amd64run-ebiz-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in ebusiness
andes-ebusiness-ci-mediumlatamairlines/paxc/ebzandes, ebusiness, medium, ci-amd64run-ebiz-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in ebusiness
andes-ebusiness-ci-smalllatamairlines/paxc/ebzandes, ebusiness, small, ci-amd64run-ebiz-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in ebusiness
andes-ecargo-cd-medium-preprodlatamairlines/lyca/ecargoandes, ecargo, medium, cd, preprodrun-eca-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in ecargo
andes-ecargo-cd-medium-prodlatamairlines/lyca/ecargoandes, ecargo, medium, cd, prodrun-eca-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in ecargo
andes-ecargo-ci-largelatamairlines/lyca/ecargoandes, ecargo, large, ci-amd64run-eca-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in ecargo
andes-ecargo-ci-mediumlatamairlines/lyca/ecargoandes, ecargo, medium, ci-amd64run-eca-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in ecargo
andes-ecargo-ci-smalllatamairlines/lyca/ecargoandes, ecargo, small, ci-amd64run-eca-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in ecargo
andes-eloyalty-cd-medium-preprodlatamairlines/lyca/eloyaltyandes, eloyalty, medium, cd, preprodrun-ely-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in eloyalty
andes-eloyalty-cd-medium-prodlatamairlines/lyca/eloyaltyandes, eloyalty, medium, cd, prodrun-ely-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in eloyalty
andes-eloyalty-ci-largelatamairlines/lyca/eloyaltyandes, eloyalty, large, ci-amd64run-ely-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in eloyalty
andes-eloyalty-ci-mediumlatamairlines/lyca/eloyaltyandes, eloyalty, medium, ci-amd64run-ely-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in eloyalty
andes-eloyalty-ci-smalllatamairlines/lyca/eloyaltyandes, eloyalty, small, ci-amd64run-ely-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in eloyalty
andes-emantto-cd-medium-preprodlatamairlines/oper/emxandes, emantto, medium, cd, preprodrun-emx-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in emantto
andes-emantto-cd-medium-prodlatamairlines/oper/emxandes, emantto, medium, cd, prodrun-emx-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in emantto
andes-emantto-ci-largelatamairlines/oper/emxandes, emantto, large, ci-amd64run-emx-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in emantto
andes-emantto-ci-mediumlatamairlines/oper/emxandes, emantto, medium, ci-amd64run-emx-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in emantto
andes-emantto-ci-smalllatamairlines/oper/emxandes, emantto, small, ci-amd64run-emx-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in emantto
andes-platforms-cd-medium-preprodlatamairlines/tech/platformsandes, platforms, medium, cd, preprodrun-plat-cd-preprod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for preprod deploy in platforms
andes-platforms-cd-medium-prodlatamairlines/tech/platformsandes, platforms, medium, cd, prodrun-plat-cd-prod-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for prod deploy in platforms
andes-platforms-ci-largelatamairlines/tech/platformsandes, platforms, large, ci-amd64run-plat-ci-l-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comLarge runner for CI in platforms
andes-platforms-ci-mediumlatamairlines/tech/platformsandes, platforms, medium, ci-amd64run-plat-ci-m-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comMedium runner for CI in platforms
andes-platforms-ci-smalllatamairlines/tech/platformsandes, platforms, small, ci-amd64run-plat-ci-s-prod-sa@latam-platform-prod-f7eb.iam.gserviceaccount.comSmall runner for CI in platforms
important

Currently, the available ANDES runners for CI job execution correspond to the AMD64/x86_64 architecture and must use the ci-amd64 tag. At this time, there are no available runners associated with the ci-arm64 tag. As a result, pipelines that require execution on ARM64 architecture are not currently supported by ANDES runners.

Requests related to Runners

Request a new runner?

If you need a new runner for your project or group in GitLab, you must follow these steps:

  1. Identify the need: Clearly define why you need a new runner.
  2. Identify characteristics: Define what specific characteristics it must have (for example, tags, resources, etc.).
  3. Identify the sub-group: Determine in which GitLab sub-group the runner should be created.
  4. Request the runner: Contact the ANDES team through the ANDES Bot bot in Google Chat, option 8.0 with the above information.

Implement Runners on own infrastructure?

In case it is necessary to implement independent runners, follow the same steps as above, but you only need to ask for the runner token which is delivered in a secret in Google Secret Manager. Then, you must proceed to implement the runner in your infrastructure.

To evaluate the conditions for having an independent runner structure, you must review the document on Runner Usage Policy

The pipeline task execution service must consider the following elements to operate:

  • Cache using a GCP storage.
  • Job artifacts under the same GCP storage.
  • Gitlab runner deployment.
  • Service Account assigned to the Gitlab Runner nodepools.

Footnotes

  1. CI/CD (Continuous Integration/Continuous Delivery or Continuous Deployment) is a set of automated practices in software development that accelerate the delivery of new code versions to production frequently and reliably, bridging the integration of small changes with automated testing and continuous release to improve the quality and agility of the process, a key concept within DevOps.

  2. A Service Account (SA) in Google Cloud Platform (GCP). More information at https://docs.cloud.google.com/iam/docs/service-account-overview

  3. Google Cloud Platform (GCP) is a cloud service platform offered by Google that provides a wide range of services and tools for the development, deployment, and management of applications and services in the cloud.

  4. Docker-in-Docker (DinD) is a technique that allows running Docker containers inside other Docker containers, facilitating the creation of isolated development and testing environments.