Adding a new gitlab-runner configuration
Problem
A new gitlab-runner needs to be attached to a project.
Steps
-
Make sure
deployment-allis up to date withgit pull. -
Verify that the checkout works correctly including access to AWS and Beaker:
aws_saml_login.sh --role poweruser # or simply ./local_login.sh gitlab-runner-config/deploy.sh configurations diff -
Add the new gitlab-runner to
- Beaker machine:
ansible/inventory/beaker.yml,all.hosts.children.gitlab_runner.hosts - Other machine:
gitlab-runner-config/deploy.sh,RUNNER_HOSTS - Kubernetes:
gitlab-runner-config/deploy.sh,CONTEXTS
Also add it to
gitlab-runner-config/runners.yml.j2inrunner_deployments.Depending on the type, setup and execute the necessary playbooks the configure the machine.
- Beaker machine:
-
If a new configuration template is needed, add it to
gitlab-runner-config/runners.yml.j2inrunner_templates. -
Instantiate the template in the correct runner deployment via the
runner_configurationsvariable. If a new configuration is created, make sure it is attached to the correct GitLab projects viarunner_registrations. -
Run
gitlab-runner-config/deploy.sh registrations diffand check that the new runner configurations are reported and do not have a token assigned. -
Register the new runners and add the new tokens to the secrets via
gitlab-runner-config/deploy.sh \ registrations apply --create-missing -
Deploy the new configurations via
gitlab-runner-config/deploy.sh configurations apply.