{"id":15171832,"url":"https://github.com/bmc-labs/runrs","last_synced_at":"2025-10-26T00:30:52.098Z","repository":{"id":221591112,"uuid":"752491294","full_name":"bmc-labs/runrs","owner":"bmc-labs","description":"Manage GitLab Runners in Docker via REST","archived":false,"fork":false,"pushed_at":"2024-11-09T23:10:20.000Z","size":401,"stargazers_count":5,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-31T12:51:21.409Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Rust","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/bmc-labs.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE-APACHE","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":"2024-02-04T01:49:32.000Z","updated_at":"2024-11-09T23:10:22.000Z","dependencies_parsed_at":"2024-05-09T15:04:50.338Z","dependency_job_id":"61b536db-1e23-4ee5-96d3-f7a8aeb9791b","html_url":"https://github.com/bmc-labs/runrs","commit_stats":null,"previous_names":["bmc-labs/runrs"],"tags_count":11,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmc-labs%2Frunrs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmc-labs%2Frunrs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmc-labs%2Frunrs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bmc-labs%2Frunrs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bmc-labs","download_url":"https://codeload.github.com/bmc-labs/runrs/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":238229940,"owners_count":19437723,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":[],"created_at":"2024-09-27T09:04:13.130Z","updated_at":"2025-10-26T00:30:51.583Z","avatar_url":"https://github.com/bmc-labs.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n\n\u003cimg src=\"./assets/runrs-banner-1024px.jpg\" /\u003e\n\u003cbr/\u003e\n\n# `🏃🏽 runrs`\n\n**Manage GitLab Runners in Docker via REST**\n\n\u003c/div\u003e\n\nIf you're running GitLab runners in Docker and you're looking for a simple, non-manual way of doing\nso, runrs has you covered. You can run runrs in your Docker alongside the GitLab Runners control\nservice - it just needs access to the configuration file containing Runner configs and things will\n_just work™_.\n\n\n## Motivation\n\nRunning GitLab Runners in Docker is simple, but managing them - adding new ones, cleaning up,\nrotating them - is an annoying manual task. If you're anything like us, you don't like those.\nMoreover, it's something we don't do _that often_ - a few times per month perhaps - so we end up\nlooking up the manual steps in the GitLab docs every godforsaken time. Meanwhile, pretty much\neverything else we run is Terraformed, which makes this doubl-y annoying.\n\nThus, we wrote this simple service which provides a CRUD API for GitLab Runner configurations and\ncan run in Docker, managing the Runners configuration file. We also have [a Terraform\nprovider](https://github.com/bmc-labs/terraform-provider-peripheral) you can use to _GitLab Runner\nSetup as Code_ your Runners.\n\n\n## Using runrs in prod\n\nWe don't recommend you do (just yet). If you insist: use the Docker container we provide, and make\nsure it has access to the GitLab Runner configuration file. You do so by passing the path to it via\nthe `CONFIG_PATH` environment variable.\n\nIf you want to persist the SQLite database (e.g. because you want your runner setup to survive\nreboots, or because you're running several replicas of `runrs` for some reason), you can pass it any\nURL that SQLite would understand - most commonly a path to a file on disk - via the `DATABASE_URL`\nenvironment variable.\n\n\n## Local Development Setup\n\nIt's a vanilla Rust and `cargo` project, so if you have a recent (1.75+) Rust toolchain installed,\nyou should be good. For testing end to end, you'll need:\n\n- Docker, which is going to be used as the executor for your runners, up and running, and\n- [Docker Compose](https://docs.docker.com/compose/install/)\n\nIt's _also_ a nixified project using a flake, so if you prefer to use that to build it, you can.\nLook at the `flake.nix` for current package targets. In that vein: there is also a\n[`direnv`](https://direnv.net/) setup in the project, so if you have that installed, you can just\n`direnv allow` in the project root and you'll have the setup done.\n\n### Setup\n\n1. Clone the thing.\n   ```bash\n   git clone git@github.com:bmc-labs/runrs.git\n   cd runrs\n   ```\n1. Use Docker Compose to run the `gitlab-runner` service with correct setup in Docker.\n   ```bash\n   docker compose up -d\n   ```\n1. Build and run the thing.\n   ```bash\n   cargo run\n   ```\n\nSimilarly, testing is via `cargo test`, as you might have expected.\n\nIf you are building with nix, you can use the `nix` command to build the project:\n\n```bash\n# to build the default target, which is the \"runrs\" binary:\nnix build\n\n# to build the Docker image:\nnix build .#runrs-docker-image\n\n# after building the Docker image, you need to load it:\ndocker load \u003c result\n```\n\nThat's it. Make a PR with your changes and we'll talk about them.\n\n\n## Support\n\nThis is an open source project, so there isn't support per se. If you open an issue in the\nrepository, we'll try and help you, but no promises.\n\n\n## License\n\nLicensed under either of\n\n- Apache License, Version 2.0 ([LICENSE-APACHE](LICENSE-APACHE) or\n  http://www.apache.org/licenses/LICENSE-2.0)\n- MIT license ([LICENSE-MIT](LICENSE-MIT) or http://opensource.org/licenses/MIT)\n\nat your option.\n\n### Contribution\n\nUnless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the\nwork by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any\nadditional terms or conditions.\n\n---\n\n\u003cdiv align=\"center\"\u003e\n© Copyright 2024 \u003cb\u003ebmc::labs\u003c/b\u003e GmbH. All rights reserved.\u003cbr /\u003e\n\u003cem\u003esolid engineering. sustainable code.\u003c/em\u003e\n\u003c/div\u003e\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmc-labs%2Frunrs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbmc-labs%2Frunrs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbmc-labs%2Frunrs/lists"}