sio / gitlab-runners-fleet

Auto scaling fleet of GitLab CI runners
Apache License 2.0
2 stars 0 forks source link
ansible ci cicd gitlab gitlab-ci gitlab-ci-runner iac infrastructure infrastructure-as-code terraform

Auto scaling fleet of GitLab CI runners

This repo contains infrastructure definitions and configuration for a fleet of GitLab CI runners. Provided tools allow to scale the number of runner instances up and down (to zero) as demand changes.

I decided not to use GitLab's suggested docker-machine approach because:

I intend to deploy the runners only for personal use and I aim to architect my infra to incur (next to) zero costs when no CI jobs are running.

Project status

Ready for deployment. Deployed and used regularly by author.

Rewritten to Terraform after Pulumi Automation API and plain Pulumi.

Infrastructure overview

Usage

Underlying technology

It's incredible how much power and how easily can a single individual wield thanks to modern tech! This project is made possible by standing on shoulders of giants:

            [Ansible](https://docs.ansible.com/)   ·   [cloud-init](https://cloudinit.readthedocs.io/)   ·   [Debian](https://debian.org)   ·   [Docker](https://docs.docker.com/)   ·   [GitHub Actions](https://docs.github.com/actions)   ·   [GitLab CI](https://docs.gitlab.com/ee/ci/)   ·   [GNU Make](https://www.gnu.org/software/make/)   ·   [Golang](https://go.dev)   ·   [GraphQL](https://graphql.org/)   ·   [nftables](https://netfilter.org/projects/nftables/)   ·   [Python](https://python.org)   ·   [Qemu (qemu-utils)](https://www.qemu.org/)   ·   [systemd](https://systemd.io)   ·   [Terraform](https://www.terraform.io/)   ·   [Yandex Cloud](https://cloud.yandex.com)   ·              

License and copyright

Copyright 2021-2023 Vitaly Potyarkin

   Licensed under the Apache License, Version 2.0 (the "License");
   you may not use this file except in compliance with the License.
   You may obtain a copy of the License at

       http://www.apache.org/licenses/LICENSE-2.0

   Unless required by applicable law or agreed to in writing, software
   distributed under the License is distributed on an "AS IS" BASIS,
   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
   See the License for the specific language governing permissions and
   limitations under the License.