{"id":16096332,"url":"https://github.com/sio/gitlab-runners-fleet","last_synced_at":"2026-04-20T09:02:30.628Z","repository":{"id":101312775,"uuid":"342581814","full_name":"sio/gitlab-runners-fleet","owner":"sio","description":"Auto scaling fleet of GitLab CI runners","archived":false,"fork":false,"pushed_at":"2023-09-14T12:07:25.000Z","size":286,"stargazers_count":2,"open_issues_count":2,"forks_count":0,"subscribers_count":2,"default_branch":"terraform","last_synced_at":"2025-04-05T20:31:55.421Z","etag":null,"topics":["ansible","ci","cicd","gitlab","gitlab-ci","gitlab-ci-runner","iac","infrastructure","infrastructure-as-code","terraform"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sio.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-02-26T13:19:35.000Z","updated_at":"2023-11-13T13:40:49.000Z","dependencies_parsed_at":"2024-12-19T03:26:13.986Z","dependency_job_id":"65cf3b23-0ebe-41f9-9fcb-d59d83082f5d","html_url":"https://github.com/sio/gitlab-runners-fleet","commit_stats":{"total_commits":179,"total_committers":1,"mean_commits":179.0,"dds":0.0,"last_synced_commit":"f0f1f7d07c2f6c13b27388c17105f369037b8c93"},"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/sio/gitlab-runners-fleet","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fgitlab-runners-fleet","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fgitlab-runners-fleet/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fgitlab-runners-fleet/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fgitlab-runners-fleet/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sio","download_url":"https://codeload.github.com/sio/gitlab-runners-fleet/tar.gz/refs/heads/terraform","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sio%2Fgitlab-runners-fleet/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32040353,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T00:18:06.643Z","status":"online","status_checked_at":"2026-04-20T02:00:06.527Z","response_time":94,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["ansible","ci","cicd","gitlab","gitlab-ci","gitlab-ci-runner","iac","infrastructure","infrastructure-as-code","terraform"],"created_at":"2024-10-09T17:13:26.700Z","updated_at":"2026-04-20T09:02:30.604Z","avatar_url":"https://github.com/sio.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Auto scaling fleet of GitLab CI runners\n\nThis repo contains infrastructure definitions and configuration for a fleet of\nGitLab CI runners. Provided tools allow to scale the number of runner\ninstances up and down (to zero) as demand changes.\n\nI decided not to use GitLab's suggested `docker-machine` approach because:\n\n- `docker-machine` is mostly abandoned, life support from GitLab is barely\n  enough to keep it alive. GitLab themselves\n  [are looking](https://docs.gitlab.com/ee/architecture/blueprints/runner_scaling/)\n  for an alternative solution.\n- I want to be able to choose from a wider set of cloud providers than\n  `docker-machine` supports. Coding new bindings for `docker-machine` seems\n  to be a pointless endeavor.\n- I wanted a project to learn Terraform/Pulumi. Previous two iterations of this\n  project were created with Pulumi and Pulumi Automation API. Pulumi stopped\n  developing bindings for the cloud I use (Yandex Cloud) and my Python code was\n  not as clean as I would like, hence this (third) rewrite to Terraform \u0026 Go.\n\nI intend to deploy the runners only for personal use and I aim to\narchitect my infra to incur (next to) zero costs when no CI jobs are running.\n\n## Project status\n\nReady for deployment.\nDeployed and used regularly by author.\n\nRewritten to Terraform after\n[Pulumi Automation API](https://github.com/sio/gitlab-runners-fleet/tree/legacy/02-pulumi-automation-api)\nand [plain Pulumi](https://github.com/sio/gitlab-runners-fleet/tree/legacy/01-pulumi-plain).\n\n\n## Infrastructure overview\n\n- Persistent resources\n    - S3 bucket that holds base image for cloud VMs\n- Scaling down to zero on demand\n    - 0 to N runner hosts: Debian hosts with GitLab runner daemon + Docker\n      executor\n    - 0 to 1 gateway: a simple cloud VM which has a public IPv4 and acts as a\n      router, firewall, reverse proxy for HTTP API and as a caching proxy for\n      Docker Hub.\n    - Other required resources (networks, IP addresses, VM images)\n\n\n## Usage\n\n- Prepare S3 bucket with a prebaked VM image: [build/README.md](build/README.md)\n- Launch fleet manager container: [container/README.md](container/README.md)\n\n\n## Underlying technology\n\nIt's incredible how much power and how easily can a single individual wield\nthanks to modern tech! This project is made possible by standing on shoulders\nof giants:\n\n\u003ctable\u003e\u003ctr\u003e\u003ctd\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/td\u003e\u003ctd align=\"center\"\u003e\n\n[Ansible](https://docs.ansible.com/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[cloud-init](https://cloudinit.readthedocs.io/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Debian](https://debian.org) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Docker](https://docs.docker.com/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[GitHub Actions](https://docs.github.com/actions) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[GitLab CI](https://docs.gitlab.com/ee/ci/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[GNU Make](https://www.gnu.org/software/make/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Golang](https://go.dev) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[GraphQL](https://graphql.org/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[nftables](https://netfilter.org/projects/nftables/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Python](https://python.org) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Qemu (qemu-utils)](https://www.qemu.org/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[systemd](https://systemd.io) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Terraform](https://www.terraform.io/) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n[Yandex Cloud](https://cloud.yandex.com) \u0026nbsp;\u0026nbsp;·\u0026nbsp;\u0026nbsp;\n\n\u003c/td\u003e\u003ctd\u003e\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u0026nbsp;\u003c/td\u003e\u003c/tr\u003e\u003c/table\u003e\n\n\n## License and copyright\n\nCopyright 2021-2023 Vitaly Potyarkin\n\n```\n   Licensed under the Apache License, Version 2.0 (the \"License\");\n   you may not use this file except in compliance with the License.\n   You may obtain a copy of the License at\n\n       http://www.apache.org/licenses/LICENSE-2.0\n\n   Unless required by applicable law or agreed to in writing, software\n   distributed under the License is distributed on an \"AS IS\" BASIS,\n   WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n   See the License for the specific language governing permissions and\n   limitations under the License.\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fgitlab-runners-fleet","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsio%2Fgitlab-runners-fleet","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsio%2Fgitlab-runners-fleet/lists"}