summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-04 17:07:07 +0100
committerSam Thursfield <sam.thursfield@codethink.co.uk>2017-10-04 17:07:07 +0100
commit9962102b6080b291e6a3aa9746a039865006616c (patch)
treefaf91e68c574b786442eabe433cf091cce363a44
parent7018cd6011afda6afca722719465538e63f00a6a (diff)
downloadinfrastructure-document-ci.tar.gz
README.mdwn: Document GitLab CI runners setupdocument-ci
-rw-r--r--README.mdwn36
1 files changed, 36 insertions, 0 deletions
diff --git a/README.mdwn b/README.mdwn
index 5212e648..bcbd5d40 100644
--- a/README.mdwn
+++ b/README.mdwn
@@ -540,3 +540,39 @@ For the frontend, run:
ansible -i hosts -m service -a 'name=haproxy enabled=true state=restarted' --sudo frontend-haproxy
Which will install the certificates and then restart the services needed.
+
+
+GitLab CI runners setup
+=======================
+
+Baserock uses [GitLab CI] for build and test automation. For performance reasons
+we provide our own runners and avoid using the free, shared runners provided by
+GitLab. The runners are hosted at [DigitalOcean] and managed by the 'baserock'
+team account there.
+
+There is a persistent 'manager' machine with a public IP of 138.68.143.2 that
+runs GitLab Runner and [docker-machine]. This doesn't run any builds itself --
+we use the [autoscaling feature] of GitLab Runner to spawn new VMs for building
+in. The configuration for this is in `/etc/gitlab-runner/config.toml`.
+
+Each build occurs in a Docker container on one of the transient VMs. As per
+the [\[runners.docker\] section] of `config.toml`, each gets a newly created
+volume mounted at `/cache`. The YBD and BuildStream cache directories get
+located here because jobs were running out of disk space when using the default
+configuration.
+
+There is a second persistent machine with a public IP of 46.101.48.48 that
+hosts a Docker registry and a [Minio] cache. These services run as Docker
+containers. The Docker registry exists to cache the Docker images we use which
+improves the spin-up time of the transient builder VMs, as documented
+[here](https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-docker-registry-mirroring).
+The Minio cache is used for the [distributed caching] feature of GitLab CI.
+
+
+[GitLab CI]: https://about.gitlab.com/features/gitlab-ci-cd/
+[DigitalOcean]: https://cloud.digitalocean.com/
+[docker-machine]: https://docs.docker.com/machine/
+[autoscaling feature]: https://docs.gitlab.com/runner/configuration/autoscale.html
+[Minio]: https://www.minio.io/
+[\[runners.docker\] section]: https://docs.gitlab.com/runner/configuration/advanced-configuration.html#the-runners-docker-section
+[distributed caching]: https://docs.gitlab.com/runner/configuration/autoscale.html#distributed-runners-caching