{"id":20178432,"url":"https://github.com/nvtkaszpir/vagrant-gitlab-runners","last_synced_at":"2025-04-10T04:35:56.331Z","repository":{"id":146356139,"uuid":"125429321","full_name":"nvtkaszpir/vagrant-gitlab-runners","owner":"nvtkaszpir","description":"Different vagrant files with distros with installed gitlab-runner - for quick dev setups","archived":false,"fork":false,"pushed_at":"2019-10-17T20:41:08.000Z","size":19,"stargazers_count":9,"open_issues_count":0,"forks_count":3,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-24T05:51:45.238Z","etag":null,"topics":["centos","docker","gitlab","gitlab-ci","gitlab-runner","libvirt","lxc","lxd","vagrant"],"latest_commit_sha":null,"homepage":null,"language":"Ruby","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/nvtkaszpir.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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":"2018-03-15T21:41:54.000Z","updated_at":"2023-05-11T16:14:39.000Z","dependencies_parsed_at":null,"dependency_job_id":"5a802550-a28b-4eb8-9e42-11a1237581e5","html_url":"https://github.com/nvtkaszpir/vagrant-gitlab-runners","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvtkaszpir%2Fvagrant-gitlab-runners","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvtkaszpir%2Fvagrant-gitlab-runners/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvtkaszpir%2Fvagrant-gitlab-runners/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/nvtkaszpir%2Fvagrant-gitlab-runners/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/nvtkaszpir","download_url":"https://codeload.github.com/nvtkaszpir/vagrant-gitlab-runners/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248158681,"owners_count":21057187,"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":["centos","docker","gitlab","gitlab-ci","gitlab-runner","libvirt","lxc","lxd","vagrant"],"created_at":"2024-11-14T02:20:55.612Z","updated_at":"2025-04-10T04:35:56.291Z","avatar_url":"https://github.com/nvtkaszpir.png","language":"Ruby","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gitlab-runner in vagrant\n\nExample scripts to run different GitLab runners as virtual machines under\nvagrant, as disposable, on-demand workers.\n\nShell scripts provided so that you really do not need anything else.\nThis can be easily converted into kickstart/preseed/cloudinit scripts.\n\n## Notice\n\nThis is a quick proof of concept and is far from any production use.\nThere are already puppet/ansible modules/roles existing in the world.\n\n## Providers\n\n- virtualbox (not tested, but should work)\n- libvirt\n- LXC (Centos only), but it is deprecated, use vagrant-lxd\n- LXD 3.x with [vagrant-lxd](https://gitlab.com/catalyst-it/vagrant-lxd)\n\n## Flavours\n\n- Centos 7.4 + gitlab-runner as docker executor (basic)\n- Centos 7.4 + gitlab-runner as shell executor, with docker, java and gcc++\n\n- Ubuntu 16.04 + gitlab-runner as docker executor (basic)\n- Ubuntu 16.04 + gitlab-runner as shell executor, with docker, java and gcc++\n\nCentos installs new kernel mainline from elrepo.\nUbuntu installs kernel HWE LTS.\n\nOpenJDK 8, headless, but no ant/maven.\n\n## Preparing\n\n- ensure you have vagrant installed, verion 2.2.5\n- ensure you have vagrant plugin installed for given provider\n  and it is properly configured, pro tip: read docs for given provider\n  really carefully!\n- ensure you have vagrant plugin vagrant-reload\n\n```bash\nvagrant plugin install vagrant-reload\n```\n\n- (optional) ensure you have proper plugin installed for given providers,\n  for example vagrant-libvirt, vagrant-lxc, vagrant-lxd\n- ensure you have configured system to be able to use given provider, refer to\n  documentation details provided by given plugin (especially for LXD)\n\n- go to your GitLab install, find project\n- go to Settings (on the bottom left), CI/CD, Runners settings, click expand\n- there is a section 'Specific Runners', with URL and token in red, copy it.\n\n## Adjusting setup\n\n- go into specific directory\n- copy ``.secrets.dist`` to ``.secrets``\n\n- edit ``.secrets`` and update runner name, URL, project token to register and tags\n\n- execute command in shell, to load env vars:\n\n```bash\n. .secrets\n```\n\n- after command above executed, start vagrant:\n\n```bash\nvagrant up --provider=\u003cprovidername\u003e\n```\n\n- in the end of vagrant execution you should see something in red color (yeah...):\n\n```text\nvm-name: Registering runner... succeeded   runner=SOMETHING\nvm-name: Runner registered successfully. Feel free to start it,\n         but if it's running already the config should be automatically reloaded!\n```\n\n- go to the GitLab project, and check if in Runner settings you see registered\n  runner.\n\n- check your GitLab project and edit ``.gitlab-ci.yml`` to use proper tags in the\n  project depending on the build/step and so on.\n\n## Rebuilding machine\n\nPretty obvious\n\n```bash\nvagrant destroy -f\nvagrant up --provider=\u003cprovidername\u003e\n```\n\nRemember to go to GitLab CI and remove dead workers.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvtkaszpir%2Fvagrant-gitlab-runners","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fnvtkaszpir%2Fvagrant-gitlab-runners","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fnvtkaszpir%2Fvagrant-gitlab-runners/lists"}