All Projects → mawalu → Hetzner Gitlab Runner

mawalu / Hetzner Gitlab Runner

Autoscale gitlab ci runners on hetzner cloud

Projects that are alternatives of or similar to Hetzner Gitlab Runner

Crane
⬆ A GitLab CI ready image to upgrade services in Rancher
Stars: ✭ 90 (+150%)
Mutual labels:  gitlab-ci, docker-image
Awesome Docker
🐳 A curated list of Docker resources and projects
Stars: ✭ 20,870 (+57872.22%)
Mutual labels:  docker-image, docker-machine
Laravel Dusk Ci
Docker Test suite for Laravel Dusk in gitlab CI
Stars: ✭ 129 (+258.33%)
Mutual labels:  gitlab-ci, docker-image
Gitlab Ci Android
GitLab CI image for building Android apps
Stars: ✭ 399 (+1008.33%)
Mutual labels:  gitlab-ci, docker-image
Docker Phpfarm
A Dockerfile to build an image running multiple PHP versions on Apache
Stars: ✭ 214 (+494.44%)
Mutual labels:  gitlab-ci, docker-image
Vrnetlab
Run virtual routers with docker
Stars: ✭ 731 (+1930.56%)
Mutual labels:  gitlab-ci, docker-image
Goquiet Shadowsocks Docker
A Docker image for Shadowsocks over GoQuiet
Stars: ✭ 21 (-41.67%)
Mutual labels:  docker-image
Docker Yellowlabtools
🐳 Yellow Lab Tools Docker Image
Stars: ✭ 30 (-16.67%)
Mutual labels:  docker-image
Distro Test Containers
Distribution specific containers for Ansible integration testing.
Stars: ✭ 20 (-44.44%)
Mutual labels:  docker-image
Docker Machine Zsh Completion
A more functional and up-to-date zsh completion for docker-machine
Stars: ✭ 14 (-61.11%)
Mutual labels:  docker-machine
Max Text Sentiment Classifier
Detect the sentiment captured in short pieces of text
Stars: ✭ 35 (-2.78%)
Mutual labels:  docker-image
Centos7 S2i Nodejs
DEPRECATED OpenShift S2I builder images for Node.js ✨
Stars: ✭ 34 (-5.56%)
Mutual labels:  docker-image
Feedthebeast Docker Servers
FTB Minecraft servers dockerized
Stars: ✭ 27 (-25%)
Mutual labels:  docker-image
Postgresql Postgis Timescaledb
PostgreSQL + PostGIS + TimescaleDB docker image 🐘🌎📈
Stars: ✭ 19 (-47.22%)
Mutual labels:  docker-image
Docker Mediawiki
🐳 Dockerized Femiwiki's mediawiki server
Stars: ✭ 33 (-8.33%)
Mutual labels:  docker-image
Lab
Lab wraps Git or Hub, making it simple to clone, fork, and interact with repositories on GitLab
Stars: ✭ 911 (+2430.56%)
Mutual labels:  gitlab-ci
Search Docker Registry V2 Script.1.0
view-private-registry is a simple bash script for listing images in a private registry v2, docker search registry-v2
Stars: ✭ 34 (-5.56%)
Mutual labels:  docker-image
Nano Nginx
Nano container with nginx preconfigured as reverse proxy
Stars: ✭ 15 (-58.33%)
Mutual labels:  docker-image
Git Push Deploy
Simple Automated CI/CD Pipeline for GitHub and GitLab Projects
Stars: ✭ 21 (-41.67%)
Mutual labels:  gitlab-ci
Pyats Docker
Dockerfile and scripts for pyATS
Stars: ✭ 34 (-5.56%)
Mutual labels:  docker-image

Auto-scale CI jobs with Gitlab Runner and the Hetzner Docker Machine driver

With this patched GitLab Runner image, you can auto-scale your CI jobs on Hetzner Cloud. The patch installs the Hetzner Docker Machine driver and is available on Docker Hub.

You can follow the official GitLab docs for configuring the GitLab Runner with docker machine, just use this image as a drop in replacement for gitlab/gitlab-runner.

See the example config.toml and docker-compose.yaml below for the hetzner specific docker machine options.

Usage

Use this image instead of the gitlab/gitlab-runner image and set MachineDriver to hetzner in your runner configuration.

Example config.toml:

concurrent = 1
check_interval = 0

[session_server]
  session_timeout = 1800

[[runners]]
  name = "docker-machine"
  url = "https://gitlab.com"
  token = "your-token"
  executor = "docker+machine"
  [runners.docker]
    tls_verify = false
    image = "docker:latest"
    privileged = true
    disable_cache = false
    volumes = ["/cache"]
    shm_size = 536870912
  [runners.cache]
  [runners.machine]
    IdleCount = 0
    IdleTime = 1800
    MaxBuilds = 10
    MachineDriver = "hetzner"
    MachineName = "runner-%s"
    MachineOptions = [
      "hetzner-api-token=hetzner-api-token",
      "hetzner-image=ubuntu-18.04",
      "hetzner-server-type=cx31",
    ]

Example docker-compose.yaml:

version: "3.8"

services:
  hetzner-runner:
    image: mawalu/hetzner-gitlab-runner:latest
    volumes:
      - "./hetzner_config:/etc/gitlab-runner"

Docker Errors

If you face docker problems at runtime (such as the one below), you can specify a Docker version in the MachineOptions.

 MachineOptions = [
      "engine-install-url=https://releases.rancher.com/install-docker/19.03.9.sh",
    ]

Possible error that is caused by Docker:

ERROR: Error creating machine: Error running provisioning: Unable to verify the Docker daemon is listening: Maximum number of retries (10) exceeded  driver=hetzner name=runner-xxx-xxx operation=create

See this issue for more information.

Versions

Currently this image is build using the gitlab/gitlab-runner:latest image and the latest docker-machine hetzner plugin. If you need builds for another version feel free to open an PR.

License

MIT

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].