Adding a new gitlab-runner configuration

How to create a new gitlab-runner configuration and attach it to the correct projects


A new gitlab-runner needs to be attached to a project.


  1. Checkout deployment-all and export the encryption password:

    export ENVPASSWORD=....
  2. Verify that the checkout works correctly including access to AWS and Beaker: --role poweruser
    gitlab-runner-config/ configurations diff
  3. Add the new gitlab-runner to

    • Beaker machine: ansible/inventory/beaker.yml, all.hosts.children.gitlab_runner.hosts
    • Other machine: gitlab-runner-config/, RUNNER_HOSTS
    • Kubernetes: gitlab-runner-config/, CONTEXTS

    Also add it to gitlab-runner-config/runners.yml.j2 in runner_deployments.

    Depending on the type, setup and execute the necessary playbooks the configure the machine.

  4. If a new configuration template is needed, add it to gitlab-runner-config/runners.yml.j2 in runner_templates.

  5. Instantiate the template in the correct runner deployment via the runner_configurations variable. If a new configuration is created, make sure it is attached to the correct GitLab projects via runner_registrations.

  6. Run gitlab-runner-config/ registrations diff and check that the new runner configurations are reported and do not have a token assigned.

  7. Register the new runners and add the new tokens to the secrets via

    gitlab-runner-config/ \
      registrations apply \
      --create-missing \
      --add-token-helper ../
  8. Deploy the new configurations via gitlab-runner-config/ configurations apply.