GitLab/Gitlab Runner/Shared Runners
Appearance
< GitLab | Gitlab Runner

Current Gitlab Runner setup (T287279)
We're currently relying on WMCS VPSs for shared runner capacity. There is a project named gitlab-runners in which to provision new instances, and a profile to help provision Docker based runners on those instances. Note that a standalone puppetmaster in the same project stores the runner registration token under /etc/puppet/secret, and Puppet autosigning is turned off to protect the token value.
Setting up a new shared runner
To set up a new shared runner, following these steps.
- Create a new WMCS VPS instance.
- Log in to https://horizon.wikimedia.org and navigate to the
gitlab-runnersproject. - Launch a new Debian
bullseyeinstance, following therunner-{nnnn}naming convention. - Choose the
g3.cores8.ram24.disk20.ephemeral40.4xiopsflavor
- Log in to https://horizon.wikimedia.org and navigate to the
- Wait until the new instance has fully provisioned and you can successfully
sshto the running instance using your authorized key and sudo as root. (This typically takes a few minutes.) - Check if there is an existing
profile::gitlab::runner::tokenon the standalone puppetmaster in/etc/puppet/secret/hieradata. If not, generate a new token and add it there. - Fully configure instance with volume, profile and project puppetmaster
- Add the following to the instance's Hiera Config under the Puppet Configuration tab in horizon.
profile::gitlab::runner::docker_volume: true puppetmaster: gitlab-runners-puppetmaster-01.gitlab-runners.eqiad1.wikimedia.cloud
- Add
role::gitlab_runnerto the instance's Puppet Classes under the Puppet Configuration tab.
- Add the following to the instance's Hiera Config under the Puppet Configuration tab in horizon.
- Do the little SSL dance that is required of instances that use a standalone puppetmaster.
- On the new runner (
runner-{nnnn}.gitlab-runners.eqiad1.wikimedia.cloud).- Run
sudo rm -rf /var/lib/puppet/sslto remove the existing SSL certs used by the default puppetmaster. - Run
sudo -i puppet agent --test --verbose --server gitlab-runners-puppetmaster-01.gitlab-runners.eqiad1.wikimedia.cloudto have the puppet client generate a new SSL cert.
- Run
- On
gitlab-runners-puppetmaster-01.gitlab-runners.eqiad1.wikimedia.cloudsign the new instance's SSL cert.- Run
sudo -i puppet cert listand find the new instance in the list. - Run
sudo -i puppet cert sign runner-{nnnn}.gitlab-runners.eqiad1.wikimedia.cloudto sign the client cert.
- Run
- On the new runner (
- Run
sudo -i puppet agent --test --verbose --server gitlab-runners-puppetmaster-01.gitlab-runners.eqiad1.wikimedia.cloudon the runner to ensure it has fully provisioned therole::gitlab_runnerrole. - Verify that the runner has successfully registered with our GitLab instance by viewing the runner list.