{"id":13703008,"url":"https://github.com/bonsai-oss/hetzner-machine-provider","last_synced_at":"2025-04-29T05:31:56.287Z","repository":{"id":149902071,"uuid":"622443891","full_name":"bonsai-oss/hetzner-machine-provider","owner":"bonsai-oss","description":"Custom GitLab Runner Adapter for Running Jobs within Hetzner Cloud servers. Repository mirrored from GitLab. 🦊","archived":false,"fork":false,"pushed_at":"2024-05-20T16:04:22.000Z","size":112,"stargazers_count":6,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-08-03T21:03:02.653Z","etag":null,"topics":["ci-cd","cloud","gitlab-ci","gitlab-runner","hcloud","hetzner","hetzner-cloud"],"latest_commit_sha":null,"homepage":"https://gitlab.com/bonsai-oss/tools/hetzner-machine-provider","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/bonsai-oss.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":"2023-04-02T05:53:21.000Z","updated_at":"2024-06-13T12:33:22.000Z","dependencies_parsed_at":"2023-12-23T10:27:19.360Z","dependency_job_id":"0ada2470-cbdb-4a42-ae1c-c20ce6f61e55","html_url":"https://github.com/bonsai-oss/hetzner-machine-provider","commit_stats":null,"previous_names":[],"tags_count":33,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonsai-oss%2Fhetzner-machine-provider","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonsai-oss%2Fhetzner-machine-provider/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonsai-oss%2Fhetzner-machine-provider/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bonsai-oss%2Fhetzner-machine-provider/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bonsai-oss","download_url":"https://codeload.github.com/bonsai-oss/hetzner-machine-provider/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":224151085,"owners_count":17264436,"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":["ci-cd","cloud","gitlab-ci","gitlab-runner","hcloud","hetzner","hetzner-cloud"],"created_at":"2024-08-02T21:00:48.752Z","updated_at":"2024-11-11T18:16:37.391Z","avatar_url":"https://github.com/bonsai-oss.png","language":"Go","funding_links":[],"categories":["Integrations"],"sub_categories":["Rust"],"readme":"# hetzner-machine-provider\n\nThis is a provider for gitlab custom runners. It uses the Hetzner Cloud API to create and delete servers for using them inside the ci.\nSo, the CI behaves like in github actions with their \"per-job\" VMs.\n\n## Usage\nEnvironment variables options used in ci config file:\n- **HCLOUD_SERVER_TYPE**: The server type to use, for example `ccx12`, defaults to `auto`\n- **HCLOUD_SERVER_ARCHITECTURE**: The architecture to use for the server, only being used if `HCLOUD_SERVER_TYPE` is set to `auto`, defaults to `amd64`\n- **HCLOUD_SERVER_LOCATION**: The location to use, defaults to `fsn1`\n- **HMP_SERVER_WAIT_DEADLINE**: The time to wait for the server to be ready, defaults to `5m`\n- **HMP_ADDITIONAL_AUTHORIZED_KEYS**: Additional authorized keys to add to the server, defaults to `\"\"`. Separate multiple keys with a newline (`\\n`).\n\n### Image Selection\nYou can set the image to use by setting the `image` property in the `.gitlab-ci.yml` file.\nIf you don't set it, it will default to `ubuntu-22.04`.\n\nAlso, some special image selectors are available:\n  - `:latest`-Suffix: Will be used to filter the images and selects the one with the highest os version. Example: `ubuntu:latest`\n  - `label#`-Prefix: Will be used to filter with label selectors. That is used for snapshots. The snapshot with the latest creation date will be selected. See [docs](https://docs.hetzner.cloud/#label-selector) for examples.\n\n## Runner Configuration\nYou need to configure the following environment variable for your gitlab runner:\n- **HCLOUD_TOKEN**: The API token for the Hetzner Cloud API, must have the permissions to create and delete servers\n\nFurthermore, you need to configure the runner to use the custom executor. Here is an example configuration:\n```toml\nconcurrent = 4\ncheck_interval = 0\nshutdown_timeout = 0\n\n[session_server]\n  session_timeout = 1800\n  ...\n[[runners]]\n  ...\n  executor = \"custom\"\n  builds_dir = \"/builds\"\n  cache_dir = \"/cache\"\n  [runners.custom]\n    config_exec = \"/\u003cpath-to-hmp\u003e/hmp\"\n    config_args = [\"configure\"]\n    prepare_exec = \"/\u003cpath-to-hmp\u003e/hmp\"\n    prepare_args = [\"prepare\"]\n    run_exec = \"/\u003cpath-to-hmp\u003e/hmp\"\n    run_args = [\"exec\"]\n    cleanup_exec= \"/\u003cpath-to-hmp\u003e/hmp\"\n    cleanup_args = [\"cleanup\"]\n  ...\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonsai-oss%2Fhetzner-machine-provider","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbonsai-oss%2Fhetzner-machine-provider","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbonsai-oss%2Fhetzner-machine-provider/lists"}