Distribution Team Infrastructure and Maintenance - Build Infrastructure
Common links
Build Infrastructure
Distribution uses GitLab CI to build GNU/Linux packages, Docker images, AWS AMIs, and other artifacts that can be used to install GitLab in user’s machines. Many of these build processes require greater computing power and resources, and hence Distribution maintains their own infrastructure to provide these resources.
Runner manager machines
The Distribution team maintains 2 runner manager machines - one to be used in GitLab.com and the other to be used in dev.gitlab.org. The configurations of runner managers are maintained in the chef-repo project, and the secrets to be used together with these configurations are maintained in Vault.
The runners are named using the syntax runners-manager-distribution-(com|dev)-(blue|green)-<count>
.
NOTE: There is no blue/green deployments configured for these runner managers
yet, but issue 1138
discusses using a blue/green deployment for easier upgrades of GitLab
Runner in these runner manager machines. Currently, only a single “blue
”
runner manager is available for each of gitlab.com
and dev.gitlab.org
.
Build machines
Both com
and dev
runners spin up identical machines using the docker-machine
executor with autoscale
configuration. The different type of machines spun up by
them are as follows:
-
distribution-(com|dev)-amd64-runner-gcp
- These runners spin upn1-highcpu-32
machines with 100GB SSD in GCP that are used for buildingomnibus-gitlab
GNU/Linux packages foramd64
architecture. -
distribution-(com|dev)-arm64-runner-gcp
- These runners spin upt2a-standard-8
machines with 100GB SSD in GCP that are used for buildingomnibus-gitlab
GNU/Linux packages forarm64
architecture. -
distribution-(com|dev)-arm64-runner-aws
- These runners spin upm6g.2xlarge
machines with 100 GB SSD in AWS that are usded for buildingomnibus-gitlab
GNU/Linux packages forarmv7
architecture (Raspberry Pi). They are used because GCP’s T2A machines don’t support 32-bit instruction set set that is used to buildarmv7
packages while AWS’s Graviton does.
Maintenance tasks
Requirements:
- Access to the node.
- Access to specific folders in Chef Vault.
- Access to merge into master on the ops chef repo. This is not usually available to team members. So after opening an MR, get it reviewed and merged by someone with access - mostly someone from Infrastructure team.
Changing version of GitLab CI runner
To be performed by any Distribution team member:
-
Create a new merge request on the chef repo that updates the runner version
-
Ensure that CI passes, and the MR is reviewed by another team member
-
Merge the change into the chef repo
-
Login to the node and run,
sudo /root/runner_upgrade.sh
to perform the upgrade. This will stop the chef-client service, stop the runner and cleanup the machines, run the chef-client to fetch the new version and finally, start GitLab Runner again.
af33af46
)